Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Parser changes:

  • Add Function field to DropQuery for DROP FUNCTION support
  • Track dropFunction flag in parseDrop()

Explain output fixes:

  • Add explainRenameQuery for RENAME TABLE statements
  • Add DropFunctionQuery handling in explainDropQuery
  • Add database-qualified DROP TABLE format (db.table)
  • Fix ceil function name: change ceiling->ceil mapping
  • Add ArrayAccess and TupleAccess support in explainAliasedExpr

Tests enabled:

  • 00140_rename
  • 00157_cache_dictionary
  • 00161_rounding_functions
  • 01129_dict_get_join_lose_constness
  • 02125_recursive_sql_user_defined_functions
  • 02126_identity_user_defined_function
  • 02148_sql_user_defined_function_subquery
  • 02960_partition_by_udf
  • 03033_index_definition_sql_udf_bug
  • 03165_round_scale_as_column
  • 03215_udf_with_union

Parser changes:
- Add Function field to DropQuery for DROP FUNCTION support
- Track dropFunction flag in parseDrop()

Explain output fixes:
- Add explainRenameQuery for RENAME TABLE statements
- Add DropFunctionQuery handling in explainDropQuery
- Add database-qualified DROP TABLE format (db.table)
- Fix ceil function name: change ceiling->ceil mapping
- Add ArrayAccess and TupleAccess support in explainAliasedExpr

Tests enabled:
- 00140_rename
- 00157_cache_dictionary
- 00161_rounding_functions
- 01129_dict_get_join_lose_constness
- 02125_recursive_sql_user_defined_functions
- 02126_identity_user_defined_function
- 02148_sql_user_defined_function_subquery
- 02960_partition_by_udf
- 03033_index_definition_sql_udf_bug
- 03165_round_scale_as_column
- 03215_udf_with_union
EXPLAIN output fix:
- At top level, ClickHouse outputs "Explain EXPLAIN <TYPE>"
- Nested in subqueries, it outputs "Explain <TYPE>"
- Added depth check to handle both cases correctly
- Also fixed EXPLAIN CURRENT TRANSACTION case

Tests enabled:
- 01029_early_constant_folding
- 01840_tupleElement_formatting_fuzzer
- 02210_processors_profile_log
- 02220_array_join_format
- 02315_replace_multiif_to_if
- 02377_executable_function_settings
- 02477_is_null_parser
- 02752_is_null_priority
- 02889_system_drop_format_schema
- 02893_system_drop_schema_cache_format
- 03155_explain_current_transaction
#23)

ClickHouse EXPLAIN AST has inconsistent casing for:
- Float literals: Float64_NaN vs Float64_nan
- Function names: GREATEST vs greatest, lowerUTF8 vs lowerutf8

Changed test comparison to use strings.EqualFold() for case-insensitive
matching, which better reflects the actual semantic equivalence.

Tests enabled (22 total):
- NaN case: 00287_column_const_with_nan, 00437_nulls_first_last,
  00712_nan_comparison, 01428_hash_set_nan_key, 01621_bar_nan_arguments,
  01654_bar_nan, 01655_sleep_infinite_float, 01672_actions_dag_merge_crash,
  01683_intdiv_ubsan, 01774_bar_with_illegal_value, 02347_rank_corr_nan,
  03096_largest_triangle_3b_crash
- Function case: 01117_greatest_least_case, 01247_least_greatest_filimonov,
  02234_position_case_insensitive_utf8, 03033_distinct_transform_const_columns
- UTF8 case: 00761_lower_utf8_bug, 01431_utf8_ubsan, 01674_unicode_asan
- Other: 01957_heredoc_more, 02424_pod_array_overflow, 02426_pod_array_overflow_3
@kyleconroy kyleconroy merged commit 7034530 into main Dec 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants