diff --git a/src/Interpreters/OpenTelemetrySpanLog.cpp b/src/Interpreters/OpenTelemetrySpanLog.cpp index 257c64e1df8..610330b8559 100644 --- a/src/Interpreters/OpenTelemetrySpanLog.cpp +++ b/src/Interpreters/OpenTelemetrySpanLog.cpp @@ -1,19 +1,14 @@ -#include "OpenTelemetrySpanLog.h" +#include #include #include #include -#include #include #include +#include #include #include #include -#include - -#include -#include -#include namespace DB @@ -32,11 +27,13 @@ NamesAndTypesList OpenTelemetrySpanLogElement::getNamesAndTypes() } ); + auto low_cardinality_string = std::make_shared(std::make_shared()); + return { {"trace_id", std::make_shared()}, {"span_id", std::make_shared()}, {"parent_span_id", std::make_shared()}, - {"operation_name", std::make_shared()}, + {"operation_name", low_cardinality_string}, {"kind", std::move(span_kind_type)}, // DateTime64 is really unwieldy -- there is no "normal" way to convert // it to an UInt64 count of microseconds, except: @@ -51,15 +48,17 @@ NamesAndTypesList OpenTelemetrySpanLogElement::getNamesAndTypes() {"start_time_us", std::make_shared()}, {"finish_time_us", std::make_shared()}, {"finish_date", std::make_shared()}, - {"attribute", std::make_shared(std::make_shared(), std::make_shared())}, + {"attribute", std::make_shared(low_cardinality_string, std::make_shared())}, }; } NamesAndAliases OpenTelemetrySpanLogElement::getNamesAndAliases() { + auto low_cardinality_string = std::make_shared(std::make_shared()); + return { - {"attribute.names", std::make_shared(std::make_shared()), "mapKeys(attribute)"}, + {"attribute.names", std::make_shared(low_cardinality_string), "mapKeys(attribute)"}, {"attribute.values", std::make_shared(std::make_shared()), "mapValues(attribute)"} }; } @@ -83,4 +82,3 @@ void OpenTelemetrySpanLogElement::appendToBlock(MutableColumns & columns) const } } - diff --git a/src/Processors/Merges/Algorithms/FinishAggregatingInOrderAlgorithm.cpp b/src/Processors/Merges/Algorithms/FinishAggregatingInOrderAlgorithm.cpp index 5f9725c804b..a5befca7233 100644 --- a/src/Processors/Merges/Algorithms/FinishAggregatingInOrderAlgorithm.cpp +++ b/src/Processors/Merges/Algorithms/FinishAggregatingInOrderAlgorithm.cpp @@ -168,7 +168,6 @@ void FinishAggregatingInOrderAlgorithm::addToAggregation() accumulated_bytes += static_cast(static_cast(states[i].total_bytes) * current_rows / states[i].num_rows); accumulated_rows += current_rows; - if (!states[i].isValid()) inputs_to_update.push_back(i); }