Skip to content

[Umbrella] Analyzer, Planner migration #42648

@kitaisreal

Description

@kitaisreal

After #31796 was merged now we have new infrastructure for query analysis and planning. There are a lot of things that new infrastructure brings to us:

  1. Better performance of queries that spend considerable time during query analysis, planning stage. Better performance of queries with a lot of JOINs, a lot of subqueries. Example: Performance degradation on query interpretation #39996.
  2. A lot of new SQL features that are now possible to implement (better scalar subqueries, correlated subqueries).
  3. Better support for JOINs (Support for indexes, FINAL, SAMPLE).
  4. Ability to implement full featured query optimizer on top of new infrastructure.
  5. Better usability, better exception messages.
  6. Full SQL specificiation of our SQL extensions is now possible to write.

This ticket will contain tasks that are necessary to implement before we can enable new infrastructure by default.

Analyzer

QueryTreePassManager

Planner

QueryPlan optimizations

Backward compatibility

Additional tasks

Broken tests

Grouped

Integrations tests

  • test_wrong_db_or_table_name/test.py::test_wrong_table_name, test_sql_user_defined_functions_on_cluster/test.py::test_sql_user_defined_functions_on_cluster, test_user_defined_object_persistence/test.py::test_persistence, test_dictionaries_update_and_reload/test.py::test_reload_after_fail_in_cache_dictionary, test_access_for_functions/test.py::test_access_rights_for_function, test_select_access_rights
  • test_profile_events_s3/test.py::test_profile_events
  • test_mysql_database_engine/test.py::test_mysql_ddl_for_mysql_database
  • test_executable_table_function/test.py::test_executable_function_input_python
  • test_cluster_copier
  • test_backward_compatibility, test_distributed_backward_compatability/test.py::test_distributed_in_tuple distributed between nodes with old and new analyzer
  • test_user_defined_object_persistence/test.py::test_persistence
  • test_storage_rabbitmq/test.py::test_rabbitmq_materialized_view SELECT * FROM test.rabbitmq GROUP BY (key, value)
  • test_mutations_with_merge_tree/test.py::test_mutations_with_merge_background_task
  • test_build_sets_from_multiple_threads/test.py::test_set

Performance tests

Separate issue was created for this topic: #62245.

  • direct_dictionary, set_index @kitaisreal
  • push_down_limit
  • injective_functions_inside_uniq
  • agg_functions_min_max_any
  • norm_distance_float, norm_distance
  • array_fill big constants @kitaisreal
  • logical_functions_medium
  • if_transform_strings_to_enum
  • distinct_combinator
  • arithmetic_operations_in_aggr_func
  • aggregate_functions_of_group_by_keys
  • order_by_read_in_order
  • aggregate_with_serialized_method
  • materialized_view_parallelize_output_from_storages
  • if_transform_strings_to_enum
  • low_cardinality_query
  • uniqExactIf
  • parallel_index
  • rand rewrite
  • group_by_fixed_keys rewrite
  • logical_functions_small, logical_functions_medium, logical_functions_large rewrite
  • hash_table_sizes_stats rewrite
  • joins_in_memory rewrite

Other

Later

  • experimental_ann_index 02354_annoy

Metadata

Metadata

Labels

analyzerIssues and pull-requests related to new analyzer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions