Fix column names after tables flattening

This commit is contained in:
Aleksei Nikiforov 2019-12-17 14:40:39 +03:00
parent a0ea1c1f26
commit c811c95797

View File

@ -273,8 +273,8 @@ void IntegerRecordField::addOrUpdateValue(auparse_state_t *record)
std::vector<AbstractRecordField::Column> IntegerRecordField::generateColumnsAndNames() const std::vector<AbstractRecordField::Column> IntegerRecordField::generateColumnsAndNames() const
{ {
return std::vector<AbstractRecordField::Column> { return std::vector<AbstractRecordField::Column> {
Column { m_name + ".IntValue", std::make_shared<clickhouse::ColumnNullable>(std::make_shared<clickhouse::ColumnInt64>(), std::make_shared<clickhouse::ColumnUInt8>()) }, Column { m_name + "_IntValue", std::make_shared<clickhouse::ColumnNullable>(std::make_shared<clickhouse::ColumnInt64>(), std::make_shared<clickhouse::ColumnUInt8>()) },
Column { m_name + ".InterpretedValue", std::make_shared<clickhouse::ColumnNullable>(std::make_shared<clickhouse::ColumnString>(), std::make_shared<clickhouse::ColumnUInt8>()) } Column { m_name + "_InterpretedValue", std::make_shared<clickhouse::ColumnNullable>(std::make_shared<clickhouse::ColumnString>(), std::make_shared<clickhouse::ColumnUInt8>()) }
}; };
} }
@ -344,8 +344,8 @@ void InterpretedStringArrayRecordField::addOrUpdateValue(auparse_state_t *record
std::vector<AbstractRecordField::Column> InterpretedStringArrayRecordField::generateColumnsAndNames() const std::vector<AbstractRecordField::Column> InterpretedStringArrayRecordField::generateColumnsAndNames() const
{ {
return std::vector<AbstractRecordField::Column> { return std::vector<AbstractRecordField::Column> {
Column { m_name + ".Name", std::make_shared<clickhouse::ColumnArray>(std::make_shared<clickhouse::ColumnString>()) }, Column { m_name + "_Name", std::make_shared<clickhouse::ColumnArray>(std::make_shared<clickhouse::ColumnString>()) },
Column { m_name + ".Value", std::make_shared<clickhouse::ColumnArray>(std::make_shared<clickhouse::ColumnString>()) } Column { m_name + "_Value", std::make_shared<clickhouse::ColumnArray>(std::make_shared<clickhouse::ColumnString>()) }
}; };
} }