Fix for passes that use column source

This commit is contained in:
Dmitry Novik 2024-01-15 16:25:39 +00:00
parent 0f7daeffc8
commit de115c4da7
3 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,9 @@ public:
if (!first_argument_column_node)
return;
if (first_argument_column_node->getColumnName() == "__grouping_set")
return;
auto column_source = first_argument_column_node->getColumnSource();
auto * table_node = column_source->as<TableNode>();

View File

@ -91,6 +91,9 @@ public:
const auto * column_id = func_node->getArguments().getNodes()[0]->as<ColumnNode>();
if (!column_id) return;
if (column_id->getColumnName() == "__grouping_set")
return;
const auto * column_type = column_id->getColumnType().get();
if (!isDateOrDate32(column_type) && !isDateTime(column_type) && !isDateTime64(column_type)) return;

View File

@ -52,6 +52,9 @@ public:
return;
auto & column_node = node->as<ColumnNode &>();
if (column_node.getColumnName() == "__grouping_set")
return;
auto column_source_node = column_node.getColumnSource();
auto column_source_node_type = column_source_node->getNodeType();