master 1930f34593d4 cached
918 files
2.1 MB
595.5k tokens
2101 symbols
1 requests
Download .txt
Showing preview only (2,380K chars total). Download the full file or copy to clipboard to get everything.
Repository: AfterShip/clickhouse-sql-parser
Branch: master
Commit: 1930f34593d4
Files: 918
Total size: 2.1 MB

Directory structure:
gitextract_22vvr93l/

├── .github/
│   └── workflows/
│       └── ci.yaml
├── .gitignore
├── .golangci.yml
├── AGENTS.md
├── LICENSE
├── Makefile
├── README.md
├── go.mod
├── go.sum
├── main.go
└── parser/
    ├── ast.go
    ├── ast_visitor.go
    ├── benchmark_test.go
    ├── format.go
    ├── format_test.go
    ├── helper.go
    ├── keyword.go
    ├── lexer.go
    ├── lexer_test.go
    ├── parse_system.go
    ├── parser_alter.go
    ├── parser_column.go
    ├── parser_common.go
    ├── parser_drop.go
    ├── parser_query.go
    ├── parser_table.go
    ├── parser_test.go
    ├── parser_view.go
    ├── set.go
    ├── set_test.go
    ├── testdata/
    │   ├── basic/
    │   │   ├── format/
    │   │   │   ├── beautify/
    │   │   │   │   ├── quantile_functions.sql
    │   │   │   │   ├── set_statement.sql
    │   │   │   │   ├── settings_statement.sql
    │   │   │   │   └── use_database.sql
    │   │   │   ├── quantile_functions.sql
    │   │   │   ├── set_statement.sql
    │   │   │   ├── settings_statement.sql
    │   │   │   └── use_database.sql
    │   │   ├── output/
    │   │   │   ├── quantile_functions.sql.golden.json
    │   │   │   ├── set_statement.sql.golden.json
    │   │   │   ├── settings_statement.sql.golden.json
    │   │   │   └── use_database.sql.golden.json
    │   │   ├── quantile_functions.sql
    │   │   ├── set_statement.sql
    │   │   ├── settings_statement.sql
    │   │   └── use_database.sql
    │   ├── benchdata/
    │   │   ├── posthog_huge_0.sql
    │   │   └── posthog_huge_1.sql
    │   ├── ddl/
    │   │   ├── alter_role.sql
    │   │   ├── alter_table_add_column.sql
    │   │   ├── alter_table_add_index.sql
    │   │   ├── alter_table_add_projection.sql
    │   │   ├── alter_table_add_projection_group_by_only.sql
    │   │   ├── alter_table_attach_partition.sql
    │   │   ├── alter_table_clear_column.sql
    │   │   ├── alter_table_clear_index.sql
    │   │   ├── alter_table_clear_projection.sql
    │   │   ├── alter_table_delete.sql
    │   │   ├── alter_table_delete_with_cluster.sql
    │   │   ├── alter_table_detach_partition.sql
    │   │   ├── alter_table_drop_column.sql
    │   │   ├── alter_table_drop_detach_partition.sql
    │   │   ├── alter_table_drop_index.sql
    │   │   ├── alter_table_drop_partition.sql
    │   │   ├── alter_table_drop_projection.sql
    │   │   ├── alter_table_freeze_no_specify_partition.sql
    │   │   ├── alter_table_freeze_partition.sql
    │   │   ├── alter_table_materialize_index.sql
    │   │   ├── alter_table_materialize_projection.sql
    │   │   ├── alter_table_modify_column.sql
    │   │   ├── alter_table_modify_column_remove.sql
    │   │   ├── alter_table_modify_setting.sql
    │   │   ├── alter_table_remove_ttl.sql
    │   │   ├── alter_table_rename_column.sql
    │   │   ├── alter_table_replace_partition.sql
    │   │   ├── alter_table_reset_multiple_settings.sql
    │   │   ├── alter_table_reset_setting.sql
    │   │   ├── alter_table_update.sql
    │   │   ├── alter_table_update_in_partition.sql
    │   │   ├── alter_table_update_with_cluster.sql
    │   │   ├── attach_table_basic.sql
    │   │   ├── bug_001.sql
    │   │   ├── check.sql
    │   │   ├── create_database.sql
    │   │   ├── create_database_replicated.sql
    │   │   ├── create_dictionary_basic.sql
    │   │   ├── create_dictionary_comprehensive.sql
    │   │   ├── create_dictionary_with_comment.sql
    │   │   ├── create_distributed_table.sql
    │   │   ├── create_function_simple.sql
    │   │   ├── create_live_view_basic.sql
    │   │   ├── create_materialized_view_basic.sql
    │   │   ├── create_materialized_view_with_comment_before_as.sql
    │   │   ├── create_materialized_view_with_definer.sql
    │   │   ├── create_materialized_view_with_empty_table_schema.sql
    │   │   ├── create_materialized_view_with_gcs.sql
    │   │   ├── create_materialized_view_with_refresh.sql
    │   │   ├── create_mv_with_not_op.sql
    │   │   ├── create_mv_with_order_by.sql
    │   │   ├── create_named_collection_basic.sql
    │   │   ├── create_named_collection_simple.sql
    │   │   ├── create_named_collection_with_cluster.sql
    │   │   ├── create_named_collection_with_overridable.sql
    │   │   ├── create_or_replace.sql
    │   │   ├── create_role.sql
    │   │   ├── create_table_as_remote_function.sql
    │   │   ├── create_table_basic.sql
    │   │   ├── create_table_codec_no_args.sql
    │   │   ├── create_table_json_typehints.sql
    │   │   ├── create_table_with_codec_delta.sql
    │   │   ├── create_table_with_enum_fields.sql
    │   │   ├── create_table_with_index.sql
    │   │   ├── create_table_with_keyword_partition_by.sql
    │   │   ├── create_table_with_null_engine.sql
    │   │   ├── create_table_with_nullable.sql
    │   │   ├── create_table_with_on_clsuter.sql
    │   │   ├── create_table_with_projection.sql
    │   │   ├── create_table_with_projection_group_by_only.sql
    │   │   ├── create_table_with_qbit.sql
    │   │   ├── create_table_with_sample_by.sql
    │   │   ├── create_table_with_ttl_policy.sql
    │   │   ├── create_table_with_tuple_fields.sql
    │   │   ├── create_table_with_uuid.sql
    │   │   ├── create_user.sql
    │   │   ├── create_view_basic.sql
    │   │   ├── create_view_on_cluster_with_uuid.sql
    │   │   ├── create_view_with_comment.sql
    │   │   ├── create_with_time_zone.sql
    │   │   ├── desc_table_with_table_keyword.sql
    │   │   ├── desc_table_without_table_keyword.sql
    │   │   ├── describe_table_with_table_keyword.sql
    │   │   ├── describe_table_without_table_keyword.sql
    │   │   ├── drop_database.sql
    │   │   ├── drop_role.sql
    │   │   ├── drop_table_basic.sql
    │   │   ├── drop_table_with_no_delay.sql
    │   │   ├── drop_table_with_on_clsuter.sql
    │   │   ├── format/
    │   │   │   ├── alter_role.sql
    │   │   │   ├── alter_table_add_column.sql
    │   │   │   ├── alter_table_add_index.sql
    │   │   │   ├── alter_table_add_projection.sql
    │   │   │   ├── alter_table_add_projection_group_by_only.sql
    │   │   │   ├── alter_table_attach_partition.sql
    │   │   │   ├── alter_table_clear_column.sql
    │   │   │   ├── alter_table_clear_index.sql
    │   │   │   ├── alter_table_clear_projection.sql
    │   │   │   ├── alter_table_delete.sql
    │   │   │   ├── alter_table_delete_with_cluster.sql
    │   │   │   ├── alter_table_detach_partition.sql
    │   │   │   ├── alter_table_drop_column.sql
    │   │   │   ├── alter_table_drop_detach_partition.sql
    │   │   │   ├── alter_table_drop_index.sql
    │   │   │   ├── alter_table_drop_partition.sql
    │   │   │   ├── alter_table_drop_projection.sql
    │   │   │   ├── alter_table_freeze_no_specify_partition.sql
    │   │   │   ├── alter_table_freeze_partition.sql
    │   │   │   ├── alter_table_materialize_index.sql
    │   │   │   ├── alter_table_materialize_projection.sql
    │   │   │   ├── alter_table_modify_column.sql
    │   │   │   ├── alter_table_modify_column_remove.sql
    │   │   │   ├── alter_table_modify_setting.sql
    │   │   │   ├── alter_table_remove_ttl.sql
    │   │   │   ├── alter_table_rename_column.sql
    │   │   │   ├── alter_table_replace_partition.sql
    │   │   │   ├── alter_table_reset_multiple_settings.sql
    │   │   │   ├── alter_table_reset_setting.sql
    │   │   │   ├── alter_table_update.sql
    │   │   │   ├── alter_table_update_in_partition.sql
    │   │   │   ├── alter_table_update_with_cluster.sql
    │   │   │   ├── attach_table_basic.sql
    │   │   │   ├── beautify/
    │   │   │   │   ├── alter_role.sql
    │   │   │   │   ├── alter_table_add_column.sql
    │   │   │   │   ├── alter_table_add_index.sql
    │   │   │   │   ├── alter_table_add_projection.sql
    │   │   │   │   ├── alter_table_add_projection_group_by_only.sql
    │   │   │   │   ├── alter_table_attach_partition.sql
    │   │   │   │   ├── alter_table_clear_column.sql
    │   │   │   │   ├── alter_table_clear_index.sql
    │   │   │   │   ├── alter_table_clear_projection.sql
    │   │   │   │   ├── alter_table_delete.sql
    │   │   │   │   ├── alter_table_delete_with_cluster.sql
    │   │   │   │   ├── alter_table_detach_partition.sql
    │   │   │   │   ├── alter_table_drop_column.sql
    │   │   │   │   ├── alter_table_drop_detach_partition.sql
    │   │   │   │   ├── alter_table_drop_index.sql
    │   │   │   │   ├── alter_table_drop_partition.sql
    │   │   │   │   ├── alter_table_drop_projection.sql
    │   │   │   │   ├── alter_table_freeze_no_specify_partition.sql
    │   │   │   │   ├── alter_table_freeze_partition.sql
    │   │   │   │   ├── alter_table_materialize_index.sql
    │   │   │   │   ├── alter_table_materialize_projection.sql
    │   │   │   │   ├── alter_table_modify_column.sql
    │   │   │   │   ├── alter_table_modify_column_remove.sql
    │   │   │   │   ├── alter_table_modify_setting.sql
    │   │   │   │   ├── alter_table_remove_ttl.sql
    │   │   │   │   ├── alter_table_rename_column.sql
    │   │   │   │   ├── alter_table_replace_partition.sql
    │   │   │   │   ├── alter_table_reset_multiple_settings.sql
    │   │   │   │   ├── alter_table_reset_setting.sql
    │   │   │   │   ├── alter_table_update.sql
    │   │   │   │   ├── alter_table_update_in_partition.sql
    │   │   │   │   ├── alter_table_update_with_cluster.sql
    │   │   │   │   ├── attach_table_basic.sql
    │   │   │   │   ├── bug_001.sql
    │   │   │   │   ├── check.sql
    │   │   │   │   ├── create_database.sql
    │   │   │   │   ├── create_database_replicated.sql
    │   │   │   │   ├── create_dictionary_basic.sql
    │   │   │   │   ├── create_dictionary_comprehensive.sql
    │   │   │   │   ├── create_dictionary_with_comment.sql
    │   │   │   │   ├── create_distributed_table.sql
    │   │   │   │   ├── create_function_simple.sql
    │   │   │   │   ├── create_live_view_basic.sql
    │   │   │   │   ├── create_materialized_view_basic.sql
    │   │   │   │   ├── create_materialized_view_with_comment_before_as.sql
    │   │   │   │   ├── create_materialized_view_with_definer.sql
    │   │   │   │   ├── create_materialized_view_with_empty_table_schema.sql
    │   │   │   │   ├── create_materialized_view_with_gcs.sql
    │   │   │   │   ├── create_materialized_view_with_refresh.sql
    │   │   │   │   ├── create_mv_with_not_op.sql
    │   │   │   │   ├── create_mv_with_order_by.sql
    │   │   │   │   ├── create_named_collection_basic.sql
    │   │   │   │   ├── create_named_collection_simple.sql
    │   │   │   │   ├── create_named_collection_with_cluster.sql
    │   │   │   │   ├── create_named_collection_with_overridable.sql
    │   │   │   │   ├── create_or_replace.sql
    │   │   │   │   ├── create_role.sql
    │   │   │   │   ├── create_table_as_remote_function.sql
    │   │   │   │   ├── create_table_basic.sql
    │   │   │   │   ├── create_table_codec_no_args.sql
    │   │   │   │   ├── create_table_json_typehints.sql
    │   │   │   │   ├── create_table_with_codec_delta.sql
    │   │   │   │   ├── create_table_with_enum_fields.sql
    │   │   │   │   ├── create_table_with_index.sql
    │   │   │   │   ├── create_table_with_keyword_partition_by.sql
    │   │   │   │   ├── create_table_with_null_engine.sql
    │   │   │   │   ├── create_table_with_nullable.sql
    │   │   │   │   ├── create_table_with_on_clsuter.sql
    │   │   │   │   ├── create_table_with_projection.sql
    │   │   │   │   ├── create_table_with_projection_group_by_only.sql
    │   │   │   │   ├── create_table_with_qbit.sql
    │   │   │   │   ├── create_table_with_sample_by.sql
    │   │   │   │   ├── create_table_with_ttl_policy.sql
    │   │   │   │   ├── create_table_with_tuple_fields.sql
    │   │   │   │   ├── create_table_with_uuid.sql
    │   │   │   │   ├── create_user.sql
    │   │   │   │   ├── create_view_basic.sql
    │   │   │   │   ├── create_view_on_cluster_with_uuid.sql
    │   │   │   │   ├── create_view_with_comment.sql
    │   │   │   │   ├── create_with_time_zone.sql
    │   │   │   │   ├── desc_table_with_table_keyword.sql
    │   │   │   │   ├── desc_table_without_table_keyword.sql
    │   │   │   │   ├── describe_table_with_table_keyword.sql
    │   │   │   │   ├── describe_table_without_table_keyword.sql
    │   │   │   │   ├── drop_database.sql
    │   │   │   │   ├── drop_role.sql
    │   │   │   │   ├── drop_table_basic.sql
    │   │   │   │   ├── drop_table_with_no_delay.sql
    │   │   │   │   ├── drop_table_with_on_clsuter.sql
    │   │   │   │   ├── grant_privilege.sql
    │   │   │   │   ├── optimize.sql
    │   │   │   │   ├── rename.sql
    │   │   │   │   ├── show_create_table.sql
    │   │   │   │   ├── show_databases.sql
    │   │   │   │   ├── show_databases_comprehensive.sql
    │   │   │   │   ├── show_databases_format.sql
    │   │   │   │   ├── show_databases_format_string.sql
    │   │   │   │   ├── show_databases_ilike.sql
    │   │   │   │   ├── show_databases_like.sql
    │   │   │   │   ├── show_databases_limit.sql
    │   │   │   │   ├── show_databases_not_ilike.sql
    │   │   │   │   ├── show_databases_not_like.sql
    │   │   │   │   ├── show_databases_outfile.sql
    │   │   │   │   ├── show_tables.sql
    │   │   │   │   ├── systems.sql
    │   │   │   │   ├── truncate_table_basic.sql
    │   │   │   │   └── truncate_temporary_table_on_clsuter.sql
    │   │   │   ├── bug_001.sql
    │   │   │   ├── check.sql
    │   │   │   ├── create_database.sql
    │   │   │   ├── create_database_replicated.sql
    │   │   │   ├── create_dictionary_basic.sql
    │   │   │   ├── create_dictionary_comprehensive.sql
    │   │   │   ├── create_dictionary_with_comment.sql
    │   │   │   ├── create_distributed_table.sql
    │   │   │   ├── create_function_simple.sql
    │   │   │   ├── create_live_view_basic.sql
    │   │   │   ├── create_materialized_view_basic.sql
    │   │   │   ├── create_materialized_view_with_comment_before_as.sql
    │   │   │   ├── create_materialized_view_with_definer.sql
    │   │   │   ├── create_materialized_view_with_empty_table_schema.sql
    │   │   │   ├── create_materialized_view_with_gcs.sql
    │   │   │   ├── create_materialized_view_with_refresh.sql
    │   │   │   ├── create_mv_with_not_op.sql
    │   │   │   ├── create_mv_with_order_by.sql
    │   │   │   ├── create_named_collection_basic.sql
    │   │   │   ├── create_named_collection_simple.sql
    │   │   │   ├── create_named_collection_with_cluster.sql
    │   │   │   ├── create_named_collection_with_overridable.sql
    │   │   │   ├── create_or_replace.sql
    │   │   │   ├── create_role.sql
    │   │   │   ├── create_table_as_remote_function.sql
    │   │   │   ├── create_table_basic.sql
    │   │   │   ├── create_table_codec_no_args.sql
    │   │   │   ├── create_table_json_typehints.sql
    │   │   │   ├── create_table_with_codec_delta.sql
    │   │   │   ├── create_table_with_enum_fields.sql
    │   │   │   ├── create_table_with_index.sql
    │   │   │   ├── create_table_with_keyword_partition_by.sql
    │   │   │   ├── create_table_with_null_engine.sql
    │   │   │   ├── create_table_with_nullable.sql
    │   │   │   ├── create_table_with_on_clsuter.sql
    │   │   │   ├── create_table_with_projection.sql
    │   │   │   ├── create_table_with_projection_group_by_only.sql
    │   │   │   ├── create_table_with_qbit.sql
    │   │   │   ├── create_table_with_sample_by.sql
    │   │   │   ├── create_table_with_ttl_policy.sql
    │   │   │   ├── create_table_with_tuple_fields.sql
    │   │   │   ├── create_table_with_uuid.sql
    │   │   │   ├── create_user.sql
    │   │   │   ├── create_view_basic.sql
    │   │   │   ├── create_view_on_cluster_with_uuid.sql
    │   │   │   ├── create_view_with_comment.sql
    │   │   │   ├── create_with_time_zone.sql
    │   │   │   ├── desc_table_with_table_keyword.sql
    │   │   │   ├── desc_table_without_table_keyword.sql
    │   │   │   ├── describe_table_with_table_keyword.sql
    │   │   │   ├── describe_table_without_table_keyword.sql
    │   │   │   ├── drop_database.sql
    │   │   │   ├── drop_role.sql
    │   │   │   ├── drop_table_basic.sql
    │   │   │   ├── drop_table_with_no_delay.sql
    │   │   │   ├── drop_table_with_on_clsuter.sql
    │   │   │   ├── grant_privilege.sql
    │   │   │   ├── optimize.sql
    │   │   │   ├── rename.sql
    │   │   │   ├── show_create_table.sql
    │   │   │   ├── show_databases.sql
    │   │   │   ├── show_databases_comprehensive.sql
    │   │   │   ├── show_databases_format.sql
    │   │   │   ├── show_databases_format_string.sql
    │   │   │   ├── show_databases_ilike.sql
    │   │   │   ├── show_databases_like.sql
    │   │   │   ├── show_databases_limit.sql
    │   │   │   ├── show_databases_not_ilike.sql
    │   │   │   ├── show_databases_not_like.sql
    │   │   │   ├── show_databases_outfile.sql
    │   │   │   ├── show_tables.sql
    │   │   │   ├── systems.sql
    │   │   │   ├── truncate_table_basic.sql
    │   │   │   └── truncate_temporary_table_on_clsuter.sql
    │   │   ├── grant_privilege.sql
    │   │   ├── optimize.sql
    │   │   ├── output/
    │   │   │   ├── alter_role.sql.golden.json
    │   │   │   ├── alter_table_add_column.sql.golden.json
    │   │   │   ├── alter_table_add_index.sql.golden.json
    │   │   │   ├── alter_table_add_projection.sql.golden.json
    │   │   │   ├── alter_table_add_projection_group_by_only.sql.golden.json
    │   │   │   ├── alter_table_attach_partition.sql.golden.json
    │   │   │   ├── alter_table_clear_column.sql.golden.json
    │   │   │   ├── alter_table_clear_index.sql.golden.json
    │   │   │   ├── alter_table_clear_projection.sql.golden.json
    │   │   │   ├── alter_table_delete.sql.golden.json
    │   │   │   ├── alter_table_delete_with_cluster.sql.golden.json
    │   │   │   ├── alter_table_detach_partition.sql.golden.json
    │   │   │   ├── alter_table_drop_column.sql.golden.json
    │   │   │   ├── alter_table_drop_detach_partition.sql.golden.json
    │   │   │   ├── alter_table_drop_index.sql.golden.json
    │   │   │   ├── alter_table_drop_partition.sql.golden.json
    │   │   │   ├── alter_table_drop_projection.sql.golden.json
    │   │   │   ├── alter_table_freeze_no_specify_partition.sql.golden.json
    │   │   │   ├── alter_table_freeze_partition.sql.golden.json
    │   │   │   ├── alter_table_materialize_index.sql.golden.json
    │   │   │   ├── alter_table_materialize_projection.sql.golden.json
    │   │   │   ├── alter_table_modify_column.sql.golden.json
    │   │   │   ├── alter_table_modify_column_remove.sql.golden.json
    │   │   │   ├── alter_table_modify_setting.sql.golden.json
    │   │   │   ├── alter_table_remove_ttl.sql.golden.json
    │   │   │   ├── alter_table_rename_column.sql.golden.json
    │   │   │   ├── alter_table_replace_partition.sql.golden.json
    │   │   │   ├── alter_table_reset_multiple_settings.sql.golden.json
    │   │   │   ├── alter_table_reset_setting.sql.golden.json
    │   │   │   ├── alter_table_update.sql.golden.json
    │   │   │   ├── alter_table_update_in_partition.sql.golden.json
    │   │   │   ├── alter_table_update_with_cluster.sql.golden.json
    │   │   │   ├── attach_table_basic.sql.golden.json
    │   │   │   ├── bug_001.sql.golden.json
    │   │   │   ├── check.sql.golden.json
    │   │   │   ├── create_database.sql.golden.json
    │   │   │   ├── create_database_replicated.sql.golden.json
    │   │   │   ├── create_dictionary_basic.sql.golden.json
    │   │   │   ├── create_dictionary_comprehensive.sql.golden.json
    │   │   │   ├── create_dictionary_with_comment.sql.golden.json
    │   │   │   ├── create_distributed_table.sql.golden.json
    │   │   │   ├── create_function_simple.sql.golden.json
    │   │   │   ├── create_live_view_basic.sql.golden.json
    │   │   │   ├── create_materialized_view_basic.sql.golden.json
    │   │   │   ├── create_materialized_view_with_comment_before_as.sql.golden.json
    │   │   │   ├── create_materialized_view_with_definer.sql.golden.json
    │   │   │   ├── create_materialized_view_with_empty_table_schema.sql.golden.json
    │   │   │   ├── create_materialized_view_with_gcs.sql.golden.json
    │   │   │   ├── create_materialized_view_with_refresh.sql.golden.json
    │   │   │   ├── create_mv_with_not_op.sql.golden.json
    │   │   │   ├── create_mv_with_order_by.sql.golden.json
    │   │   │   ├── create_named_collection_basic.sql.golden.json
    │   │   │   ├── create_named_collection_simple.sql.golden.json
    │   │   │   ├── create_named_collection_with_cluster.sql.golden.json
    │   │   │   ├── create_named_collection_with_overridable.sql.golden.json
    │   │   │   ├── create_or_replace.sql.golden.json
    │   │   │   ├── create_role.sql.golden.json
    │   │   │   ├── create_table_as_remote_function.sql.golden.json
    │   │   │   ├── create_table_basic.sql.golden.json
    │   │   │   ├── create_table_codec_no_args.sql.golden.json
    │   │   │   ├── create_table_json_typehints.sql.golden.json
    │   │   │   ├── create_table_with_codec_delta.sql.golden.json
    │   │   │   ├── create_table_with_enum_fields.sql.golden.json
    │   │   │   ├── create_table_with_index.sql.golden.json
    │   │   │   ├── create_table_with_keyword_partition_by.sql.golden.json
    │   │   │   ├── create_table_with_null_engine.sql.golden.json
    │   │   │   ├── create_table_with_nullable.sql.golden.json
    │   │   │   ├── create_table_with_on_clsuter.sql.golden.json
    │   │   │   ├── create_table_with_projection.sql.golden.json
    │   │   │   ├── create_table_with_projection_group_by_only.sql.golden.json
    │   │   │   ├── create_table_with_qbit.sql.golden.json
    │   │   │   ├── create_table_with_sample_by.sql.golden.json
    │   │   │   ├── create_table_with_ttl_policy.sql.golden.json
    │   │   │   ├── create_table_with_tuple_fields.sql.golden.json
    │   │   │   ├── create_table_with_uuid.sql.golden.json
    │   │   │   ├── create_user.sql.golden.json
    │   │   │   ├── create_view_basic.sql.golden.json
    │   │   │   ├── create_view_on_cluster_with_uuid.sql.golden.json
    │   │   │   ├── create_view_with_comment.sql.golden.json
    │   │   │   ├── create_with_time_zone.sql.golden.json
    │   │   │   ├── desc_table_with_table_keyword.sql.golden.json
    │   │   │   ├── desc_table_without_table_keyword.sql.golden.json
    │   │   │   ├── describe_table_with_table_keyword.sql.golden.json
    │   │   │   ├── describe_table_without_table_keyword.sql.golden.json
    │   │   │   ├── drop_database.sql.golden.json
    │   │   │   ├── drop_role.sql.golden.json
    │   │   │   ├── drop_table_basic.sql.golden.json
    │   │   │   ├── drop_table_with_no_delay.sql.golden.json
    │   │   │   ├── drop_table_with_on_clsuter.sql.golden.json
    │   │   │   ├── grant_privilege.sql.golden.json
    │   │   │   ├── optimize.sql.golden.json
    │   │   │   ├── rename.sql.golden.json
    │   │   │   ├── show_create_table.sql.golden.json
    │   │   │   ├── show_databases.sql.golden.json
    │   │   │   ├── show_databases_comprehensive.sql.golden.json
    │   │   │   ├── show_databases_format.sql.golden.json
    │   │   │   ├── show_databases_format_string.sql.golden.json
    │   │   │   ├── show_databases_ilike.sql.golden.json
    │   │   │   ├── show_databases_like.sql.golden.json
    │   │   │   ├── show_databases_limit.sql.golden.json
    │   │   │   ├── show_databases_not_ilike.sql.golden.json
    │   │   │   ├── show_databases_not_like.sql.golden.json
    │   │   │   ├── show_databases_outfile.sql.golden.json
    │   │   │   ├── show_tables.sql.golden.json
    │   │   │   ├── systems.sql.golden.json
    │   │   │   ├── truncate_table_basic.sql.golden.json
    │   │   │   └── truncate_temporary_table_on_clsuter.sql.golden.json
    │   │   ├── rename.sql
    │   │   ├── show_create_table.sql
    │   │   ├── show_databases.sql
    │   │   ├── show_databases_comprehensive.sql
    │   │   ├── show_databases_format.sql
    │   │   ├── show_databases_format_string.sql
    │   │   ├── show_databases_ilike.sql
    │   │   ├── show_databases_like.sql
    │   │   ├── show_databases_limit.sql
    │   │   ├── show_databases_not_ilike.sql
    │   │   ├── show_databases_not_like.sql
    │   │   ├── show_databases_outfile.sql
    │   │   ├── show_tables.sql
    │   │   ├── systems.sql
    │   │   ├── truncate_table_basic.sql
    │   │   └── truncate_temporary_table_on_clsuter.sql
    │   ├── dml/
    │   │   ├── alter_table_modify_query.sql
    │   │   ├── alter_table_modify_ttl_multiple.sql
    │   │   ├── alter_table_with_comment.sql
    │   │   ├── alter_table_with_modify_remove_ttl.sql
    │   │   ├── alter_table_with_modify_ttl.sql
    │   │   ├── create_column_with_ttl.sql
    │   │   ├── delete_from.sql
    │   │   ├── format/
    │   │   │   ├── alter_table_modify_query.sql
    │   │   │   ├── alter_table_modify_ttl_multiple.sql
    │   │   │   ├── alter_table_with_comment.sql
    │   │   │   ├── alter_table_with_modify_remove_ttl.sql
    │   │   │   ├── alter_table_with_modify_ttl.sql
    │   │   │   ├── beautify/
    │   │   │   │   ├── alter_table_modify_query.sql
    │   │   │   │   ├── alter_table_modify_ttl_multiple.sql
    │   │   │   │   ├── alter_table_with_comment.sql
    │   │   │   │   ├── alter_table_with_modify_remove_ttl.sql
    │   │   │   │   ├── alter_table_with_modify_ttl.sql
    │   │   │   │   ├── create_column_with_ttl.sql
    │   │   │   │   ├── delete_from.sql
    │   │   │   │   ├── insert_select_without_from.sql
    │   │   │   │   ├── insert_values.sql
    │   │   │   │   ├── insert_with_format.sql
    │   │   │   │   ├── insert_with_keyword_placeholder.sql
    │   │   │   │   ├── insert_with_placeholder.sql
    │   │   │   │   └── insert_with_select.sql
    │   │   │   ├── create_column_with_ttl.sql
    │   │   │   ├── delete_from.sql
    │   │   │   ├── insert_select_without_from.sql
    │   │   │   ├── insert_values.sql
    │   │   │   ├── insert_with_format.sql
    │   │   │   ├── insert_with_keyword_placeholder.sql
    │   │   │   ├── insert_with_placeholder.sql
    │   │   │   └── insert_with_select.sql
    │   │   ├── insert_select_without_from.sql
    │   │   ├── insert_values.sql
    │   │   ├── insert_with_format.sql
    │   │   ├── insert_with_keyword_placeholder.sql
    │   │   ├── insert_with_placeholder.sql
    │   │   ├── insert_with_select.sql
    │   │   └── output/
    │   │       ├── alter_table_modify_query.sql.golden.json
    │   │       ├── alter_table_modify_ttl_multiple.sql.golden.json
    │   │       ├── alter_table_with_comment.sql.golden.json
    │   │       ├── alter_table_with_modify_remove_ttl.sql.golden.json
    │   │       ├── alter_table_with_modify_ttl.sql.golden.json
    │   │       ├── create_column_with_ttl.sql.golden.json
    │   │       ├── delete_from.sql.golden.json
    │   │       ├── insert_select_without_from.sql.golden.json
    │   │       ├── insert_values.sql.golden.json
    │   │       ├── insert_with_format.sql.golden.json
    │   │       ├── insert_with_keyword_placeholder.sql.golden.json
    │   │       ├── insert_with_placeholder.sql.golden.json
    │   │       └── insert_with_select.sql.golden.json
    │   └── query/
    │       ├── access_tuple_with_dot.sql
    │       ├── compatible/
    │       │   └── 1_stateful/
    │       │       ├── 00001_count_hits.sql
    │       │       ├── 00002_count_visits.sql
    │       │       ├── 00004_top_counters.sql
    │       │       ├── 00005_filtering.sql
    │       │       ├── 00006_agregates.sql
    │       │       ├── 00007_uniq.sql
    │       │       ├── 00008_uniq.sql
    │       │       ├── 00009_uniq_distributed.sql
    │       │       ├── 00010_quantiles_segfault.sql
    │       │       ├── 00011_sorting.sql
    │       │       ├── 00012_sorting_distributed.sql
    │       │       ├── 00013_sorting_of_nested.sql
    │       │       ├── 00014_filtering_arrays.sql
    │       │       ├── 00015_totals_and_no_aggregate_functions.sql
    │       │       ├── 00016_any_if_distributed_cond_always_false.sql
    │       │       ├── 00017_aggregation_uninitialized_memory.sql
    │       │       ├── 00020_distinct_order_by_distributed.sql
    │       │       ├── 00021_1_select_with_in.sql
    │       │       ├── 00021_2_select_with_in.sql
    │       │       ├── 00021_3_select_with_in.sql
    │       │       ├── 00022_merge_prewhere.sql
    │       │       ├── 00023_totals_limit.sql
    │       │       ├── 00024_random_counters.sql
    │       │       ├── 00030_array_enumerate_uniq.sql
    │       │       ├── 00031_array_enumerate_uniq.sql
    │       │       ├── 00032_aggregate_key64.sql
    │       │       ├── 00033_aggregate_key_string.sql
    │       │       ├── 00034_aggregate_key_fixed_string.sql
    │       │       ├── 00035_aggregate_keys128.sql
    │       │       ├── 00036_aggregate_hashed.sql
    │       │       ├── 00037_uniq_state_merge1.sql
    │       │       ├── 00038_uniq_state_merge2.sql
    │       │       ├── 00039_primary_key.sql
    │       │       ├── 00040_aggregating_materialized_view.sql
    │       │       ├── 00041_aggregating_materialized_view.sql
    │       │       ├── 00042_any_left_join.sql
    │       │       ├── 00043_any_left_join.sql
    │       │       ├── 00044_any_left_join_string.sql
    │       │       ├── 00045_uniq_upto.sql
    │       │       ├── 00046_uniq_upto_distributed.sql
    │       │       ├── 00047_bar.sql
    │       │       ├── 00048_min_max.sql
    │       │       ├── 00049_max_string_if.sql
    │       │       ├── 00050_min_max.sql
    │       │       ├── 00051_min_max_array.sql
    │       │       ├── 00052_group_by_in.sql
    │       │       ├── 00053_replicate_segfault.sql
    │       │       ├── 00054_merge_tree_partitions.sql
    │       │       ├── 00055_index_and_not.sql
    │       │       ├── 00056_view.sql
    │       │       ├── 00059_merge_sorting_empty_array_joined.sql
    │       │       ├── 00060_move_to_prewhere_and_sets.sql
    │       │       ├── 00061_storage_buffer.sql
    │       │       ├── 00062_loyalty.sql
    │       │       ├── 00063_loyalty_joins.sql
    │       │       ├── 00065_loyalty_with_storage_join.sql
    │       │       ├── 00066_sorting_distributed_many_replicas.sql
    │       │       ├── 00067_union_all.sql
    │       │       ├── 00068_subquery_in_prewhere.sql
    │       │       ├── 00069_duplicate_aggregation_keys.sql
    │       │       ├── 00071_merge_tree_optimize_aio.sql
    │       │       ├── 00072_compare_date_and_string_index.sql
    │       │       ├── 00073_uniq_array.sql
    │       │       ├── 00074_full_join.sql
    │       │       ├── 00075_left_array_join.sql
    │       │       ├── 00076_system_columns_bytes.sql
    │       │       ├── 00077_log_tinylog_stripelog.sql
    │       │       ├── 00078_group_by_arrays.sql
    │       │       ├── 00079_array_join_not_used_joined_column.sql
    │       │       ├── 00080_array_join_and_union.sql
    │       │       ├── 00081_group_by_without_key_and_totals.sql
    │       │       ├── 00082_quantiles.sql
    │       │       ├── 00083_array_filter.sql
    │       │       ├── 00084_external_aggregation.sql
    │       │       ├── 00085_monotonic_evaluation_segfault.sql
    │       │       ├── 00086_array_reduce.sql
    │       │       ├── 00087_where_0.sql
    │       │       ├── 00088_global_in_one_shard_and_rows_before_limit.sql
    │       │       ├── 00089_position_functions_with_non_constant_arg.sql
    │       │       ├── 00091_prewhere_two_conditions.sql
    │       │       ├── 00093_prewhere_array_join.sql
    │       │       ├── 00094_order_by_array_join_limit.sql
    │       │       ├── 00095_hyperscan_profiler.sql
    │       │       ├── 00097_constexpr_in_index.sql
    │       │       ├── 00139_like.sql
    │       │       ├── 00140_rename.sql
    │       │       ├── 00141_transform.sql
    │       │       ├── 00142_system_columns.sql
    │       │       ├── 00143_transform_non_const_default.sql
    │       │       ├── 00144_functions_of_aggregation_states.sql
    │       │       ├── 00145_aggregate_functions_statistics.sql
    │       │       ├── 00146_aggregate_function_uniq.sql
    │       │       ├── 00147_global_in_aggregate_function.sql
    │       │       ├── 00148_monotonic_functions_and_index.sql
    │       │       ├── 00149_quantiles_timing_distributed.sql
    │       │       ├── 00150_quantiles_timing_precision.sql
    │       │       ├── 00151_order_by_read_in_order.sql
    │       │       ├── 00152_insert_different_granularity.sql
    │       │       ├── 00153_aggregate_arena_race.sql
    │       │       ├── 00154_avro.sql
    │       │       ├── 00156_max_execution_speed_sample_merge.sql
    │       │       ├── 00157_cache_dictionary.sql
    │       │       ├── 00158_cache_dictionary_has.sql
    │       │       ├── 00160_decode_xml_component.sql
    │       │       ├── 00162_mmap_compression_none.sql
    │       │       ├── 00164_quantileBfloat16.sql
    │       │       ├── 00165_jit_aggregate_functions.sql
    │       │       ├── 00166_explain_estimate.sql
    │       │       ├── 00167_read_bytes_from_fs.sql
    │       │       ├── 00169_contingency.sql
    │       │       ├── 00170_s3_cache.sql
    │       │       ├── 00171_grouping_aggregated_transform_bug.sql
    │       │       ├── 00172_early_constant_folding.sql
    │       │       ├── 00173_group_by_use_nulls.sql
    │       │       ├── 00174_distinct_in_order.sql
    │       │       ├── 00175_counting_resources_in_subqueries.sql
    │       │       ├── 00176_distinct_limit_by_limit_bug_43377.sql
    │       │       └── 00177_select_from_gcs.sql
    │       ├── create_window_view.sql
    │       ├── format/
    │       │   ├── access_tuple_with_dot.sql
    │       │   ├── beautify/
    │       │   │   ├── access_tuple_with_dot.sql
    │       │   │   ├── create_window_view.sql
    │       │   │   ├── query_with_expr_compare.sql
    │       │   │   ├── select_case_multiple_when.sql
    │       │   │   ├── select_case_when_exists.sql
    │       │   │   ├── select_cast.sql
    │       │   │   ├── select_column_alias_string.sql
    │       │   │   ├── select_concat_expr.sql
    │       │   │   ├── select_expr.sql
    │       │   │   ├── select_extract_with_regex.sql
    │       │   │   ├── select_item_with_modifiers.sql
    │       │   │   ├── select_json_type.sql
    │       │   │   ├── select_keyword_alias_no_as.sql
    │       │   │   ├── select_order_by_timestamp.sql
    │       │   │   ├── select_order_by_with_fill_basic.sql
    │       │   │   ├── select_order_by_with_fill_from_to.sql
    │       │   │   ├── select_order_by_with_fill_interpolate.sql
    │       │   │   ├── select_order_by_with_fill_interpolate_no_columns.sql
    │       │   │   ├── select_order_by_with_fill_staleness.sql
    │       │   │   ├── select_order_by_with_fill_step.sql
    │       │   │   ├── select_simple.sql
    │       │   │   ├── select_simple_field_alias.sql
    │       │   │   ├── select_simple_with_bracket.sql
    │       │   │   ├── select_simple_with_cte_with_column_aliases.sql
    │       │   │   ├── select_simple_with_group_by_with_cube_totals.sql
    │       │   │   ├── select_simple_with_is_not_null.sql
    │       │   │   ├── select_simple_with_is_null.sql
    │       │   │   ├── select_simple_with_limit.sql
    │       │   │   ├── select_simple_with_top_clause.sql
    │       │   │   ├── select_simple_with_with_clause.sql
    │       │   │   ├── select_table_alias_without_keyword.sql
    │       │   │   ├── select_table_function_with_query.sql
    │       │   │   ├── select_when_condition.sql
    │       │   │   ├── select_window_comprehensive.sql
    │       │   │   ├── select_window_cte.sql
    │       │   │   ├── select_window_keyword_name_in_parens.sql
    │       │   │   ├── select_window_named_in_parens.sql
    │       │   │   ├── select_window_named_reference_extensions.sql
    │       │   │   ├── select_window_params.sql
    │       │   │   ├── select_with_distinct.sql
    │       │   │   ├── select_with_distinct_keyword.sql
    │       │   │   ├── select_with_distinct_on_dotted_columns.sql
    │       │   │   ├── select_with_distinct_on_keyword.sql
    │       │   │   ├── select_with_group_by.sql
    │       │   │   ├── select_with_join_only.sql
    │       │   │   ├── select_with_keyword_in_group_by.sql
    │       │   │   ├── select_with_keyword_placeholder.sql
    │       │   │   ├── select_with_left_join.sql
    │       │   │   ├── select_with_literal_table_name.sql
    │       │   │   ├── select_with_multi_array_and_inner_join.sql
    │       │   │   ├── select_with_multi_array_join.sql
    │       │   │   ├── select_with_multi_except.sql
    │       │   │   ├── select_with_multi_join.sql
    │       │   │   ├── select_with_multi_line_comment.sql
    │       │   │   ├── select_with_multi_union.sql
    │       │   │   ├── select_with_multi_union_distinct.sql
    │       │   │   ├── select_with_number_field.sql
    │       │   │   ├── select_with_placeholder.sql
    │       │   │   ├── select_with_query_parameter.sql
    │       │   │   ├── select_with_settings_additional_table_filters.sql
    │       │   │   ├── select_with_single_quote_table.sql
    │       │   │   ├── select_with_string_expr.sql
    │       │   │   ├── select_with_union_distinct.sql
    │       │   │   ├── select_with_variable.sql
    │       │   │   ├── select_with_window_function.sql
    │       │   │   ├── select_without_from_where.sql
    │       │   │   └── set_simple.sql
    │       │   ├── create_window_view.sql
    │       │   ├── query_with_expr_compare.sql
    │       │   ├── select_case_multiple_when.sql
    │       │   ├── select_case_when_exists.sql
    │       │   ├── select_cast.sql
    │       │   ├── select_column_alias_string.sql
    │       │   ├── select_concat_expr.sql
    │       │   ├── select_expr.sql
    │       │   ├── select_extract_with_regex.sql
    │       │   ├── select_item_with_modifiers.sql
    │       │   ├── select_json_type.sql
    │       │   ├── select_keyword_alias_no_as.sql
    │       │   ├── select_order_by_timestamp.sql
    │       │   ├── select_order_by_with_fill_basic.sql
    │       │   ├── select_order_by_with_fill_from_to.sql
    │       │   ├── select_order_by_with_fill_interpolate.sql
    │       │   ├── select_order_by_with_fill_interpolate_no_columns.sql
    │       │   ├── select_order_by_with_fill_staleness.sql
    │       │   ├── select_order_by_with_fill_step.sql
    │       │   ├── select_simple.sql
    │       │   ├── select_simple_field_alias.sql
    │       │   ├── select_simple_with_bracket.sql
    │       │   ├── select_simple_with_cte_with_column_aliases.sql
    │       │   ├── select_simple_with_group_by_with_cube_totals.sql
    │       │   ├── select_simple_with_is_not_null.sql
    │       │   ├── select_simple_with_is_null.sql
    │       │   ├── select_simple_with_limit.sql
    │       │   ├── select_simple_with_top_clause.sql
    │       │   ├── select_simple_with_with_clause.sql
    │       │   ├── select_table_alias_without_keyword.sql
    │       │   ├── select_table_function_with_query.sql
    │       │   ├── select_when_condition.sql
    │       │   ├── select_window_comprehensive.sql
    │       │   ├── select_window_cte.sql
    │       │   ├── select_window_keyword_name_in_parens.sql
    │       │   ├── select_window_named_in_parens.sql
    │       │   ├── select_window_named_reference_extensions.sql
    │       │   ├── select_window_params.sql
    │       │   ├── select_with_distinct.sql
    │       │   ├── select_with_distinct_keyword.sql
    │       │   ├── select_with_distinct_on_dotted_columns.sql
    │       │   ├── select_with_distinct_on_keyword.sql
    │       │   ├── select_with_group_by.sql
    │       │   ├── select_with_join_only.sql
    │       │   ├── select_with_keyword_in_group_by.sql
    │       │   ├── select_with_keyword_placeholder.sql
    │       │   ├── select_with_left_join.sql
    │       │   ├── select_with_literal_table_name.sql
    │       │   ├── select_with_multi_array_and_inner_join.sql
    │       │   ├── select_with_multi_array_join.sql
    │       │   ├── select_with_multi_except.sql
    │       │   ├── select_with_multi_join.sql
    │       │   ├── select_with_multi_line_comment.sql
    │       │   ├── select_with_multi_union.sql
    │       │   ├── select_with_multi_union_distinct.sql
    │       │   ├── select_with_number_field.sql
    │       │   ├── select_with_placeholder.sql
    │       │   ├── select_with_query_parameter.sql
    │       │   ├── select_with_settings_additional_table_filters.sql
    │       │   ├── select_with_single_quote_table.sql
    │       │   ├── select_with_string_expr.sql
    │       │   ├── select_with_union_distinct.sql
    │       │   ├── select_with_variable.sql
    │       │   ├── select_with_window_function.sql
    │       │   ├── select_without_from_where.sql
    │       │   └── set_simple.sql
    │       ├── output/
    │       │   ├── access_tuple_with_dot.sql.golden.json
    │       │   ├── create_window_view.sql.golden.json
    │       │   ├── query_with_expr_compare.sql.golden.json
    │       │   ├── select_case_multiple_when.sql.golden.json
    │       │   ├── select_case_when_exists.sql.golden.json
    │       │   ├── select_cast.sql.golden.json
    │       │   ├── select_column_alias_string.sql.golden.json
    │       │   ├── select_concat_expr.sql.golden.json
    │       │   ├── select_expr.sql.golden.json
    │       │   ├── select_extract_with_regex.sql.golden.json
    │       │   ├── select_item_with_modifiers.sql.golden.json
    │       │   ├── select_json_type.sql.golden.json
    │       │   ├── select_keyword_alias_no_as.sql.golden.json
    │       │   ├── select_order_by_timestamp.sql.golden.json
    │       │   ├── select_order_by_with_fill_basic.sql.golden.json
    │       │   ├── select_order_by_with_fill_from_to.sql.golden.json
    │       │   ├── select_order_by_with_fill_interpolate.sql.golden.json
    │       │   ├── select_order_by_with_fill_interpolate_no_columns.sql.golden.json
    │       │   ├── select_order_by_with_fill_staleness.sql.golden.json
    │       │   ├── select_order_by_with_fill_step.sql.golden.json
    │       │   ├── select_simple.sql.golden.json
    │       │   ├── select_simple_field_alias.sql.golden.json
    │       │   ├── select_simple_with_bracket.sql.golden.json
    │       │   ├── select_simple_with_cte_with_column_aliases.sql.golden.json
    │       │   ├── select_simple_with_group_by_with_cube_totals.sql.golden.json
    │       │   ├── select_simple_with_is_not_null.sql.golden.json
    │       │   ├── select_simple_with_is_null.sql.golden.json
    │       │   ├── select_simple_with_limit.sql.golden.json
    │       │   ├── select_simple_with_top_clause.sql.golden.json
    │       │   ├── select_simple_with_with_clause.sql.golden.json
    │       │   ├── select_table_alias_without_keyword.sql.golden.json
    │       │   ├── select_table_function_with_query.sql.golden.json
    │       │   ├── select_when_condition.sql.golden.json
    │       │   ├── select_window_comprehensive.sql.golden.json
    │       │   ├── select_window_cte.sql.golden.json
    │       │   ├── select_window_keyword_name_in_parens.sql.golden.json
    │       │   ├── select_window_named_in_parens.sql.golden.json
    │       │   ├── select_window_named_reference_extensions.sql.golden.json
    │       │   ├── select_window_params.sql.golden.json
    │       │   ├── select_with_distinct.sql.golden.json
    │       │   ├── select_with_distinct_keyword.sql.golden.json
    │       │   ├── select_with_distinct_on_dotted_columns.sql.golden.json
    │       │   ├── select_with_distinct_on_keyword.sql.golden.json
    │       │   ├── select_with_group_by.sql.golden.json
    │       │   ├── select_with_join_only.sql.golden.json
    │       │   ├── select_with_keyword_in_group_by.sql.golden.json
    │       │   ├── select_with_keyword_placeholder.sql.golden.json
    │       │   ├── select_with_left_join.sql.golden.json
    │       │   ├── select_with_literal_table_name.sql.golden.json
    │       │   ├── select_with_multi_array_and_inner_join.sql.golden.json
    │       │   ├── select_with_multi_array_join.sql.golden.json
    │       │   ├── select_with_multi_except.sql.golden.json
    │       │   ├── select_with_multi_join.sql.golden.json
    │       │   ├── select_with_multi_line_comment.sql.golden.json
    │       │   ├── select_with_multi_union.sql.golden.json
    │       │   ├── select_with_multi_union_distinct.sql.golden.json
    │       │   ├── select_with_number_field.sql.golden.json
    │       │   ├── select_with_placeholder.sql.golden.json
    │       │   ├── select_with_query_parameter.sql.golden.json
    │       │   ├── select_with_settings_additional_table_filters.sql.golden.json
    │       │   ├── select_with_single_quote_table.sql.golden.json
    │       │   ├── select_with_string_expr.sql.golden.json
    │       │   ├── select_with_union_distinct.sql.golden.json
    │       │   ├── select_with_variable.sql.golden.json
    │       │   ├── select_with_window_function.sql.golden.json
    │       │   ├── select_without_from_where.sql.golden.json
    │       │   └── set_simple.sql.golden.json
    │       ├── query_with_expr_compare.sql
    │       ├── select_case_multiple_when.sql
    │       ├── select_case_when_exists.sql
    │       ├── select_cast.sql
    │       ├── select_column_alias_string.sql
    │       ├── select_concat_expr.sql
    │       ├── select_expr.sql
    │       ├── select_extract_with_regex.sql
    │       ├── select_item_with_modifiers.sql
    │       ├── select_json_type.sql
    │       ├── select_keyword_alias_no_as.sql
    │       ├── select_order_by_timestamp.sql
    │       ├── select_order_by_with_fill_basic.sql
    │       ├── select_order_by_with_fill_from_to.sql
    │       ├── select_order_by_with_fill_interpolate.sql
    │       ├── select_order_by_with_fill_interpolate_no_columns.sql
    │       ├── select_order_by_with_fill_staleness.sql
    │       ├── select_order_by_with_fill_step.sql
    │       ├── select_simple.sql
    │       ├── select_simple_field_alias.sql
    │       ├── select_simple_with_bracket.sql
    │       ├── select_simple_with_cte_with_column_aliases.sql
    │       ├── select_simple_with_group_by_with_cube_totals.sql
    │       ├── select_simple_with_is_not_null.sql
    │       ├── select_simple_with_is_null.sql
    │       ├── select_simple_with_limit.sql
    │       ├── select_simple_with_top_clause.sql
    │       ├── select_simple_with_with_clause.sql
    │       ├── select_table_alias_without_keyword.sql
    │       ├── select_table_function_with_query.sql
    │       ├── select_when_condition.sql
    │       ├── select_window_comprehensive.sql
    │       ├── select_window_cte.sql
    │       ├── select_window_keyword_name_in_parens.sql
    │       ├── select_window_named_in_parens.sql
    │       ├── select_window_named_reference_extensions.sql
    │       ├── select_window_params.sql
    │       ├── select_with_distinct.sql
    │       ├── select_with_distinct_keyword.sql
    │       ├── select_with_distinct_on_dotted_columns.sql
    │       ├── select_with_distinct_on_keyword.sql
    │       ├── select_with_group_by.sql
    │       ├── select_with_join_only.sql
    │       ├── select_with_keyword_in_group_by.sql
    │       ├── select_with_keyword_placeholder.sql
    │       ├── select_with_left_join.sql
    │       ├── select_with_literal_table_name.sql
    │       ├── select_with_multi_array_and_inner_join.sql
    │       ├── select_with_multi_array_join.sql
    │       ├── select_with_multi_except.sql
    │       ├── select_with_multi_join.sql
    │       ├── select_with_multi_line_comment.sql
    │       ├── select_with_multi_union.sql
    │       ├── select_with_multi_union_distinct.sql
    │       ├── select_with_number_field.sql
    │       ├── select_with_placeholder.sql
    │       ├── select_with_query_parameter.sql
    │       ├── select_with_settings_additional_table_filters.sql
    │       ├── select_with_single_quote_table.sql
    │       ├── select_with_string_expr.sql
    │       ├── select_with_union_distinct.sql
    │       ├── select_with_variable.sql
    │       ├── select_with_window_function.sql
    │       ├── select_without_from_where.sql
    │       └── set_simple.sql
    ├── type.go
    ├── visitor_test.go
    ├── walk.go
    └── walk_test.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/ci.yaml
================================================

name: CI Actions
permissions:
  contents: read
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  workflow:
    name: Lint/Build/Test

    strategy:
      matrix:
        go-version: [1.21.x]
        os: [ ubuntu-latest ]
    runs-on: ${{ matrix.os }}

    steps:
      - name: Install Go
        uses: actions/setup-go@v2
        with:
          go-version: ${{matrix.go-version}}

      - name: Checkout Code Base
        uses: actions/checkout@v3
        with:
          fetch-depth: '0'

      - name: Restore Go Module Cache
        uses: actions/cache@v4
        with:
          path: ~/go/internal/mod
          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-

      - name: Make Lint
        run: |
          export GOPATH=$HOME/go
          export PATH=$PATH:$GOPATH/bin
          curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3
          go mod tidy
          make lint

      - name: Test
        run: make test

      - name: Install goveralls
        run: go install github.com/mattn/goveralls@latest

      - name: Send coverage
        env:
          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: goveralls -coverprofile=coverage.out -service=github


================================================
FILE: .gitignore
================================================

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

.vscode
.idea
.DS_Store

# Binary
main
clickhouse-sql-parser

================================================
FILE: .golangci.yml
================================================

# This file contains all available configuration options
# with their default values.

# options for analysis running
run:
  # default concurrency is a available CPU number
  concurrency: 4

  # timeout for analysis, e.g. 30s, 5m, default is 1m
  timeout: 5m

  # exit code when at least one issue was found, default is 1
  issues-exit-code: 1

  # include test files or not, default is true
  tests: true

  # list of build tags, all linters use it. Default is empty list.
  build-tags:

  # which dirs to skip: issues from them won't be reported;
  # can use regexp here: generated.*, regexp is applied on full path;
  # default value is empty list, but default dirs are skipped independently
  # from this option's value (see skip-dirs-use-default).
  skip-dirs:

  # default is true. Enables skipping of directories:
  #   vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
  skip-dirs-use-default: true

  # which files to skip: they will be analyzed, but issues from them
  # won't be reported. Default value is empty list, but there is
  # no need to include all autogenerated files, we confidently recognize
  # autogenerated files. If it's not please let us know.
  skip-files:

# output configuration options
output:
  # colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
  # default is "colored-line-number"
  format: colored-line-number

  # print lines of code with issue, default is true
  print-issued-lines: true

  # print linter name in the end of issue text, default is true
  print-linter-name: true

  # make issues output unique by line, default is true
  uniq-by-line: true

  # add a prefix to the output file references; default is no prefix
  path-prefix: ""

  # sorts results by: filepath, line and column
  sort-results: false


# all available settings of specific linters
linters-settings:
  dogsled:
    # checks assignments with too many blank identifiers; default is 2
    max-blank-identifiers: 2

  dupl:
    # tokens count to trigger issue, 150 by default
    threshold: 100

  errcheck:
    # default is false: such cases aren't reported by default.
    check-type-assertions: false

    # default is false: such cases aren't reported by default.
    check-blank: false

    # list of functions to exclude from checking, where each entry is a single function to exclude.
    # see https://github.com/kisielk/errcheck#excluding-functions for details
    exclude-functions:

  errchkjson:
    # with check-error-free-encoding set to true, errchkjson does warn about errors
    # from json encoding functions that are safe to be ignored,
    # because they are not possible to happen (default false)
    #
    # if check-error-free-encoding is set to true and errcheck linter is enabled,
    # it is recommended to add the following exceptions to prevent from false positives:
    #
    #     linters-settings:
    #       errcheck:
    #         exclude-functions:
    #           - encoding/json.Marshal
    #           - encoding/json.MarshalIndent
    #           - (*encoding/json.Encoder).Encode
    check-error-free-encoding: false
    # if report-no-exported is true, encoding a struct without exported fields is reported as issue (default false)
    report-no-exported: false

  errorlint:
    # Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats
    errorf: true
    # Check for plain type assertions and type switches
    asserts: true
    # Check for plain error comparisons
    comparison: true

  funlen:
    lines: 100
    statements: 60

  gocognit:
    # minimal code complexity to report, 30 by default (but we recommend 10-20)
    min-complexity: 20

  goconst:
    # minimal length of string constant, 3 by default
    min-len: 3
    # minimum occurrences of constant string count to trigger issue, 3 by default
    min-occurrences: 3
    # ignore test files, false by default
    ignore-tests: false
    # look for existing constants matching the values, true by default
    match-constant: true
    # search also for duplicated numbers, false by default
    numbers: false
    # minimum value, only works with goconst.numbers, 3 by default
    min: 3
    # maximum value, only works with goconst.numbers, 3 by default
    max: 3
    # ignore when constant is not used as function argument, true by default
    ignore-calls: true

  gocritic:
    # Which checks should be enabled; can't be combined with 'disabled-checks';
    # See https://go-critic.github.io/overview#checks-overview
    # By default list of stable checks is used.
    enabled-checks:

    # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
    enabled-tags:
      - performance

    # Settings passed to gocritic.
    # The settings key is the name of a supported gocritic checker.
    # The list of supported checkers can be find in https://go-critic.github.io/overview.
    settings:
      captLocal: # must be valid enabled check name
        # whether to restrict checker to params only (default true)
        paramsOnly: true
      elseif:
        # whether to skip balanced if-else pairs (default true)
        skipBalanced: true
      hugeParam:
        # size in bytes that makes the warning trigger (default 80)
        sizeThreshold: 80
      rangeExprCopy:
        # size in bytes that makes the warning trigger (default 512)
        sizeThreshold: 512
        # whether to check test functions (default true)
        skipTestFuncs: true
      rangeValCopy:
        # size in bytes that makes the warning trigger (default 128)
        sizeThreshold: 128
        # whether to check test functions (default true)
        skipTestFuncs: true
      underef:
        # whether to skip (*x).method() calls where x is a pointer receiver (default true)
        skipRecvDeref: true

  gocyclo:
    # minimal code complexity to report, 30 by default (but we recommend 10-20)
    min-complexity: 10

  godot:
    scope: declarations
    # list of regexps for excluding particular comment lines from check
    exclude:
    # example: exclude comments which contain numbers
    # - '[0-9]+'
    # check that each sentence starts with a capital letter
    capital: false

  godox:
    # report any comments starting with keywords, this is useful for TODO or FIXME comments that
    # might be left in the code accidentally and should be resolved before merging
    keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting

  gofmt:
    simplify: true

  goimports:
    # put imports beginning with prefix after 3rd-party packages;
    # it's a comma-separated list of prefixes
    local-prefixes:

  golint:
    # minimal confidence for issues, default is 0.8
    min-confidence: 0.8

  gomnd:
    settings:
      mnd:
        # the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
        checks: argument,case,condition,operation,return,assign
        # ignored-numbers: 1000
        # ignored-files: magic_.*.go
        # ignored-functions: math.*

  gomoddirectives:
    replace-local: false
    replace-allow-list:
    retract-allow-no-explanation: false
    exclude-forbidden: false

  gomodguard:
    allowed:
      modules:                                                        # List of allowed modules
      # - gopkg.in/yaml.v2
      domains:                                                        # List of allowed module domains
      # - golang.org
    blocked:
      modules:                                                        # List of blocked modules
      # - github.com/uudashr/go-module:                               # Blocked module
      #     recommendations:                                          # Recommended modules that should be used instead (Optional)
      #       - golang.org/x/mod
      versions:                                                       # List of blocked module version constraints
      # - github.com/mitchellh/go-homedir:                            # Blocked module with version constraint
      #     version: "< 1.1.0"                                        # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
      #     reason: "testing if blocked version constraint works."    # Reason why the version constraint exists. (Optional)
      local_replace_directives: false                                 # Set to true to raise lint issues for packages that are loaded from a local path via replace directive

  gosec:
    # To select a subset of rules to run.
    # Available rules: https://github.com/securego/gosec#available-rules
    includes:
      - G401
      - G306
      - G101
    # To specify a set of rules to explicitly exclude.
    # Available rules: https://github.com/securego/gosec#available-rules
    excludes:
      - G204
    # Exclude generated files
    exclude-generated: true
    # Filter out the issues with a lower severity than the given value. Valid options are: low, medium, high.
    severity: "low"
    # Filter out the issues with a lower confidence than the given value. Valid options are: low, medium, high.
    confidence: "low"
    # To specify the configuration of rules.
    # The configuration of rules is not fully documented by gosec:
    # https://github.com/securego/gosec#configuration
    # https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102
    config:
      G306: "0600"
      G101:
        pattern: "(?i)example"
        ignore_entropy: false
        entropy_threshold: "80.0"
        per_char_threshold: "3.0"
        truncate: "32"

  gosimple:
    # Select the Go version to target. The default is '1.13'.
    go: "1.15"
    # https://staticcheck.io/docs/options#checks
    checks: [ "all" ]

  govet:
    # report about shadowed variables
    check-shadowing: false

    # settings per analyzer
    settings:
      printf:
        funcs:
          - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
          - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
          - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
          - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf

    # enable or disable analyzers by name
    enable:
      # - atomicalign
    enable-all: true
    disable:
      - shadow
      - fieldalignment
    disable-all: false

  depguard:
    list-type: blacklist
    include-go-root: false
    packages:
      # - github.com/sirupsen/logrus
    packages-with-error-message:
      # specify an error message to output when a blacklisted package is used
      # - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"

  ifshort:
    # Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
    # Has higher priority than max-decl-chars.
    max-decl-lines: 1
    # Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
    max-decl-chars: 30

  lll:
    # max line length, lines longer will be reported. Default is 120.
    # '\t' is counted as 1 character by default, and can be changed with the tab-width option
    line-length: 160
    # tab width in spaces. Default to 1.
    tab-width: 4

  makezero:
    # Allow only slices initialized with a length of zero. Default is false.
    always: false

  maligned:
    # print struct with more effective memory layout or not, false by default
    suggest-new: true

  misspell:
    # Correct spellings using locale preferences for US or UK.
    # Default is to use a neutral variety of English.
    # Setting locale to US will correct the British spelling of 'colour' to 'color'.
    locale: US
    ignore-words:
      - automizely

  nakedret:
    # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
    max-func-lines: 30

  nestif:
    # minimal complexity of if statements to report, 5 by default
    min-complexity: 5

  nlreturn:
    # size of the block (including return statement that is still "OK")
    # so no return split required.
    block-size: 1

  nolintlint:
    # Disable to ensure that all nolint directives actually have an effect. Default is false.
    allow-unused: false
    # Disable to ensure that nolint directives don't have a leading space. Default is true.
    allow-leading-space: true
    # Exclude following linters from requiring an explanation.  Default is [].
    allow-no-explanation: [ ]
    # Enable to require an explanation of nonzero length after each nolint directive. Default is false.
    require-explanation: false
    # Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
    require-specific: false

  prealloc:
    # XXX: we don't recommend using this linter before doing performance profiling.
    # For most programs usage of prealloc will be a premature optimization.

    # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
    # True by default.
    simple: true
    range-loops: true # Report preallocation suggestions on range loops, true by default
    for-loops: false # Report preallocation suggestions on for loops, false by default

  promlinter:
    # Promlinter cannot infer all metrics name in static analysis.
    # Enable strict mode will also include the errors caused by failing to parse the args.
    strict: false
    # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
    disabled-linters:
    #  - "Help"
    #  - "MetricUnits"
    #  - "Counter"
    #  - "HistogramSummaryReserved"
    #  - "MetricTypeInName"
    #  - "ReservedChars"
    #  - "CamelCase"
    #  - "lintUnitAbbreviations"

  predeclared:
    # comma-separated list of predeclared identifiers to not report on
    ignore: ""
    # include method names and field names (i.e., qualified names) in checks
    q: false

  rowserrcheck:
    packages:
      - github.com/jmoiron/sqlx

  revive:
    # see https://github.com/mgechev/revive#available-rules for details.
    ignore-generated-header: true
    severity: warning
    rules:
      - name: indent-error-flow
        severity: warning

  staticcheck:
    # Select the Go version to target. The default is '1.13'.
    go: "1.15"
    # https://staticcheck.io/docs/options#checks
    checks: [ "all" ]

  stylecheck:
    # Select the Go version to target. The default is '1.13'.
    go: "1.15"
    # https://staticcheck.io/docs/options#checks
    checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
    # https://staticcheck.io/docs/options#dot_import_whitelist
    dot-import-whitelist:
    # https://staticcheck.io/docs/options#initialisms
    initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS" ]
    # https://staticcheck.io/docs/options#http_status_code_whitelist
    http-status-code-whitelist: []

  tagliatelle:
    # check the struck tag name case
    case:
      # use the struct field name to check the name of the struct tag
      use-field-name: true
      rules:
        # any struct tag type can be used.
        json: snake

  testpackage:
    # regexp pattern to skip files
    skip-regexp: (export|internal)_test\.go

  unparam:
    # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
    # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
    # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
    # with golangci-lint call it on a directory with the changed file.
    check-exported: false

  unused:
    # Select the Go version to target. The default is '1.13'.
    go: "1.15"

  whitespace:
    multi-if: false   # Enforces newlines (or comments) after every multi-line if statement
    multi-func: false # Enforces newlines (or comments) after every multi-line function signature

  wsl:
    allow-assign-and-anything: false
    allow-assign-and-call: true
    allow-cuddle-declarations: false
    allow-multiline-assign: true
    allow-separated-leading-comment: false
    allow-trailing-comment: false
    force-case-trailing-whitespace: 0
    force-err-cuddling: false
    force-short-decl-cuddling: false
    strict-append: true

linters:
  enable:
    - dogsled
    - forcetypeassert
    - funlen
    - goconst
    - govet
    - gofmt
    - goimports
    - lll
    - megacheck
    - misspell
    - revive
  disable:
    - maligned
    - prealloc
    - scopelint
    - nilnil
  disable-all: false
  presets:
    - bugs
    - unused
    - sql
  fast: false

issues:
  # List of regexps of issue texts to exclude, empty list by default.
  # But independently from this option we use default exclude patterns,
  exclude:
    - G404
    - SA1029

  # Excluding configuration per-path, per-linter, per-text and per-source
  exclude-rules:
    # Exclude some linters from running on tests files.
    - path: _test\.go
      linters:
        - cyclop
        - dupl
        - errcheck
        - funlen
        - gocognit
        - goconst
        - gocritic
        - gocyclo
        - gosec
        - lll
        - thelper
        - wrapcheck

    # Exclude known linters from partially hard-vendored code,
    # which is impossible to exclude via "nolint" comments.
    - path: internal/hmac/
      text: "weak cryptographic primitive"
      linters:
        - gosec

    # Exclude some staticcheck messages
    - linters:
        - staticcheck
      text: "SA9003:"

    # Exclude lll issues for long lines with go:generate
    - linters:
        - lll
      source: "^//go:generate "

  # Default value for this option is true.
  exclude-use-default: true

  # The default value is false. If set to true exclude and exclude-rules
  # regular expressions become case sensitive.
  exclude-case-sensitive: false

  # The list of ids of default excludes to include or disable. By default it's empty.
  include:
    # - EXC0002 # disable excluding of issues about comments from golint

  # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
  max-issues-per-linter: 0

  # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
  max-same-issues: 0

  # Show only new issues: if there are unstaged changes or untracked files,
  # only those changes are analyzed, else only changes in HEAD~ are analyzed.
  # It's a super-useful option for integration of golangci-lint into existing
  # large codebase. It's not practical to fix all existing issues at the moment
  # of integration: much better don't allow issues in new code.
  # Default is false.
  new: true

  new-from-rev: ""

  # Show only new issues created in git patch with set file path.
  new-from-patch:

  # Fix found issues (if it's supported by the linter)
  fix: true

severity:
  # Default value is empty string.
  # Set the default severity for issues. If severity rules are defined and the issues
  # do not match or no severity is provided to the rule this will be the default
  # severity applied. Severities should match the supported severity names of the
  # selected out format.
  # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
  # -   Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
  # -       GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
  default-severity: error

  # The default value is false.
  # If set to true severity-rules regular expressions become case sensitive.
  case-sensitive: false

  # Default value is empty list.
  # When a list of severity rules are provided, severity information will be added to lint
  # issues. Severity rules have the same filtering capability as exclude rules except you
  # are allowed to specify one matcher per severity rule.
  # Only affects out formats that support setting severity information.
  rules:
    - linters:
        - dupl
      severity: info


================================================
FILE: AGENTS.md
================================================
# AI Agents Guidline

This document outlines guidance for AI coding agent including project structure, coding style, testing, and contribution practices for the ClickHouse SQL Parser project.


## Development Commands

```shell
# Build the CLI binary
make

# Run tests
make test

# Update golden fixtures after intentional output changes
make update_test
```

After editing code, use `goimports` and `gofmt` to maintain code style, and run `make lint` to check for any issues before committing or requesting a review.

## Project Structure & Module Organization
- `main.go` is the CLI entry point (`clickhouse-sql-parser`) for AST output and SQL formatting.
- `parser/` contains core parser code: lexer (`lexer.go`), AST definitions (`ast.go`), traversal helpers (`walk.go`), and grammar-specific parser files (`parser_query.go`, `parser_table.go`, `parser_alter.go`, etc.).
- Tests live next to source as `*_test.go` files, with fixtures under `parser/testdata/`.
- Fixture groups are organized by SQL type (`basic/`, `query/`, `dml/`, `ddl/`), with generated expectations in `output/` (AST JSON) and `format/` (formatted SQL).

## Coding Style & Naming Conventions
- Use Go 1.21 conventions (`go.mod`) and keep code `gofmt`/`goimports` clean (enforced by lint).
- Naming is the most important style aspect, try you best to choose a clear and descriptive name for variables, functions, types, and files. For example, use `parseSelect` for a function that parses a SELECT statement, and `SelectStatement` for the corresponding AST node type.
- Place parsing logic in the matching module by statement family (for example, query parsing in `parser/parser_query.go`).
- Follow existing parser naming patterns such as `parseXxx` helpers and explicit AST type names.
- Keep AST `FormatSQL()` output deterministic; formatting changes must be reflected in golden files.
- You must go through the repository before adding new code to ensure consistency with existing patterns and styles. If you are unsure about where to place new code or how to format it, please refer to the existing codebase or ask for guidance.
- Reusing existing code and patterns is encouraged to maintain consistency and reduce redundancy. If you find a similar function or pattern in the codebase, consider adapting it for your needs instead of creating something new from scratch.

## Testing Guidelines
- Use Go’s `testing` package with `testify/require` assertions and `goldie` snapshot comparisons.
- Add new SQL cases as `.sql` files under the appropriate `parser/testdata/<category>/` directory.
- If expected outputs change, run `make update_test` and commit updated files in both `output/` and/or `format/`.
- Prefer descriptive test names (`TestParser_*`, `TestWalk_*`) and subtests for per-fixture coverage.

## Commit & Pull Request Guidelines
- Match existing commit style: concise, imperative subjects like `Add support for ...` or `Fix parsing failure ...`, optionally with issue refs (for example `(#235)`).
- Keep PRs focused; describe grammar/AST impact, include representative SQL examples, and note regenerated fixtures.
- Before requesting review, run `make lint` and `make test` locally to mirror CI expectations.


## Important Notes

- You must confirm it's correctly added to `visitor.go`, `walk.go` and `format.go` when adding a new expression or statement type. This ensures that the new AST node is properly traversed and formatted.
- Newly added test cases must be concise and cover the core functionality being tested first.


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2023 AfterShip

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================

PROGRAM=clickhouse-sql-parser
PKG_FILES=`go list ./... | sed -e 's=github.com/AfterShip/clickhouse-sql-parser/=./='`

CCCOLOR="\033[37;1m"
MAKECOLOR="\033[32;1m"
ENDCOLOR="\033[0m"

all: $(PROGRAM)

.PHONY: all

$(PROGRAM):
	go build -o $(PROGRAM) main.go

test:
	@go test -v ./... -covermode=atomic -coverprofile=coverage.out -race -compatible

update_test:
	@go test -v ./... -update -race -compatible

lint:
	@printf $(CCCOLOR)"GolangCI Lint...\n"$(ENDCOLOR)
	@golangci-lint run --timeout 20m0s


================================================
FILE: README.md
================================================
# ClickHouse SQL Parser 
![GitHub CI](https://github.com/AfterShip/clickhouse-sql-parser/actions/workflows/ci.yaml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/AfterShip/clickhouse-sql-parser)](https://goreportcard.com/report/github.com/AfterShip/clickhouse-sql-parser) [![LICENSE](https://img.shields.io/github/license/AfterShip/clickhouse-sql-parser.svg)](https://github.com/AfterShip/clickhouse-sql-parser/blob/master/LICENSE) [![GoDoc](https://img.shields.io/badge/Godoc-reference-blue.svg)](https://godoc.org/github.com/AfterShip/clickhouse-sql-parser) [![Coverage Status](https://coveralls.io/repos/github/AfterShip/clickhouse-sql-parser/badge.svg?branch=master)](https://coveralls.io/github/AfterShip/clickhouse-sql-parser?branch=master) <a href="https://hellogithub.com/repository/23597949cafa410bba6039ddb8867543" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=23597949cafa410bba6039ddb8867543&claim_uid=kyCYu1VAKgwD8rE&theme=small" alt="Featured|HelloGitHub" /></a>

The goal of this project is to build a ClickHouse SQL parser in Go with the following key features:

- Parse ClickHouse SQL into AST
- Beautify ClickHouse SQL format

This project is inspired by [memefish](https://github.com/cloudspannerecosystem/memefish) which is a SQL parser for Spanner in Go.
## How to use

You can use it as your Go library or CLI tool, see the following examples:

- Use clickhouse-sql-parser as a Go library

```Go
package main

import (
    clickhouse "github.com/AfterShip/clickhouse-sql-parser/parser"
)

query := "SELECT * FROM clickhouse"
parser := clickhouse.NewParser(query)
// Parse query into AST
statements, err := parser.ParseStmts()
if err != nil {
    return nil, err
}
```

- Install clickhouse-sql-parser as a CLI tool


On Linux:

```bash
$ go install github.com/AfterShip/clickhouse-sql-parser@latest
```

On macOS:

```bash
$ brew install clickhouse-sql-parser
```

Parse ClickHouse SQL into AST or format ClickHouse SQL:

```bash
## Parse query into AST
$ clickhouse-sql-parser "SELECT * FROM clickhouse WHERE a=100"

## Format query (compact, single-line output)
$ clickhouse-sql-parser -format "SELECT * FROM clickhouse WHERE a=100"

## Beautify query (formatted with proper indentation and line breaks)
$ clickhouse-sql-parser -beautify "SELECT * FROM clickhouse WHERE a=100"

## Parse query from file
$ clickhouse-sql-parser -f ./test.sql
```

### Beautify SQL Example

The `-beautify` flag formats SQL with proper indentation and line breaks, making complex queries more readable:

```SQL
# Input (compact, hard to read)
$ clickhouse-sql-parser -beautify "SELECT user_id, COUNT(*) AS total, AVG(amount) AS avg_amount FROM orders WHERE status='completed' AND created_at>'2024-01-01' GROUP BY user_id HAVING COUNT(*)>5 ORDER BY total DESC LIMIT 10"

# Output (beautified, easy to read)
SELECT
  user_id,
  COUNT(*) AS total,
  AVG(amount) AS avg_amount
FROM orders
WHERE
  status = 'completed'
AND
  created_at > '2024-01-01'
GROUP BY
  user_id
HAVING COUNT(*) > 5
ORDER BY
  total DESC
LIMIT 10
```

- Parsed tree(AST) back into a SQL statement

```Go
parser := clickhouse.NewParser("SELECT * FROM clickhouse")
// Parse query into AST
statements, err := parser.ParseStmts()
if err != nil {
    return nil, err
}

// Format AST back into a SQL string
for _, stmt := range statements {
  fmt.Println(clickhouse.Format(stmt))
}
```

## AST Traversal

### Walk Pattern (Recommended)

The Walk pattern provides a simple and efficient way to traverse AST nodes. Use the `Walk` function to visit all nodes in the AST:

```Go
import (
    clickhouse "github.com/AfterShip/clickhouse-sql-parser/parser"
)

parser := clickhouse.NewParser("SELECT * FROM table WHERE id = 1")
statements, err := parser.ParseStmts()
if err != nil {
    return err
}

// Walk through all nodes in the AST
clickhouse.Walk(statements[0], func(node clickhouse.Expr) bool {
    fmt.Printf("Node type: %T\n", node)
    return true // return false to stop traversal for this subtree
})
```

#### Walk Pattern Functions

- **`Walk(node Expr, fn WalkFunc)`** - Traverses all nodes in depth-first order
- **`WalkWithBreak(node Expr, fn WalkFunc)`** - Allows early termination of traversal
- **`Find(root Expr, predicate func(Expr) bool)`** - Finds the first node matching a condition
- **`FindAll(root Expr, predicate func(Expr) bool)`** - Finds all nodes matching a condition
- **`Transform(root Expr, transformer func(Expr) Expr)`** - Applies transformations to nodes

#### Examples

Find all table identifiers:
```Go
tables := clickhouse.FindAll(stmt, func(node clickhouse.Expr) bool {
    _, ok := node.(*clickhouse.TableIdentifier)
    return ok
})
```

Find the first WHERE clause:
```Go
whereClause, found := clickhouse.Find(stmt, func(node clickhouse.Expr) bool {
    _, ok := node.(*clickhouse.WhereClause)
    return ok
})
```

## Update test assets

For the files inside `output` and `format` dir are generated by the test cases,

if you want to update them, you can run the following command:

```bash
$ make update_test
```

## Benchmarks

```sh
go test -bench=. -benchmem ./parser
```

Results

```
$ go test -bench=. -benchmem ./parser
goos: linux
goarch: amd64
pkg: github.com/AfterShip/clickhouse-sql-parser/parser
cpu: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
BenchmarkParseSQLFiles/access_tuple_with_dot.sql-28                23294             58467 ns/op           13448 B/op        293 allocs/op
BenchmarkParseSQLFiles/query_with_expr_compare.sql-28              43560             25704 ns/op            6240 B/op        132 allocs/op
BenchmarkParseSQLFiles/select_cast.sql-28                          75055             16518 ns/op            4648 B/op         92 allocs/op
BenchmarkParseSQLFiles/select_column_alias_string.sql-28          499798              2785 ns/op             704 B/op         13 allocs/op
BenchmarkParseSQLFiles/select_expr.sql-28                         488187              2448 ns/op             696 B/op         12 allocs/op
BenchmarkParseSQLFiles/select_item_with_modifiers.sql-28           54124             23305 ns/op            6232 B/op        136 allocs/op
BenchmarkParseSQLFiles/select_order_by_timestamp.sql-28           232302              5809 ns/op            1368 B/op         28 allocs/op
BenchmarkParseSQLFiles/select_simple.sql-28                        30602             50022 ns/op            9920 B/op        216 allocs/op
BenchmarkParseSQLFiles/select_simple_field_alias.sql-28           178126              6316 ns/op            1712 B/op         39 allocs/op
BenchmarkParseSQLFiles/select_simple_with_bracket.sql-28           71902             16172 ns/op            3824 B/op         85 allocs/op
BenchmarkParseSQLFiles/select_simple_with_cte_with_column_aliases.sql-28                   67050             19916 ns/op            4648 B/op        101 allocs/op
BenchmarkParseSQLFiles/select_simple_with_group_by_with_cube_totals.sql-28                107047             10348 ns/op            2768 B/op         58 allocs/op
BenchmarkParseSQLFiles/select_simple_with_is_not_null.sql-28                               55285             21957 ns/op            5224 B/op        111 allocs/op
BenchmarkParseSQLFiles/select_simple_with_is_null.sql-28                                   66648             22412 ns/op            4728 B/op        102 allocs/op
BenchmarkParseSQLFiles/select_simple_with_top_clause.sql-28                               269910              4166 ns/op            1088 B/op         22 allocs/op
BenchmarkParseSQLFiles/select_simple_with_with_clause.sql-28                               58494             18417 ns/op            5144 B/op        109 allocs/op
BenchmarkParseSQLFiles/select_table_alias_without_keyword.sql-28                          121261             10011 ns/op            2896 B/op         65 allocs/op
BenchmarkParseSQLFiles/select_table_function_with_query.sql-28                             98017             14929 ns/op            4168 B/op         81 allocs/op
BenchmarkParseSQLFiles/select_when_condition.sql-28                                       220394              5457 ns/op            1304 B/op         28 allocs/op
BenchmarkParseSQLFiles/select_with_distinct.sql-28                                        172948              6531 ns/op            1560 B/op         33 allocs/op
BenchmarkParseSQLFiles/select_with_join_only.sql-28                                       286346              5594 ns/op            1520 B/op         32 allocs/op
BenchmarkParseSQLFiles/select_with_left_join.sql-28                                        88200             13627 ns/op            3880 B/op         75 allocs/op
BenchmarkParseSQLFiles/select_with_literal_table_name.sql-28                              241094              5099 ns/op            1304 B/op         27 allocs/op
BenchmarkParseSQLFiles/select_with_multi_join.sql-28                                       44700             31964 ns/op            8240 B/op        188 allocs/op
BenchmarkParseSQLFiles/select_with_multi_line_comment.sql-28                              363499              4460 ns/op             824 B/op         18 allocs/op
BenchmarkParseSQLFiles/select_with_multi_union.sql-28                                     146233              7827 ns/op            2176 B/op         36 allocs/op
BenchmarkParseSQLFiles/select_with_number_field.sql-28                                    129945              8746 ns/op            2352 B/op         51 allocs/op
BenchmarkParseSQLFiles/select_with_query_parameter.sql-28                                  33850             36346 ns/op            9936 B/op        209 allocs/op
BenchmarkParseSQLFiles/select_with_string_expr.sql-28                                     142882              7530 ns/op            1880 B/op         34 allocs/op
BenchmarkParseSQLFiles/select_with_union_distinct.sql-28                                  147031              9601 ns/op            2352 B/op         47 allocs/op
BenchmarkParseSQLFiles/select_with_variable.sql-28                                        179158              6669 ns/op            1880 B/op         36 allocs/op
BenchmarkParseSQLFiles/select_with_window_function.sql-28                                  54925             31320 ns/op            6720 B/op        136 allocs/op
BenchmarkParseSQLFiles/select_with_placeholder.sql-28                                    196771              5145 ns/op            1272 B/op         26 allocs/op
BenchmarkParseSQLFiles/set_simple.sql-28                                                  172419              7062 ns/op            2480 B/op         49 allocs/op
BenchmarkParseComplexQueries/testdata/query/select_with_multi_join.sql-28                  39056             36897 ns/op            8240 B/op        188 allocs/op
BenchmarkParseComplexQueries/testdata/query/select_with_window_function.sql-28             47629             29916 ns/op            6720 B/op        136 allocs/op
BenchmarkParseComplexQueries/testdata/query/select_simple_with_with_clause.sql-28                  69210             19731 ns/op            5144 B/op        109 allocs/op
BenchmarkParseComplexQueries/testdata/query/select_with_left_join.sql-28                           74576             15338 ns/op            3880 B/op         75 allocs/op
BenchmarkParseComplexQueries/testdata/benchdata/posthog_huge_0.sql-28                                235           6231253 ns/op         1236189 B/op      26696 allocs/op
BenchmarkParseComplexQueries/testdata/benchdata/posthog_huge_1.sql-28                                279           4438280 ns/op         1043374 B/op      22717 allocs/op
PASS
ok      github.com/AfterShip/clickhouse-sql-parser/parser       66.547s
```

## Contact us

Feel free to open an issue or discussion if you have any issues or questions.


================================================
FILE: go.mod
================================================
module github.com/AfterShip/clickhouse-sql-parser

go 1.21.0

require (
	github.com/sebdah/goldie/v2 v2.5.3
	github.com/stretchr/testify v1.8.4
)

require (
	github.com/davecgh/go-spew v1.1.1 // indirect
	github.com/pmezard/go-difflib v1.0.0 // indirect
	github.com/sergi/go-diff v1.0.0 // indirect
	gopkg.in/yaml.v3 v3.0.1 // indirect
)


================================================
FILE: go.sum
================================================
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=


================================================
FILE: main.go
================================================
package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"os"
	"strings"

	clickhouse "github.com/AfterShip/clickhouse-sql-parser/parser"
)

const VERSION = "0.4.17"
const help = `
Usage: clickhouse-sql-parser [YOUR SQL STRING] -f [YOUR SQL FILE] -format -beautify
`

var options struct {
	help     bool
	file     string
	format   bool
	beautify bool
	version  bool
}

func init() {
	flag.BoolVar(&options.format, "format", false, "Print formatted ClickHouse SQL")
	flag.BoolVar(&options.beautify, "beautify", false, "Beautify print the ClickHouse SQL")
	flag.StringVar(&options.file, "f", "", "Parse SQL from file")
	flag.BoolVar(&options.help, "h", false, "Print help message")
	flag.BoolVar(&options.version, "v", false, "Print version")
}

func main() {
	flag.Parse()
	if options.version {
		fmt.Println("v" + VERSION)
		os.Exit(0)
	}
	if len(os.Args) < 2 || options.help {
		fmt.Print(help)
		os.Exit(0)
	}

	var err error
	var inputBytes []byte
	if options.file != "" {
		inputBytes, err = os.ReadFile(options.file)
		if err != nil {
			fmt.Fprintf(os.Stderr, "read file error: %s\n", err.Error())
			os.Exit(1)
		}
	} else {
		if strings.HasPrefix(os.Args[len(os.Args)-1], "-") {
			fmt.Print(help)
			os.Exit(0)
		}
		inputBytes = []byte(os.Args[len(os.Args)-1])
	}
	parser := clickhouse.NewParser(string(inputBytes))
	stmts, err := parser.ParseStmts()
	if err != nil {
		fmt.Fprintf(os.Stderr, "parse statements error: %s\n", err.Error())
		os.Exit(1)
	}
	if !options.format && !options.beautify { // print AST
		bytes, _ := json.MarshalIndent(stmts, "", "  ") // nolint
		fmt.Println(string(bytes))
	} else { // format SQL
		for _, stmt := range stmts {
			if options.beautify {
				formatter := clickhouse.NewFormatter()
				formatter.WithBeautify()
				formatter.WriteExpr(stmt)
				fmt.Println(formatter.String())
			} else {
				fmt.Println(clickhouse.Format(stmt))
			}
		}
	}
}


================================================
FILE: parser/ast.go
================================================
package parser

type OrderDirection string

const (
	OrderDirectionNone OrderDirection = ""
	OrderDirectionAsc  OrderDirection = "ASC"
	OrderDirectionDesc OrderDirection = "DESC"
)

type Expr interface {
	Pos() Pos
	End() Pos
	FormatSQL(*Formatter)
	Accept(visitor ASTVisitor) error
}

type DDL interface {
	Expr
	Type() string
}

type SelectItem struct {
	Expr Expr
	// Please refer: https://clickhouse.com/docs/en/sql-reference/statements/select#select-modifiers
	Modifiers []*FunctionExpr
	Alias     *Ident
}

func (s *SelectItem) Pos() Pos {
	return s.Expr.Pos()
}

func (s *SelectItem) End() Pos {
	if s.Alias != nil {
		return s.Alias.End()
	}
	if len(s.Modifiers) > 0 {
		return s.Modifiers[len(s.Modifiers)-1].End()
	}
	return s.Expr.End()
}

func (s *SelectItem) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Expr.Accept(visitor); err != nil {
		return err
	}
	for _, modifier := range s.Modifiers {
		if err := modifier.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Alias != nil {
		if err := s.Alias.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSelectItem(s)
}

type OperationExpr struct {
	OperationPos Pos
	Kind         TokenKind
}

func (o *OperationExpr) Pos() Pos {
	return o.OperationPos
}

func (o *OperationExpr) End() Pos {
	return o.OperationPos + Pos(len(o.Kind))
}

func (o *OperationExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	return visitor.VisitOperationExpr(o)
}

type TernaryOperation struct {
	Condition Expr
	TrueExpr  Expr
	FalseExpr Expr
}

func (t *TernaryOperation) Pos() Pos {
	return t.Condition.Pos()
}

func (t *TernaryOperation) End() Pos {
	return t.FalseExpr.End()
}

func (t *TernaryOperation) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.TrueExpr.Accept(visitor); err != nil {
		return err
	}
	if err := t.FalseExpr.Accept(visitor); err != nil {
		return err
	}
	if err := t.Condition.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTernaryExpr(t)
}

type BinaryOperation struct {
	LeftExpr  Expr
	Operation TokenKind
	RightExpr Expr
	HasGlobal bool
	HasNot    bool
}

func (p *BinaryOperation) Pos() Pos {
	return p.LeftExpr.Pos()
}

func (p *BinaryOperation) End() Pos {
	return p.RightExpr.End()
}

func (p *BinaryOperation) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	if err := p.LeftExpr.Accept(visitor); err != nil {
		return err
	}
	if err := p.RightExpr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitBinaryExpr(p)
}

type IndexOperation struct {
	Object    Expr
	Operation TokenKind
	Index     Expr
}

func (i *IndexOperation) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	if err := i.Object.Accept(visitor); err != nil {
		return err
	}
	if err := i.Index.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitIndexOperation(i)
}

func (i *IndexOperation) Pos() Pos {
	return i.Object.Pos()
}

func (i *IndexOperation) End() Pos {
	return i.Index.End()
}

type JoinTableExpr struct {
	Table        *TableExpr
	StatementEnd Pos
	SampleRatio  *SampleClause
	HasFinal     bool
}

func (j *JoinTableExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(j)
	defer visitor.Leave(j)
	if err := j.Table.Accept(visitor); err != nil {
		return err
	}
	if j.SampleRatio != nil {
		return j.SampleRatio.Accept(visitor)
	}
	return visitor.VisitJoinTableExpr(j)
}

func (j *JoinTableExpr) Pos() Pos {
	return j.Table.Pos()
}

func (j *JoinTableExpr) End() Pos {
	return j.StatementEnd
}

type AlterTableClause interface {
	Expr
	AlterType() string
}

type AlterTable struct {
	AlterPos        Pos
	StatementEnd    Pos
	TableIdentifier *TableIdentifier
	OnCluster       *ClusterClause
	AlterExprs      []AlterTableClause
}

func (a *AlterTable) Pos() Pos {
	return a.AlterPos
}

func (a *AlterTable) End() Pos {
	return a.StatementEnd
}

func (a *AlterTable) Type() string {
	return "ALTER TABLE"
}

func (a *AlterTable) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.TableIdentifier.Accept(visitor); err != nil {
		return err
	}
	if a.OnCluster != nil {
		if err := a.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}

	for _, expr := range a.AlterExprs {
		if err := expr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTable(a)
}

type AlterTableAttachPartition struct {
	AttachPos Pos

	Partition *PartitionClause
	From      *TableIdentifier
}

func (a *AlterTableAttachPartition) Pos() Pos {
	return a.AttachPos
}

func (a *AlterTableAttachPartition) End() Pos {
	if a.From != nil {
		return a.From.End()
	}
	return a.Partition.End()
}

func (a *AlterTableAttachPartition) AlterType() string {
	return "ATTACH_PARTITION"
}

func (a *AlterTableAttachPartition) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Partition.Accept(visitor); err != nil {
		return err
	}
	if a.From != nil {
		if err := a.From.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableAttachPartition(a)
}

type AlterTableDetachPartition struct {
	DetachPos Pos
	Partition *PartitionClause
	Settings  *SettingsClause
}

func (a *AlterTableDetachPartition) Pos() Pos {
	return a.DetachPos
}

func (a *AlterTableDetachPartition) End() Pos {
	return a.Partition.End()
}

func (a *AlterTableDetachPartition) AlterType() string {
	return "DETACH_PARTITION"
}

func (a *AlterTableDetachPartition) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Partition.Accept(visitor); err != nil {
		return err
	}
	if a.Settings != nil {
		if err := a.Settings.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableDetachPartition(a)
}

type AlterTableDropPartition struct {
	DropPos     Pos
	HasDetached bool
	Partition   *PartitionClause
	Settings    *SettingsClause
}

func (a *AlterTableDropPartition) Pos() Pos {
	return a.DropPos
}

func (a *AlterTableDropPartition) End() Pos {
	if a.Settings != nil {
		a.Settings.End()
	}
	return a.Partition.End()
}

func (a *AlterTableDropPartition) AlterType() string {
	return "DROP_PARTITION"
}

func (a *AlterTableDropPartition) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Partition.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableDropPartition(a)
}

type AlterTableMaterializeProjection struct {
	MaterializedPos Pos
	StatementEnd    Pos
	IfExists        bool
	ProjectionName  *NestedIdentifier
	Partition       *PartitionClause
}

func (a *AlterTableMaterializeProjection) Pos() Pos {
	return a.MaterializedPos
}

func (a *AlterTableMaterializeProjection) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableMaterializeProjection) AlterType() string {
	return "MATERIALIZE_PROJECTION"
}

func (a *AlterTableMaterializeProjection) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.ProjectionName.Accept(visitor); err != nil {
		return err
	}
	if a.Partition != nil {
		if err := a.Partition.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableMaterializeProjection(a)
}

type AlterTableMaterializeIndex struct {
	MaterializedPos Pos
	StatementEnd    Pos
	IfExists        bool
	IndexName       *NestedIdentifier
	Partition       *PartitionClause
}

func (a *AlterTableMaterializeIndex) Pos() Pos {
	return a.MaterializedPos
}

func (a *AlterTableMaterializeIndex) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableMaterializeIndex) AlterType() string {
	return "MATERIALIZE_INDEX"
}

func (a *AlterTableMaterializeIndex) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.IndexName.Accept(visitor); err != nil {
		return err
	}
	if a.Partition != nil {
		if err := a.Partition.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableMaterializeIndex(a)
}

type AlterTableFreezePartition struct {
	FreezePos    Pos
	StatementEnd Pos
	Partition    *PartitionClause
}

func (a *AlterTableFreezePartition) Pos() Pos {
	return a.FreezePos
}

func (a *AlterTableFreezePartition) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableFreezePartition) AlterType() string {
	return "FREEZE_PARTITION"
}

func (a *AlterTableFreezePartition) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if a.Partition != nil {
		if err := a.Partition.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableFreezePartition(a)
}

type AlterTableAddColumn struct {
	AddPos       Pos
	StatementEnd Pos

	Column      *ColumnDef
	IfNotExists bool
	After       *NestedIdentifier
	Settings    *SettingsClause
}

func (a *AlterTableAddColumn) Pos() Pos {
	return a.AddPos
}

func (a *AlterTableAddColumn) End() Pos {
	if a.Settings != nil {
		return a.Settings.End()
	}
	return a.StatementEnd
}

func (a *AlterTableAddColumn) AlterType() string {
	return "ADD_COLUMN"
}

func (a *AlterTableAddColumn) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Column.Accept(visitor); err != nil {
		return err
	}
	if a.After != nil {
		if err := a.After.Accept(visitor); err != nil {
			return err
		}
	}
	if a.Settings != nil {
		if err := a.Settings.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableAddColumn(a)
}

type AlterTableAddIndex struct {
	AddPos       Pos
	StatementEnd Pos

	Index       *TableIndex
	IfNotExists bool
	After       *NestedIdentifier
}

func (a *AlterTableAddIndex) Pos() Pos {
	return a.AddPos
}

func (a *AlterTableAddIndex) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableAddIndex) AlterType() string {
	return "ADD_INDEX"
}

func (a *AlterTableAddIndex) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Index.Accept(visitor); err != nil {
		return err
	}
	if a.After != nil {
		if err := a.After.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableAddIndex(a)
}

type ProjectionOrderByClause struct {
	OrderByPos Pos
	Columns    *ColumnExprList
}

func (p *ProjectionOrderByClause) Pos() Pos {
	return p.OrderByPos
}

func (p *ProjectionOrderByClause) End() Pos {
	return p.Columns.End()
}

func (p *ProjectionOrderByClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	return visitor.VisitProjectionOrderBy(p)
}

type ProjectionSelectStmt struct {
	LeftParenPos  Pos
	RightParenPos Pos
	With          *WithClause
	SelectColumns *ColumnExprList
	GroupBy       *GroupByClause
	OrderBy       *ProjectionOrderByClause
}

func (p *ProjectionSelectStmt) Pos() Pos {
	return p.LeftParenPos

}

func (p *ProjectionSelectStmt) End() Pos {
	return p.RightParenPos
}

func (p *ProjectionSelectStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	if p.With != nil {
		if err := p.With.Accept(visitor); err != nil {
			return err
		}
	}
	if err := p.SelectColumns.Accept(visitor); err != nil {
		return err
	}
	if p.GroupBy != nil {
		if err := p.GroupBy.Accept(visitor); err != nil {
			return err
		}
	}
	if p.OrderBy != nil {
		if err := p.OrderBy.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitProjectionSelect(p)
}

type TableProjection struct {
	IncludeProjectionKeyword bool
	ProjectionPos            Pos
	Identifier               *NestedIdentifier
	Select                   *ProjectionSelectStmt
}

func (t *TableProjection) Pos() Pos {
	return t.ProjectionPos
}

func (t *TableProjection) End() Pos {
	return t.Select.End()
}

func (t *TableProjection) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Identifier.Accept(visitor); err != nil {
		return err
	}
	if err := t.Select.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTableProjection(t)
}

type AlterTableAddProjection struct {
	AddPos       Pos
	StatementEnd Pos

	IfNotExists     bool
	TableProjection *TableProjection
	After           *NestedIdentifier
}

func (a *AlterTableAddProjection) Pos() Pos {
	return a.AddPos
}

func (a *AlterTableAddProjection) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableAddProjection) AlterType() string {
	return "ADD_PROJECTION"
}

func (a *AlterTableAddProjection) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.TableProjection.Accept(visitor); err != nil {
		return err
	}
	if a.After != nil {
		if err := a.After.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableAddProjection(a)
}

type AlterTableDropColumn struct {
	DropPos    Pos
	ColumnName *NestedIdentifier
	IfExists   bool
}

func (a *AlterTableDropColumn) Pos() Pos {
	return a.DropPos
}

func (a *AlterTableDropColumn) End() Pos {
	return a.ColumnName.End()
}

func (a *AlterTableDropColumn) AlterType() string {
	return "DROP_COLUMN"
}

func (a *AlterTableDropColumn) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.ColumnName.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableDropColumn(a)
}

type AlterTableDropIndex struct {
	DropPos   Pos
	IndexName *NestedIdentifier
	IfExists  bool
}

func (a *AlterTableDropIndex) Pos() Pos {
	return a.DropPos
}

func (a *AlterTableDropIndex) End() Pos {
	return a.IndexName.End()
}

func (a *AlterTableDropIndex) AlterType() string {
	return "DROP_INDEX"
}

func (a *AlterTableDropIndex) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.IndexName.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableDropIndex(a)
}

type AlterTableDropProjection struct {
	DropPos        Pos
	ProjectionName *NestedIdentifier
	IfExists       bool
}

func (a *AlterTableDropProjection) Pos() Pos {
	return a.DropPos
}

func (a *AlterTableDropProjection) End() Pos {
	return a.ProjectionName.End()
}

func (a *AlterTableDropProjection) AlterType() string {
	return "DROP_PROJECTION"
}

func (a *AlterTableDropProjection) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.ProjectionName.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableDropProjection(a)
}

type AlterTableRemoveTTL struct {
	RemovePos    Pos
	StatementEnd Pos
}

func (a *AlterTableRemoveTTL) Pos() Pos {
	return a.RemovePos
}

func (a *AlterTableRemoveTTL) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableRemoveTTL) AlterType() string {
	return "REMOVE_TTL"
}

func (a *AlterTableRemoveTTL) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	return visitor.VisitAlterTableRemoveTTL(a)
}

type AlterTableClearColumn struct {
	ClearPos     Pos
	StatementEnd Pos

	IfExists      bool
	ColumnName    *NestedIdentifier
	PartitionExpr *PartitionClause
}

func (a *AlterTableClearColumn) Pos() Pos {
	return a.ClearPos
}

func (a *AlterTableClearColumn) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableClearColumn) AlterType() string {
	return "CLEAR_COLUMN"
}

func (a *AlterTableClearColumn) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.ColumnName.Accept(visitor); err != nil {
		return err
	}
	if a.PartitionExpr != nil {
		if err := a.PartitionExpr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableClearColumn(a)
}

type AlterTableClearIndex struct {
	ClearPos     Pos
	StatementEnd Pos

	IfExists      bool
	IndexName     *NestedIdentifier
	PartitionExpr *PartitionClause
}

func (a *AlterTableClearIndex) Pos() Pos {
	return a.ClearPos
}

func (a *AlterTableClearIndex) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableClearIndex) AlterType() string {
	return "CLEAR_INDEX"
}

func (a *AlterTableClearIndex) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.IndexName.Accept(visitor); err != nil {
		return err
	}
	if a.PartitionExpr != nil {
		if err := a.PartitionExpr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableClearIndex(a)
}

type AlterTableClearProjection struct {
	ClearPos     Pos
	StatementEnd Pos

	IfExists       bool
	ProjectionName *NestedIdentifier
	PartitionExpr  *PartitionClause
}

func (a *AlterTableClearProjection) Pos() Pos {
	return a.ClearPos
}

func (a *AlterTableClearProjection) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableClearProjection) AlterType() string {
	return "CLEAR_PROJECTION"
}

func (a *AlterTableClearProjection) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.ProjectionName.Accept(visitor); err != nil {
		return err
	}
	if a.PartitionExpr != nil {
		if err := a.PartitionExpr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableClearProjection(a)
}

type AlterTableRenameColumn struct {
	RenamePos Pos

	IfExists      bool
	OldColumnName *NestedIdentifier
	NewColumnName *NestedIdentifier
}

func (a *AlterTableRenameColumn) Pos() Pos {
	return a.RenamePos
}

func (a *AlterTableRenameColumn) End() Pos {
	return a.NewColumnName.End()
}

func (a *AlterTableRenameColumn) AlterType() string {
	return "RENAME_COLUMN"
}

func (a *AlterTableRenameColumn) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.OldColumnName.Accept(visitor); err != nil {
		return err
	}
	if err := a.NewColumnName.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableRenameColumn(a)
}

type AlterTableModifyQuery struct {
	ModifyPos    Pos
	StatementEnd Pos
	SelectExpr   *SelectQuery
}

func (a *AlterTableModifyQuery) Pos() Pos {
	return a.ModifyPos
}

func (a *AlterTableModifyQuery) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableModifyQuery) AlterType() string {
	return "MODIFY_QUERY"
}

func (a *AlterTableModifyQuery) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.SelectExpr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableModifyQuery(a)
}

type AlterTableModifyTTL struct {
	ModifyPos    Pos
	StatementEnd Pos
	TTL          *TTLClause
}

func (a *AlterTableModifyTTL) Pos() Pos {
	return a.ModifyPos
}

func (a *AlterTableModifyTTL) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableModifyTTL) AlterType() string {
	return "MODIFY_TTL"
}

func (a *AlterTableModifyTTL) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.TTL.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableModifyTTL(a)
}

type AlterTableModifyColumn struct {
	ModifyPos    Pos
	StatementEnd Pos

	IfExists           bool
	Column             *ColumnDef
	RemovePropertyType *RemovePropertyType
}

func (a *AlterTableModifyColumn) Pos() Pos {
	return a.ModifyPos
}

func (a *AlterTableModifyColumn) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableModifyColumn) AlterType() string {
	return "MODIFY_COLUMN"
}

func (a *AlterTableModifyColumn) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Column.Accept(visitor); err != nil {
		return err
	}
	if a.RemovePropertyType != nil {
		if err := a.RemovePropertyType.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableModifyColumn(a)
}

type AlterTableModifySetting struct {
	ModifyPos    Pos
	StatementEnd Pos
	Settings     []*SettingExpr
}

func (a *AlterTableModifySetting) Pos() Pos {
	return a.ModifyPos
}

func (a *AlterTableModifySetting) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableModifySetting) AlterType() string {
	return "MODIFY_SETTING"
}

func (a *AlterTableModifySetting) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	for _, setting := range a.Settings {
		if err := setting.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableModifySetting(a)
}

type AlterTableResetSetting struct {
	ResetPos     Pos
	StatementEnd Pos
	Settings     []*Ident
}

func (a *AlterTableResetSetting) Pos() Pos {
	return a.ResetPos
}

func (a *AlterTableResetSetting) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableResetSetting) AlterType() string {
	return "RESET_SETTING"
}

func (a *AlterTableResetSetting) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	for _, setting := range a.Settings {
		if err := setting.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterTableResetSetting(a)
}

type AlterTableReplacePartition struct {
	ReplacePos Pos
	Partition  *PartitionClause
	Table      *TableIdentifier
}

func (a *AlterTableReplacePartition) Pos() Pos {
	return a.ReplacePos
}

func (a *AlterTableReplacePartition) End() Pos {
	return a.Table.End()
}

func (a *AlterTableReplacePartition) AlterType() string {
	return "REPLACE_PARTITION"
}

func (a *AlterTableReplacePartition) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Partition.Accept(visitor); err != nil {
		return err
	}
	if err := a.Table.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableReplacePartition(a)
}

type AlterTableDelete struct {
	DeletePos    Pos
	StatementEnd Pos
	WhereClause  Expr
}

func (a *AlterTableDelete) Pos() Pos {
	return a.DeletePos
}

func (a *AlterTableDelete) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableDelete) AlterType() string {
	return "DELETE"
}

func (a *AlterTableDelete) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.WhereClause.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableDelete(a)
}

type AlterTableUpdate struct {
	UpdatePos    Pos
	StatementEnd Pos
	Assignments  []*UpdateAssignment
	InPartition  *PartitionClause
	WhereClause  Expr
}

func (a *AlterTableUpdate) Pos() Pos {
	return a.UpdatePos
}

func (a *AlterTableUpdate) End() Pos {
	return a.StatementEnd
}

func (a *AlterTableUpdate) AlterType() string {
	return "UPDATE"
}

func (a *AlterTableUpdate) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	for _, assignment := range a.Assignments {
		if err := assignment.Accept(visitor); err != nil {
			return err
		}
	}
	if a.InPartition != nil {
		if err := a.InPartition.Accept(visitor); err != nil {
			return err
		}
	}
	if err := a.WhereClause.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAlterTableUpdate(a)
}

type UpdateAssignment struct {
	AssignmentPos Pos
	Column        *NestedIdentifier
	Expr          Expr
}

func (u *UpdateAssignment) Pos() Pos {
	return u.AssignmentPos
}

func (u *UpdateAssignment) End() Pos {
	return u.Expr.End()
}

func (u *UpdateAssignment) Accept(visitor ASTVisitor) error {
	visitor.Enter(u)
	defer visitor.Leave(u)
	if err := u.Column.Accept(visitor); err != nil {
		return err
	}
	if err := u.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitUpdateAssignment(u)
}

type RemovePropertyType struct {
	RemovePos Pos

	PropertyType Expr
}

func (a *RemovePropertyType) Pos() Pos {
	return a.RemovePos
}

func (a *RemovePropertyType) End() Pos {
	return a.PropertyType.End()
}

func (a *RemovePropertyType) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.PropertyType.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitRemovePropertyType(a)
}

type TableIndex struct {
	IndexPos Pos

	Name        *NestedIdentifier
	ColumnExpr  *ColumnExpr
	ColumnType  Expr
	Granularity *NumberLiteral
}

func (a *TableIndex) Pos() Pos {
	return a.IndexPos
}

func (a *TableIndex) End() Pos {
	return a.Granularity.End()
}

func (a *TableIndex) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Name.Accept(visitor); err != nil {
		return err
	}
	if err := a.ColumnExpr.Accept(visitor); err != nil {
		return err
	}
	if err := a.ColumnType.Accept(visitor); err != nil {
		return err
	}
	if err := a.Granularity.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTableIndex(a)
}

type Ident struct {
	Name      string
	QuoteType int
	NamePos   Pos
	NameEnd   Pos
}

func (i *Ident) Pos() Pos {
	return i.NamePos
}

func (i *Ident) End() Pos {
	return i.NameEnd
}

func (i *Ident) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	return visitor.VisitIdent(i)
}

type UUID struct {
	Value *StringLiteral
}

func (u *UUID) Pos() Pos {
	return u.Value.LiteralPos
}

func (u *UUID) End() Pos {
	return u.Value.LiteralEnd
}

func (u *UUID) Accept(visitor ASTVisitor) error {
	visitor.Enter(u)
	defer visitor.Leave(u)
	return visitor.VisitUUID(u)
}

type CreateDatabase struct {
	CreatePos    Pos // position of CREATE keyword
	StatementEnd Pos
	Name         Expr
	IfNotExists  bool // true if 'IF NOT EXISTS' is specified
	OnCluster    *ClusterClause
	Engine       *EngineExpr
	Comment      *StringLiteral
}

func (c *CreateDatabase) Pos() Pos {
	return c.CreatePos
}

func (c *CreateDatabase) End() Pos {
	return c.StatementEnd
}

func (c *CreateDatabase) Type() string {
	return "DATABASE"
}

func (c *CreateDatabase) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Engine != nil {
		if err := c.Engine.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateDatabase(c)
}

type CreateTable struct {
	CreatePos     Pos // position of CREATE|ATTACH keyword
	StatementEnd  Pos
	OrReplace     bool
	Name          *TableIdentifier
	IfNotExists   bool
	UUID          *UUID
	OnCluster     *ClusterClause
	TableSchema   *TableSchemaClause
	Engine        *EngineExpr
	SubQuery      *SubQuery
	TableFunction *TableFunctionExpr
	HasTemporary  bool
	Comment       *StringLiteral
}

func (c *CreateTable) Pos() Pos {
	return c.CreatePos
}

func (c *CreateTable) End() Pos {
	return c.StatementEnd
}

func (c *CreateTable) Type() string {
	return "CREATE TABLE"
}

func (c *CreateTable) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.UUID != nil {
		if err := c.UUID.Accept(visitor); err != nil {
			return err
		}
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if c.TableSchema != nil {
		if err := c.TableSchema.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Engine != nil {
		if err := c.Engine.Accept(visitor); err != nil {
			return err
		}
	}
	if c.SubQuery != nil {
		if err := c.SubQuery.Accept(visitor); err != nil {
			return err
		}
	}
	if c.TableFunction != nil {
		if err := c.TableFunction.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateTable(c)
}

type CreateMaterializedView struct {
	CreatePos    Pos // position of CREATE|ATTACH keyword
	StatementEnd Pos
	Name         *TableIdentifier
	IfNotExists  bool
	OnCluster    *ClusterClause
	Refresh      *RefreshExpr
	RandomizeFor *IntervalExpr
	DependsOn    []*TableIdentifier
	Settings     *SettingsClause
	HasAppend    bool
	Engine       *EngineExpr
	HasEmpty     bool
	Destination  *DestinationClause
	SubQuery     *SubQuery
	Populate     bool
	Comment      *StringLiteral
	Definer      *Ident
	SQLSecurity  string
}

func (c *CreateMaterializedView) Pos() Pos {
	return c.CreatePos
}

func (c *CreateMaterializedView) End() Pos {
	return c.StatementEnd
}

func (c *CreateMaterializedView) Type() string {
	return "MATERIALIZED_VIEW"
}

func (c *CreateMaterializedView) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Refresh != nil {
		if err := c.Refresh.Accept(visitor); err != nil {
			return err
		}
	}
	if c.RandomizeFor != nil {
		if err := c.RandomizeFor.Accept(visitor); err != nil {
			return err
		}
	}
	if c.DependsOn != nil {
		for _, dep := range c.DependsOn {
			if err := dep.Accept(visitor); err != nil {
				return err
			}
		}
	}
	if c.Settings != nil {
		if err := c.Settings.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Engine != nil {
		if err := c.Engine.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Destination != nil {
		if err := c.Destination.Accept(visitor); err != nil {
			return err
		}
		if c.Destination.TableSchema != nil {
			if err := c.Destination.TableSchema.Accept(visitor); err != nil {
				return err
			}
		}
	}
	if c.SubQuery != nil {
		if err := c.SubQuery.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Definer != nil {
		if err := c.Definer.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Comment != nil {
		if err := c.Comment.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateMaterializedView(c)
}

type CreateView struct {
	CreatePos    Pos // position of CREATE|ATTACH keyword
	StatementEnd Pos
	OrReplace    bool
	Name         *TableIdentifier
	IfNotExists  bool
	UUID         *UUID
	OnCluster    *ClusterClause
	TableSchema  *TableSchemaClause
	Comment      *StringLiteral
	SubQuery     *SubQuery
}

func (c *CreateView) Pos() Pos {
	return c.CreatePos
}

func (c *CreateView) End() Pos {
	return c.StatementEnd
}

func (c *CreateView) Type() string {
	return "VIEW"
}

func (c *CreateView) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.UUID != nil {
		if err := c.UUID.Accept(visitor); err != nil {
			return err
		}
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if c.TableSchema != nil {
		if err := c.TableSchema.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Comment != nil {
		if err := c.Comment.Accept(visitor); err != nil {
			return err
		}
	}
	if c.SubQuery != nil {
		if err := c.SubQuery.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateView(c)
}

type CreateFunction struct {
	CreatePos    Pos
	OrReplace    bool
	IfNotExists  bool
	FunctionName *Ident
	OnCluster    *ClusterClause
	Params       *ParamExprList
	Expr         Expr
}

func (c *CreateFunction) Type() string {
	return "FUNCTION"
}

func (c *CreateFunction) Pos() Pos {
	return c.CreatePos
}

func (c *CreateFunction) End() Pos {
	return c.Expr.End()
}

func (c *CreateFunction) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.FunctionName.Accept(visitor); err != nil {
		return err
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if err := c.Params.Accept(visitor); err != nil {
		return err
	}
	if err := c.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitCreateFunction(c)
}

type RoleName struct {
	Name      Expr
	Scope     *StringLiteral
	OnCluster *ClusterClause
}

func (r *RoleName) Pos() Pos {
	return r.Name.Pos()
}

func (r *RoleName) End() Pos {
	if r.Scope != nil {
		return r.Scope.End()
	}
	if r.OnCluster != nil {
		return r.OnCluster.End()
	}
	return r.Name.End()
}

func (r *RoleName) Accept(visitor ASTVisitor) error {
	visitor.Enter(r)
	defer visitor.Leave(r)
	if err := r.Name.Accept(visitor); err != nil {
		return err
	}
	if r.Scope != nil {
		if err := r.Scope.Accept(visitor); err != nil {
			return err
		}
	}
	if r.OnCluster != nil {
		if err := r.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitRoleName(r)
}

type SettingPair struct {
	Name      *Ident
	Operation TokenKind
	Value     Expr
}

func (s *SettingPair) Pos() Pos {
	return s.Name.NamePos
}

func (s *SettingPair) End() Pos {
	return s.Value.End()
}

func (s *SettingPair) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Name.Accept(visitor); err != nil {
		return err
	}
	if s.Value != nil {
		if err := s.Value.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSettingPair(s)
}

type RoleSetting struct {
	SettingPairs []*SettingPair
	Modifier     *Ident
}

func (r *RoleSetting) Pos() Pos {
	if len(r.SettingPairs) > 0 {
		return r.SettingPairs[0].Pos()
	}
	return r.Modifier.NamePos
}

func (r *RoleSetting) End() Pos {
	if r.Modifier != nil {
		return r.Modifier.NameEnd
	}
	return r.SettingPairs[len(r.SettingPairs)-1].End()
}

func (r *RoleSetting) Accept(visitor ASTVisitor) error {
	visitor.Enter(r)
	defer visitor.Leave(r)
	for _, settingPair := range r.SettingPairs {
		if err := settingPair.Accept(visitor); err != nil {
			return err
		}
	}
	if r.Modifier != nil {
		if err := r.Modifier.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitRoleSetting(r)
}

type CreateRole struct {
	CreatePos         Pos
	StatementEnd      Pos
	IfNotExists       bool
	OrReplace         bool
	RoleNames         []*RoleName
	AccessStorageType *Ident
	Settings          []*RoleSetting
}

func (c *CreateRole) Pos() Pos {
	return c.CreatePos
}

func (c *CreateRole) End() Pos {
	return c.StatementEnd
}

func (c *CreateRole) Type() string {
	return "ROLE"
}

func (c *CreateRole) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	for _, roleName := range c.RoleNames {
		if err := roleName.Accept(visitor); err != nil {
			return err
		}
	}
	if c.AccessStorageType != nil {
		if err := c.AccessStorageType.Accept(visitor); err != nil {
			return err
		}
	}
	for _, setting := range c.Settings {
		if err := setting.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateRole(c)
}

type AuthenticationClause struct {
	AuthPos       Pos
	AuthEnd       Pos
	NotIdentified bool
	AuthType      string // "no_password", "plaintext_password", "sha256_password", etc.
	AuthValue     *StringLiteral
	LdapServer    *StringLiteral
	KerberosRealm *StringLiteral
	IsKerberos    bool
}

func (a *AuthenticationClause) Pos() Pos {
	return a.AuthPos
}

func (a *AuthenticationClause) End() Pos {
	return a.AuthEnd
}

func (a *AuthenticationClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if a.AuthValue != nil {
		if err := a.AuthValue.Accept(visitor); err != nil {
			return err
		}
	}
	if a.LdapServer != nil {
		if err := a.LdapServer.Accept(visitor); err != nil {
			return err
		}
	}
	if a.KerberosRealm != nil {
		if err := a.KerberosRealm.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAuthenticationClause(a)
}

type HostClause struct {
	HostPos   Pos
	HostEnd   Pos
	HostType  string // "LOCAL", "NAME", "REGEXP", "IP", "LIKE", "ANY", "NONE"
	HostValue *StringLiteral
}

func (h *HostClause) Pos() Pos {
	return h.HostPos
}

func (h *HostClause) End() Pos {
	return h.HostEnd
}

func (h *HostClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(h)
	defer visitor.Leave(h)
	if h.HostValue != nil {
		if err := h.HostValue.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitHostClause(h)
}

type DefaultRoleClause struct {
	DefaultPos Pos
	DefaultEnd Pos
	Roles      []*RoleName
	None       bool
}

func (d *DefaultRoleClause) Pos() Pos {
	return d.DefaultPos
}

func (d *DefaultRoleClause) End() Pos {
	return d.DefaultEnd
}

func (d *DefaultRoleClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	for _, role := range d.Roles {
		if err := role.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDefaultRoleClause(d)
}

type GranteesClause struct {
	GranteesPos Pos
	GranteesEnd Pos
	Grantees    []*RoleName
	ExceptUsers []*RoleName
	Any         bool
	None        bool
}

func (g *GranteesClause) Pos() Pos {
	return g.GranteesPos
}

func (g *GranteesClause) End() Pos {
	return g.GranteesEnd
}

func (g *GranteesClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(g)
	defer visitor.Leave(g)
	for _, grantee := range g.Grantees {
		if err := grantee.Accept(visitor); err != nil {
			return err
		}
	}
	for _, except := range g.ExceptUsers {
		if err := except.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitGranteesClause(g)
}

type CreateUser struct {
	CreatePos       Pos
	StatementEnd    Pos
	IfNotExists     bool
	OrReplace       bool
	UserNames       []*RoleName
	Authentication  *AuthenticationClause
	ValidUntil      *StringLiteral
	Hosts           []*HostClause
	DefaultRole     *DefaultRoleClause
	DefaultDatabase *Ident
	DefaultDbNone   bool
	Grantees        *GranteesClause
	Settings        []*RoleSetting
}

func (c *CreateUser) Pos() Pos {
	return c.CreatePos
}

func (c *CreateUser) End() Pos {
	return c.StatementEnd
}

func (c *CreateUser) Type() string {
	return "USER"
}

func (c *CreateUser) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	for _, userName := range c.UserNames {
		if err := userName.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Authentication != nil {
		if err := c.Authentication.Accept(visitor); err != nil {
			return err
		}
	}
	if c.ValidUntil != nil {
		if err := c.ValidUntil.Accept(visitor); err != nil {
			return err
		}
	}
	for _, host := range c.Hosts {
		if err := host.Accept(visitor); err != nil {
			return err
		}
	}
	if c.DefaultRole != nil {
		if err := c.DefaultRole.Accept(visitor); err != nil {
			return err
		}
	}
	if c.DefaultDatabase != nil {
		if err := c.DefaultDatabase.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Grantees != nil {
		if err := c.Grantees.Accept(visitor); err != nil {
			return err
		}
	}
	for _, setting := range c.Settings {
		if err := setting.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateUser(c)
}

type AlterRole struct {
	AlterPos        Pos
	StatementEnd    Pos
	IfExists        bool
	RoleRenamePairs []*RoleRenamePair
	Settings        []*RoleSetting
}

func (a *AlterRole) Pos() Pos {
	return a.AlterPos
}

func (a *AlterRole) End() Pos {
	return a.StatementEnd
}

func (a *AlterRole) Type() string {
	return "ROLE"
}

func (a *AlterRole) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	for _, roleRenamePair := range a.RoleRenamePairs {
		if err := roleRenamePair.Accept(visitor); err != nil {
			return err
		}
	}
	for _, setting := range a.Settings {
		if err := setting.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitAlterRole(a)
}

type RoleRenamePair struct {
	RoleName     *RoleName
	NewName      Expr
	StatementEnd Pos
}

func (r *RoleRenamePair) Pos() Pos {
	return r.RoleName.Pos()
}

func (r *RoleRenamePair) End() Pos {
	return r.StatementEnd
}

func (r *RoleRenamePair) Accept(visitor ASTVisitor) error {
	visitor.Enter(r)
	defer visitor.Leave(r)
	if err := r.RoleName.Accept(visitor); err != nil {
		return err
	}
	if r.NewName != nil {
		if err := r.NewName.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitRoleRenamePair(r)
}

type DestinationClause struct {
	ToPos           Pos
	TableIdentifier *TableIdentifier
	TableSchema     *TableSchemaClause
}

func (d *DestinationClause) Pos() Pos {
	return d.ToPos
}

func (d *DestinationClause) End() Pos {
	return d.TableIdentifier.End()
}

func (d *DestinationClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.TableIdentifier.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitDestinationExpr(d)
}

type ConstraintClause struct {
	ConstraintPos Pos
	Constraint    *Ident
	Expr          Expr
}

func (c *ConstraintClause) Pos() Pos {
	return c.ConstraintPos
}

func (c *ConstraintClause) End() Pos {
	return c.Expr.End()
}

func (c *ConstraintClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Constraint.Accept(visitor); err != nil {
		return err
	}
	if err := c.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitConstraintExpr(c)
}

type NullLiteral struct {
	NullPos Pos
}

func (n *NullLiteral) Pos() Pos {
	return n.NullPos
}

func (n *NullLiteral) End() Pos {
	return n.NullPos + 4
}

func (n *NullLiteral) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	return visitor.VisitNullLiteral(n)
}

type NotNullLiteral struct {
	NotPos      Pos
	NullLiteral *NullLiteral
}

func (n *NotNullLiteral) Pos() Pos {
	return n.NotPos
}

func (n *NotNullLiteral) End() Pos {
	return n.NullLiteral.End()
}

func (n *NotNullLiteral) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.NullLiteral.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitNotNullLiteral(n)
}

type NestedIdentifier struct {
	Ident    *Ident
	DotIdent *Ident
}

func (n *NestedIdentifier) Pos() Pos {
	return n.Ident.Pos()
}

func (n *NestedIdentifier) End() Pos {
	if n.DotIdent != nil {
		return n.DotIdent.End()
	}
	return n.Ident.End()
}

func (n *NestedIdentifier) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Ident.Accept(visitor); err != nil {
		return err
	}
	if n.DotIdent != nil {
		if err := n.DotIdent.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitNestedIdentifier(n)
}

type Path struct {
	Fields []*Ident
}

func (p *Path) Pos() Pos {
	if len(p.Fields) > 0 {
		return p.Fields[0].Pos()
	}
	return 0
}

func (p *Path) End() Pos {
	if len(p.Fields) > 0 {
		return p.Fields[len(p.Fields)-1].End()
	}
	return 0
}

func (p *Path) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	for _, ident := range p.Fields {
		if err := ident.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitPath(p)
}

type TableIdentifier struct {
	Database *Ident
	Table    *Ident
}

func (t *TableIdentifier) Pos() Pos {
	if t.Database != nil {
		return t.Database.Pos()
	}
	return t.Table.Pos()
}

func (t *TableIdentifier) End() Pos {
	return t.Table.End()
}

func (t *TableIdentifier) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if t.Database != nil {
		if err := t.Database.Accept(visitor); err != nil {
			return err
		}
	}
	if err := t.Table.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTableIdentifier(t)
}

type TableSchemaClause struct {
	SchemaPos     Pos
	SchemaEnd     Pos
	Columns       []Expr
	AliasTable    *TableIdentifier
	TableFunction *TableFunctionExpr
}

func (t *TableSchemaClause) Pos() Pos {
	return t.SchemaPos
}

func (t *TableSchemaClause) End() Pos {
	return t.SchemaEnd
}

func (t *TableSchemaClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	for _, column := range t.Columns {
		if err := column.Accept(visitor); err != nil {
			return err
		}
	}
	if t.AliasTable != nil {
		if err := t.AliasTable.Accept(visitor); err != nil {
			return err
		}
	}
	if t.TableFunction != nil {
		if err := t.TableFunction.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTableSchemaExpr(t)
}

type TableArgListExpr struct {
	LeftParenPos  Pos
	RightParenPos Pos
	Args          []Expr
}

func (t *TableArgListExpr) Pos() Pos {
	return t.LeftParenPos
}

func (t *TableArgListExpr) End() Pos {
	return t.RightParenPos
}

func (t *TableArgListExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	for _, arg := range t.Args {
		if err := arg.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTableArgListExpr(t)
}

type TableFunctionExpr struct {
	Name Expr
	Args *TableArgListExpr
}

func (t *TableFunctionExpr) Pos() Pos {
	return t.Name.Pos()
}

func (t *TableFunctionExpr) End() Pos {
	return t.Args.End()
}

func (t *TableFunctionExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Name.Accept(visitor); err != nil {
		return err
	}
	if err := t.Args.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTableFunctionExpr(t)
}

type ClusterClause struct {
	OnPos Pos
	Expr  Expr
}

func (o *ClusterClause) Pos() Pos {
	return o.OnPos
}

func (o *ClusterClause) End() Pos {
	return o.Expr.End()
}

func (o *ClusterClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	if err := o.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitOnClusterExpr(o)
}

type PartitionClause struct {
	PartitionPos Pos
	Expr         Expr
	ID           *StringLiteral
	All          bool
}

func (p *PartitionClause) Pos() Pos {
	return p.PartitionPos
}

func (p *PartitionClause) End() Pos {
	if p.ID != nil {
		return p.ID.LiteralEnd
	}
	return p.Expr.End()
}

func (p *PartitionClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	if p.Expr != nil {
		if err := p.Expr.Accept(visitor); err != nil {
			return err
		}
	}
	if p.ID != nil {
		if err := p.ID.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitPartitionExpr(p)
}

type PartitionByClause struct {
	PartitionPos Pos
	Expr         Expr
}

func (p *PartitionByClause) Pos() Pos {
	return p.PartitionPos
}

func (p *PartitionByClause) End() Pos {
	return p.Expr.End()
}

func (p *PartitionByClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	if err := p.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitPartitionByExpr(p)
}

type PrimaryKeyClause struct {
	PrimaryPos Pos
	Expr       Expr
}

func (p *PrimaryKeyClause) Pos() Pos {
	return p.PrimaryPos
}

func (p *PrimaryKeyClause) End() Pos {
	return p.Expr.End()
}

func (p *PrimaryKeyClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	if err := p.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitPrimaryKeyExpr(p)
}

type SampleByClause struct {
	SamplePos Pos
	Expr      Expr
}

func (s *SampleByClause) Pos() Pos {
	return s.SamplePos
}

func (s *SampleByClause) End() Pos {
	return s.Expr.End()
}

func (s *SampleByClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitSampleByExpr(s)
}

type TTLPolicyRuleAction struct {
	ActionPos Pos
	ActionEnd Pos
	Action    string
	Codec     *CompressionCodec
}

func (t *TTLPolicyRuleAction) Pos() Pos {
	return t.ActionPos
}

func (t *TTLPolicyRuleAction) End() Pos {
	if t.Codec != nil {
		return t.Codec.End()
	}
	return t.ActionEnd
}

func (t *TTLPolicyRuleAction) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if t.Codec != nil {
		if err := t.Codec.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTTLPolicyItemAction(t)
}

type RefreshExpr struct {
	RefreshPos Pos
	Frequency  string // EVERY|AFTER
	Interval   *IntervalExpr
	Offset     *IntervalExpr
}

func (r *RefreshExpr) Pos() Pos {
	return r.RefreshPos
}

func (r *RefreshExpr) End() Pos {
	if r.Offset != nil {
		return r.Offset.End()
	}
	return r.Interval.End()
}

func (r *RefreshExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(r)
	defer visitor.Leave(r)
	if r.Interval != nil {
		if err := r.Interval.Accept(visitor); err != nil {
			return err
		}
	}
	if r.Offset != nil {
		if err := r.Offset.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitRefreshExpr(r)
}

type TTLPolicyRule struct {
	RulePos  Pos
	ToVolume *StringLiteral
	ToDisk   *StringLiteral
	Action   *TTLPolicyRuleAction
}

func (t *TTLPolicyRule) Pos() Pos {
	return t.RulePos
}

func (t *TTLPolicyRule) End() Pos {
	if t.Action != nil {
		return t.Action.End()
	}
	if t.ToDisk != nil {
		return t.ToDisk.LiteralEnd
	}
	return t.ToVolume.LiteralEnd
}

func (t *TTLPolicyRule) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if t.ToVolume != nil {
		if err := t.ToVolume.Accept(visitor); err != nil {
			return err
		}
	}
	if t.ToDisk != nil {
		if err := t.ToDisk.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTTLPolicyRule(t)
}

type TTLPolicy struct {
	Item    *TTLPolicyRule
	Where   *WhereClause
	GroupBy *GroupByClause
}

func (t *TTLPolicy) Pos() Pos {
	if t.Item != nil {
		return t.Item.Pos()
	}
	if t.Where != nil {
		return t.Where.Pos()
	}
	return t.GroupBy.Pos()
}

func (t *TTLPolicy) End() Pos {
	if t.GroupBy != nil {
		return t.GroupBy.End()
	}
	if t.Where != nil {
		return t.Where.End()
	}
	return t.Item.End()
}

func (t *TTLPolicy) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if t.Item != nil {
		if err := t.Item.Accept(visitor); err != nil {
			return err
		}
	}
	if t.Where != nil {
		if err := t.Where.Accept(visitor); err != nil {
			return err
		}
	}
	if t.GroupBy != nil {
		if err := t.GroupBy.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTTLPolicy(t)
}

type TTLExpr struct {
	TTLPos Pos
	Expr   Expr
	Policy *TTLPolicy
}

func (t *TTLExpr) Pos() Pos {
	return t.TTLPos
}

func (t *TTLExpr) End() Pos {
	return t.Expr.End()
}

func (t *TTLExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Expr.Accept(visitor); err != nil {
		return err
	}
	if t.Policy != nil {
		if err := t.Policy.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTTLExpr(t)
}

type TTLClause struct {
	TTLPos  Pos
	ListEnd Pos
	Items   []*TTLExpr
}

func (t *TTLClause) Pos() Pos {
	return t.TTLPos
}

func (t *TTLClause) End() Pos {
	return t.ListEnd
}

func (t *TTLClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	for _, item := range t.Items {
		if err := item.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTTLExprList(t)
}

type Fill struct {
	FillPos   Pos
	From      Expr // optional
	To        Expr // optional
	Step      Expr // optional
	Staleness Expr // optional
}

func (f *Fill) Pos() Pos {
	return f.FillPos
}

func (f *Fill) End() Pos {
	if f.Staleness != nil {
		return f.Staleness.End()
	}
	if f.Step != nil {
		return f.Step.End()
	}
	if f.To != nil {
		return f.To.End()
	}
	if f.From != nil {
		return f.From.End()
	}
	return f.FillPos + Pos(len("FILL"))
}

func (f *Fill) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if f.From != nil {
		if err := f.From.Accept(visitor); err != nil {
			return err
		}
	}
	if f.To != nil {
		if err := f.To.Accept(visitor); err != nil {
			return err
		}
	}
	if f.Step != nil {
		if err := f.Step.Accept(visitor); err != nil {
			return err
		}
	}
	if f.Staleness != nil {
		if err := f.Staleness.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitFill(f)
}

type OrderExpr struct {
	OrderPos  Pos
	Expr      Expr
	Alias     *Ident
	Direction OrderDirection
	Fill      *Fill // optional WITH FILL clause
}

func (o *OrderExpr) Pos() Pos {
	return o.OrderPos
}

func (o *OrderExpr) End() Pos {
	if o.Fill != nil {
		return o.Fill.End()
	}
	if o.Alias != nil {
		return o.Alias.End()
	}
	return o.Expr.End()
}

func (o *OrderExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	if err := o.Expr.Accept(visitor); err != nil {
		return err
	}
	if o.Alias != nil {
		if err := o.Alias.Accept(visitor); err != nil {
			return err
		}
	}
	if o.Fill != nil {
		if err := o.Fill.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitOrderByExpr(o)
}

type InterpolateItem struct {
	Column *Ident
	Expr   Expr // optional AS expression
}

func (i *InterpolateItem) Pos() Pos {
	return i.Column.Pos()
}

func (i *InterpolateItem) End() Pos {
	if i.Expr != nil {
		return i.Expr.End()
	}
	return i.Column.End()
}

func (i *InterpolateItem) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	if err := i.Column.Accept(visitor); err != nil {
		return err
	}
	if i.Expr != nil {
		if err := i.Expr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitInterpolateItem(i)
}

type InterpolateClause struct {
	InterpolatePos Pos
	ListEnd        Pos
	Items          []*InterpolateItem // can be nil for INTERPOLATE without columns
}

func (i *InterpolateClause) Pos() Pos {
	return i.InterpolatePos
}

func (i *InterpolateClause) End() Pos {
	return i.ListEnd
}

func (i *InterpolateClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	for _, item := range i.Items {
		if err := item.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitInterpolateClause(i)
}

type OrderByClause struct {
	OrderPos    Pos
	ListEnd     Pos
	Items       []Expr
	Interpolate *InterpolateClause // optional INTERPOLATE clause
}

func (o *OrderByClause) Pos() Pos {
	return o.OrderPos
}

func (o *OrderByClause) End() Pos {
	if o.Interpolate != nil {
		return o.Interpolate.End()
	}
	return o.ListEnd
}

func (o *OrderByClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	for _, item := range o.Items {
		if err := item.Accept(visitor); err != nil {
			return err
		}
	}
	if o.Interpolate != nil {
		if err := o.Interpolate.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitOrderByListExpr(o)
}

type SettingExpr struct {
	SettingsPos Pos
	Name        *Ident
	Expr        Expr
}

func (s *SettingExpr) Pos() Pos {
	return s.SettingsPos
}

func (s *SettingExpr) End() Pos {
	return s.Expr.End()
}

func (s *SettingExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Name.Accept(visitor); err != nil {
		return err
	}
	if err := s.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitSettingsExpr(s)
}

type SettingsClause struct {
	SettingsPos Pos
	ListEnd     Pos
	Items       []*SettingExpr
}

func (s *SettingsClause) Pos() Pos {
	return s.SettingsPos
}

func (s *SettingsClause) End() Pos {
	return s.ListEnd
}

func (s *SettingsClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	for _, item := range s.Items {
		if err := item.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSettingsExprList(s)
}

type ParamExprList struct {
	LeftParenPos  Pos
	RightParenPos Pos
	Items         *ColumnExprList
	ColumnArgList *ColumnArgList
}

func (f *ParamExprList) Pos() Pos {
	return f.LeftParenPos
}

func (f *ParamExprList) End() Pos {
	return f.RightParenPos
}

func (f *ParamExprList) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Items.Accept(visitor); err != nil {
		return err
	}
	if f.ColumnArgList != nil {
		if err := f.ColumnArgList.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitParamExprList(f)
}

type KeyValue struct {
	Key   StringLiteral
	Value Expr
}

type MapLiteral struct {
	LBracePos Pos
	RBracePos Pos
	KeyValues []KeyValue
}

func (m *MapLiteral) Pos() Pos {
	return m.LBracePos
}

func (m *MapLiteral) End() Pos {
	return m.RBracePos
}

func (m *MapLiteral) Accept(visitor ASTVisitor) error {
	visitor.Enter(m)
	defer visitor.Leave(m)
	for _, kv := range m.KeyValues {
		if err := kv.Key.Accept(visitor); err != nil {
			return err
		}
		if err := kv.Value.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitMapLiteral(m)
}

type NamedParameterExpr struct {
	NamePos Pos
	Name    *Ident
	Value   Expr
}

func (n *NamedParameterExpr) Pos() Pos {
	return n.NamePos
}

func (n *NamedParameterExpr) End() Pos {
	return n.Value.End()
}

func (n *NamedParameterExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Name.Accept(visitor); err != nil {
		return err
	}
	if err := n.Value.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitNamedParameterExpr(n)
}

type QueryParam struct {
	LBracePos Pos
	RBracePos Pos
	Name      *Ident
	Type      ColumnType
}

func (q *QueryParam) Pos() Pos {
	return q.LBracePos
}

func (q *QueryParam) End() Pos {
	return q.RBracePos
}

func (q *QueryParam) Accept(visitor ASTVisitor) error {
	visitor.Enter(q)
	defer visitor.Leave(q)
	if err := q.Name.Accept(visitor); err != nil {
		return err
	}
	if err := q.Type.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitQueryParam(q)
}

type ArrayParamList struct {
	LeftBracketPos  Pos
	RightBracketPos Pos
	Items           *ColumnExprList
}

func (a *ArrayParamList) Pos() Pos {
	return a.LeftBracketPos
}

func (a *ArrayParamList) End() Pos {
	return a.RightBracketPos
}

func (a *ArrayParamList) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Items.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitArrayParamList(a)
}

type ObjectParams struct {
	Object Expr
	Params *ArrayParamList
}

func (o *ObjectParams) Pos() Pos {
	return o.Object.Pos()
}

func (o *ObjectParams) End() Pos {
	return o.Params.End()
}

func (o *ObjectParams) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	if err := o.Object.Accept(visitor); err != nil {
		return err
	}
	if err := o.Params.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitObjectParams(o)
}

type FunctionExpr struct {
	Name   *Ident
	Params *ParamExprList
}

func (f *FunctionExpr) Pos() Pos {
	return f.Name.NamePos
}

func (f *FunctionExpr) End() Pos {
	return f.Params.RightParenPos
}

func (f *FunctionExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Name.Accept(visitor); err != nil {
		return err
	}
	if err := f.Params.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitFunctionExpr(f)
}

type WindowFunctionExpr struct {
	Function *FunctionExpr
	OverPos  Pos
	OverExpr Expr
}

func (w *WindowFunctionExpr) Pos() Pos {
	return w.Function.Pos()
}

func (w *WindowFunctionExpr) End() Pos {
	return w.OverExpr.End()
}

func (w *WindowFunctionExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	if err := w.Function.Accept(visitor); err != nil {
		return err
	}
	if err := w.OverExpr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWindowFunctionExpr(w)
}

type TypedPlaceholder struct {
	LeftBracePos  Pos
	RightBracePos Pos
	Name          *Ident
	Type          ColumnType
}

func (t *TypedPlaceholder) Pos() Pos {
	return t.LeftBracePos
}

func (t *TypedPlaceholder) End() Pos {
	return t.RightBracePos
}

func (t *TypedPlaceholder) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Name.Accept(visitor); err != nil {
		return err
	}
	if err := t.Type.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTypedPlaceholder(t)
}

type ColumnExpr struct {
	Expr  Expr
	Alias *Ident
}

func (c *ColumnExpr) Pos() Pos {
	return c.Expr.Pos()
}

func (c *ColumnExpr) End() Pos {
	if c.Alias != nil {
		return c.Alias.NameEnd
	}
	return c.Expr.End()
}

func (c *ColumnExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Expr.Accept(visitor); err != nil {
		return err
	}
	if c.Alias != nil {
		if err := c.Alias.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitColumnExpr(c)
}

type ColumnDef struct {
	NamePos   Pos
	ColumnEnd Pos
	Name      *NestedIdentifier
	Type      ColumnType
	NotNull   *NotNullLiteral
	Nullable  *NullLiteral

	DefaultExpr      Expr
	MaterializedExpr Expr
	AliasExpr        Expr

	Codec *CompressionCodec
	TTL   *TTLClause

	Comment          *StringLiteral
	CompressionCodec *Ident
}

func (c *ColumnDef) Pos() Pos {
	return c.Name.Pos()
}

func (c *ColumnDef) End() Pos {
	return c.ColumnEnd
}

func (c *ColumnDef) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.Type != nil {
		if err := c.Type.Accept(visitor); err != nil {
			return err
		}
	}
	if c.NotNull != nil {
		if err := c.NotNull.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Nullable != nil {
		if err := c.Nullable.Accept(visitor); err != nil {
			return err
		}
	}
	if c.DefaultExpr != nil {
		if err := c.DefaultExpr.Accept(visitor); err != nil {
			return err
		}
	}
	if c.MaterializedExpr != nil {
		if err := c.MaterializedExpr.Accept(visitor); err != nil {
			return err
		}
	}
	if c.AliasExpr != nil {
		if err := c.AliasExpr.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Codec != nil {
		if err := c.Codec.Accept(visitor); err != nil {
			return err
		}
	}
	if c.TTL != nil {
		if err := c.TTL.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Comment != nil {
		if err := c.Comment.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitColumnDef(c)
}

type ColumnType interface {
	Expr
	Type() string
}

type ScalarType struct {
	Name *Ident
}

func (s *ScalarType) Pos() Pos {
	return s.Name.NamePos
}

func (s *ScalarType) End() Pos {
	return s.Name.NameEnd
}

func (s *ScalarType) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Name.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitScalarType(s)
}

func (s *ScalarType) Type() string {
	return s.Name.Name
}

type JSONPath struct {
	Idents []*Ident
}

type JSONTypeHint struct {
	Path *JSONPath
	Type ColumnType
}

type JSONOption struct {
	SkipPath        *JSONPath
	SkipRegex       *StringLiteral
	MaxDynamicPaths *NumberLiteral
	MaxDynamicTypes *NumberLiteral
	// Type hint for specific JSON subcolumn path, e.g., "message String" or "a.b UInt64"
	Column *JSONTypeHint
}

type JSONOptions struct {
	LParen Pos
	RParen Pos
	Items  []*JSONOption
}

func (j *JSONOptions) Pos() Pos {
	return j.LParen
}

func (j *JSONOptions) End() Pos {
	return j.RParen
}

type JSONType struct {
	Name    *Ident
	Options *JSONOptions
}

func (j *JSONType) Pos() Pos {
	return j.Name.NamePos
}

func (j *JSONType) End() Pos {
	if j.Options != nil {
		return j.Options.RParen
	}
	return j.Name.NameEnd
}

func (j *JSONType) Type() string {
	return j.Name.Name
}

func (j *JSONType) Accept(visitor ASTVisitor) error {
	visitor.Enter(j)
	defer visitor.Leave(j)
	if err := j.Name.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitJSONType(j)
}

type PropertyType struct {
	Name *Ident
}

func (c *PropertyType) Pos() Pos {
	return c.Name.NamePos
}

func (c *PropertyType) End() Pos {
	return c.Name.NameEnd
}

func (c *PropertyType) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitPropertyType(c)
}

func (c *PropertyType) Type() string {
	return c.Name.Name
}

type TypeWithParams struct {
	LeftParenPos  Pos
	RightParenPos Pos
	Name          *Ident
	Params        []Literal
}

func (s *TypeWithParams) Pos() Pos {
	return s.Name.NamePos
}

func (s *TypeWithParams) End() Pos {
	return s.RightParenPos
}

func (s *TypeWithParams) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Name.Accept(visitor); err != nil {
		return err
	}
	for _, param := range s.Params {
		if err := param.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTypeWithParams(s)
}

func (s *TypeWithParams) Type() string {
	return s.Name.Name
}

type ComplexType struct {
	LeftParenPos  Pos
	RightParenPos Pos
	Name          *Ident
	Params        []ColumnType
}

func (c *ComplexType) Pos() Pos {
	return c.Name.NamePos
}

func (c *ComplexType) End() Pos {
	return c.RightParenPos
}

func (c *ComplexType) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	for _, param := range c.Params {
		if err := param.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitComplexType(c)
}

func (c *ComplexType) Type() string {
	return c.Name.Name
}

type NestedType struct {
	LeftParenPos  Pos
	RightParenPos Pos
	Name          *Ident
	Columns       []Expr
}

func (n *NestedType) Pos() Pos {
	return n.Name.NamePos
}

func (n *NestedType) End() Pos {
	return n.RightParenPos
}

func (n *NestedType) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Name.Accept(visitor); err != nil {
		return err
	}
	for _, column := range n.Columns {
		if err := column.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitNestedType(n)
}

func (n *NestedType) Type() string {
	return n.Name.Name
}

type CompressionCodec struct {
	CodecPos      Pos
	RightParenPos Pos
	Type          *Ident
	TypeLevel     *NumberLiteral
	Name          *Ident
	Level         *NumberLiteral // compression level
}

func (c *CompressionCodec) Pos() Pos {
	return c.CodecPos
}

func (c *CompressionCodec) End() Pos {
	return c.RightParenPos
}

func (c *CompressionCodec) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if c.Type != nil {
		if err := c.Type.Accept(visitor); err != nil {
			return err
		}
	}
	if c.TypeLevel != nil {
		if err := c.TypeLevel.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Name != nil {
		if err := c.Name.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Level != nil {
		if err := c.Level.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCompressionCodec(c)
}

type Literal interface {
	Expr
}

type NumberLiteral struct {
	NumPos  Pos
	NumEnd  Pos
	Literal string
	Base    int
}

func (n *NumberLiteral) Pos() Pos {
	return n.NumPos
}

func (n *NumberLiteral) End() Pos {
	return n.NumEnd
}

func (n *NumberLiteral) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	return visitor.VisitNumberLiteral(n)
}

type StringLiteral struct {
	LiteralPos Pos
	LiteralEnd Pos
	Literal    string
}

func (s *StringLiteral) Pos() Pos {
	return s.LiteralPos
}

func (s *StringLiteral) End() Pos {
	return s.LiteralEnd
}

func (s *StringLiteral) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	return visitor.VisitStringLiteral(s)
}

type BoolLiteral struct {
	LiteralPos Pos
	LiteralEnd Pos
	Literal    string
}

func (b *BoolLiteral) Pos() Pos {
	return b.LiteralPos
}

func (b *BoolLiteral) End() Pos {
	return b.LiteralEnd
}

func (b *BoolLiteral) Accept(visitor ASTVisitor) error {
	visitor.Enter(b)
	defer visitor.Leave(b)
	return visitor.VisitBoolLiteral(b)
}

type PlaceHolder struct {
	PlaceholderPos Pos
	PlaceHolderEnd Pos
	Type           string
}

func (p *PlaceHolder) Pos() Pos {
	return p.PlaceholderPos
}

func (p *PlaceHolder) End() Pos {
	return p.PlaceHolderEnd
}

func (p *PlaceHolder) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	return visitor.VisitPlaceHolderExpr(p)
}

type RatioExpr struct {
	Numerator *NumberLiteral
	// numberLiteral (SLASH numberLiteral)?
	Denominator *NumberLiteral
}

func (r *RatioExpr) Pos() Pos {
	return r.Numerator.NumPos
}

func (r *RatioExpr) End() Pos {
	if r.Denominator != nil {
		return r.Denominator.NumEnd
	}
	return r.Numerator.NumEnd
}

func (r *RatioExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(r)
	defer visitor.Leave(r)
	if err := r.Numerator.Accept(visitor); err != nil {
		return err
	}
	if r.Denominator != nil {
		if err := r.Denominator.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitRatioExpr(r)
}

type EnumValue struct {
	Name  *StringLiteral
	Value *NumberLiteral
}

func (e *EnumValue) Pos() Pos {
	return e.Name.Pos()
}

func (e *EnumValue) End() Pos {
	return e.Value.End()
}

func (e *EnumValue) Accept(visitor ASTVisitor) error {
	visitor.Enter(e)
	defer visitor.Leave(e)
	if err := e.Name.Accept(visitor); err != nil {
		return err
	}
	if err := e.Value.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitEnumValue(e)
}

type EnumType struct {
	Name    *Ident
	ListPos Pos
	ListEnd Pos
	Values  []EnumValue
}

func (e *EnumType) Pos() Pos {
	return e.ListPos
}

func (e *EnumType) End() Pos {
	return e.ListEnd
}

func (e *EnumType) Accept(visitor ASTVisitor) error {
	visitor.Enter(e)
	defer visitor.Leave(e)
	if err := e.Name.Accept(visitor); err != nil {
		return err
	}
	for i := range e.Values {
		if err := e.Values[i].Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitEnumType(e)
}

func (e *EnumType) Type() string {
	return e.Name.Name
}

type IntervalExpr struct {
	// INTERVAL keyword position which might be omitted(IntervalPos = 0)
	IntervalPos Pos

	Expr Expr
	Unit *Ident
}

func (i *IntervalExpr) Pos() Pos {
	if i.IntervalPos != 0 {
		return i.IntervalPos
	}
	return i.Expr.Pos()
}

func (i *IntervalExpr) End() Pos {
	return i.Unit.End()
}

func (i *IntervalExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	if err := i.Expr.Accept(visitor); err != nil {
		return err
	}
	if err := i.Unit.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitIntervalExpr(i)
}

// TODO(@git-hulk): split into EngineClause and EngineExpr
type EngineExpr struct {
	EnginePos   Pos
	EngineEnd   Pos
	Name        string
	Params      *ParamExprList
	PrimaryKey  *PrimaryKeyClause
	PartitionBy *PartitionByClause
	SampleBy    *SampleByClause
	TTL         *TTLClause
	Settings    *SettingsClause
	OrderBy     *OrderByClause
}

func (e *EngineExpr) Pos() Pos {
	return e.EnginePos
}

func (e *EngineExpr) End() Pos {
	return e.EngineEnd
}

func (e *EngineExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(e)
	defer visitor.Leave(e)
	if e.Params != nil {
		if err := e.Params.Accept(visitor); err != nil {
			return err
		}
	}
	if e.PrimaryKey != nil {
		if err := e.PrimaryKey.Accept(visitor); err != nil {
			return err
		}
	}
	if e.PartitionBy != nil {
		if err := e.PartitionBy.Accept(visitor); err != nil {
			return err
		}
	}
	if e.SampleBy != nil {
		if err := e.SampleBy.Accept(visitor); err != nil {
			return err
		}
	}
	if e.TTL != nil {
		if err := e.TTL.Accept(visitor); err != nil {
			return err
		}
	}
	if e.Settings != nil {
		if err := e.Settings.Accept(visitor); err != nil {
			return err
		}
	}
	if e.OrderBy != nil {
		if err := e.OrderBy.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitEngineExpr(e)
}

type ColumnTypeExpr struct {
	Name *Ident
}

func (c *ColumnTypeExpr) Pos() Pos {
	return c.Name.NamePos
}

func (c *ColumnTypeExpr) End() Pos {
	return c.Name.NameEnd
}

func (c *ColumnTypeExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitColumnTypeExpr(c)
}

type ColumnArgList struct {
	Distinct      bool
	LeftParenPos  Pos
	RightParenPos Pos
	Items         []Expr
}

func (c *ColumnArgList) Pos() Pos {
	return c.LeftParenPos
}

func (c *ColumnArgList) End() Pos {
	return c.RightParenPos
}

func (c *ColumnArgList) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	for _, item := range c.Items {
		if err := item.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitColumnArgList(c)
}

type ColumnExprList struct {
	ListPos     Pos
	ListEnd     Pos
	HasDistinct bool
	Items       []Expr
}

func (c *ColumnExprList) Pos() Pos {
	return c.ListPos
}

func (c *ColumnExprList) End() Pos {
	return c.ListEnd
}

func (c *ColumnExprList) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	for _, item := range c.Items {
		if err := item.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitColumnExprList(c)
}

type WhenClause struct {
	WhenPos Pos
	ThenPos Pos
	When    Expr
	Then    Expr
	ElsePos Pos
	Else    Expr
}

func (w *WhenClause) Pos() Pos {
	return w.WhenPos
}

func (w *WhenClause) End() Pos {
	if w.Else != nil {
		return w.Else.End()
	}
	return w.Then.End()
}

func (w *WhenClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	if err := w.When.Accept(visitor); err != nil {
		return err
	}
	if err := w.Then.Accept(visitor); err != nil {
		return err
	}
	if w.Else != nil {
		if err := w.Else.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitWhenExpr(w)
}

type CaseExpr struct {
	CasePos Pos
	EndPos  Pos
	Expr    Expr // optional
	Whens   []*WhenClause
	ElsePos Pos
	Else    Expr
}

func (c *CaseExpr) Pos() Pos {
	return c.CasePos
}

func (c *CaseExpr) End() Pos {
	return c.EndPos
}

func (c *CaseExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if c.Expr != nil {
		if err := c.Expr.Accept(visitor); err != nil {
			return err
		}
	}
	for _, when := range c.Whens {
		if err := when.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Else != nil {
		if err := c.Else.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCaseExpr(c)
}

type CastExpr struct {
	CastPos   Pos
	Expr      Expr
	Separator string
	AsPos     Pos
	AsType    Expr
}

func (c *CastExpr) Pos() Pos {
	return c.CastPos
}

func (c *CastExpr) End() Pos {
	return c.AsType.End()
}

func (c *CastExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Expr.Accept(visitor); err != nil {
		return err
	}
	if err := c.AsType.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitCastExpr(c)
}

type WithClause struct {
	WithPos Pos
	EndPos  Pos
	CTEs    []*CTEStmt
}

func (w *WithClause) Pos() Pos {
	return w.WithPos
}

func (w *WithClause) End() Pos {
	return w.EndPos
}

func (w *WithClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	for _, cte := range w.CTEs {
		if err := cte.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitWithExpr(w)
}

type TopClause struct {
	TopPos   Pos
	TopEnd   Pos
	Number   *NumberLiteral
	WithTies bool
}

func (t *TopClause) Pos() Pos {
	return t.TopPos
}

func (t *TopClause) End() Pos {
	return t.TopEnd
}

func (t *TopClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Number.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTopExpr(t)
}

type CreateLiveView struct {
	CreatePos    Pos
	StatementEnd Pos
	Name         *TableIdentifier
	IfNotExists  bool
	UUID         *UUID
	OnCluster    *ClusterClause
	Destination  *DestinationClause
	TableSchema  *TableSchemaClause
	WithTimeout  *WithTimeoutClause
	SubQuery     *SubQuery
}

func (c *CreateLiveView) Type() string {
	return "LIVE_VIEW"
}

func (c *CreateLiveView) Pos() Pos {
	return c.CreatePos
}

func (c *CreateLiveView) End() Pos {
	return c.StatementEnd
}

func (c *CreateLiveView) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.UUID != nil {
		if err := c.UUID.Accept(visitor); err != nil {
			return err
		}
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Destination != nil {
		if err := c.Destination.Accept(visitor); err != nil {
			return err
		}
	}
	if c.TableSchema != nil {
		if err := c.TableSchema.Accept(visitor); err != nil {
			return err
		}
	}
	if c.WithTimeout != nil {
		if err := c.WithTimeout.Accept(visitor); err != nil {
			return err
		}
	}
	if c.SubQuery != nil {
		if err := c.SubQuery.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateLiveView(c)
}

type CreateDictionary struct {
	CreatePos    Pos
	StatementEnd Pos
	OrReplace    bool
	Name         *TableIdentifier
	IfNotExists  bool
	UUID         *UUID
	OnCluster    *ClusterClause
	Schema       *DictionarySchemaClause
	Engine       *DictionaryEngineClause
	Comment      *StringLiteral
}

func (c *CreateDictionary) Type() string {
	return "DICTIONARY"
}

func (c *CreateDictionary) Pos() Pos {
	return c.CreatePos
}

func (c *CreateDictionary) End() Pos {
	return c.StatementEnd
}

func (c *CreateDictionary) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.UUID != nil {
		if err := c.UUID.Accept(visitor); err != nil {
			return err
		}
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Schema != nil {
		if err := c.Schema.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Engine != nil {
		if err := c.Engine.Accept(visitor); err != nil {
			return err
		}
	}
	if c.Comment != nil {
		if err := c.Comment.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateDictionary(c)
}

type CreateNamedCollection struct {
	CreatePos    Pos
	StatementEnd Pos
	Name         *Ident
	IfNotExists  bool
	OnCluster    *ClusterClause
	Params       []*NamedCollectionParam
}

func (c *CreateNamedCollection) Pos() Pos {
	return c.CreatePos
}

func (c *CreateNamedCollection) End() Pos {
	return c.StatementEnd
}

func (c *CreateNamedCollection) Type() string {
	return "NAMED COLLECTION"
}

func (c *CreateNamedCollection) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Name.Accept(visitor); err != nil {
		return err
	}
	if c.OnCluster != nil {
		if err := c.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	for _, param := range c.Params {
		if err := param.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCreateNamedCollection(c)
}

type NamedCollectionParam struct {
	ParamPos       Pos
	Name           *Ident
	Value          Expr
	Overridable    bool
	NotOverridable bool
}

func (n *NamedCollectionParam) Pos() Pos {
	return n.ParamPos
}

func (n *NamedCollectionParam) End() Pos {
	return n.Value.End()
}

func (n *NamedCollectionParam) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Name.Accept(visitor); err != nil {
		return err
	}
	if err := n.Value.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitNamedCollectionParam(n)
}

type DictionarySchemaClause struct {
	SchemaPos  Pos
	Attributes []*DictionaryAttribute
	RParenPos  Pos
}

func (d *DictionarySchemaClause) Pos() Pos {
	return d.SchemaPos
}

func (d *DictionarySchemaClause) End() Pos {
	return d.RParenPos + 1
}

func (d *DictionarySchemaClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	for _, attr := range d.Attributes {
		if err := attr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDictionarySchemaClause(d)
}

type DictionaryAttribute struct {
	NamePos      Pos
	Name         *Ident
	Type         ColumnType
	Default      Literal
	Expression   Expr
	Hierarchical bool
	Injective    bool
	IsObjectId   bool
}

func (d *DictionaryAttribute) Pos() Pos {
	return d.NamePos
}

func (d *DictionaryAttribute) End() Pos {
	if d.IsObjectId {
		return d.NamePos + Pos(len("IS_OBJECT_ID"))
	}
	if d.Injective {
		return d.NamePos + Pos(len("INJECTIVE"))
	}
	if d.Hierarchical {
		return d.NamePos + Pos(len("HIERARCHICAL"))
	}
	if d.Expression != nil {
		return d.Expression.End()
	}
	if d.Default != nil {
		return d.Default.End()
	}
	return d.Type.End()
}

func (d *DictionaryAttribute) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Name.Accept(visitor); err != nil {
		return err
	}
	if err := d.Type.Accept(visitor); err != nil {
		return err
	}
	if d.Default != nil {
		if err := d.Default.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Expression != nil {
		if err := d.Expression.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDictionaryAttribute(d)
}

type DictionaryEngineClause struct {
	EnginePos  Pos
	PrimaryKey *DictionaryPrimaryKeyClause
	Source     *DictionarySourceClause
	Lifetime   *DictionaryLifetimeClause
	Layout     *DictionaryLayoutClause
	Range      *DictionaryRangeClause
	Settings   *SettingsClause
}

func (d *DictionaryEngineClause) Pos() Pos {
	return d.EnginePos
}

func (d *DictionaryEngineClause) End() Pos {
	if d.Settings != nil {
		return d.Settings.End()
	}
	if d.Range != nil {
		return d.Range.End()
	}
	if d.Layout != nil {
		return d.Layout.End()
	}
	if d.Lifetime != nil {
		return d.Lifetime.End()
	}
	if d.Source != nil {
		return d.Source.End()
	}
	if d.PrimaryKey != nil {
		return d.PrimaryKey.End()
	}
	return d.EnginePos
}

func (d *DictionaryEngineClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if d.PrimaryKey != nil {
		if err := d.PrimaryKey.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Source != nil {
		if err := d.Source.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Lifetime != nil {
		if err := d.Lifetime.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Layout != nil {
		if err := d.Layout.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Range != nil {
		if err := d.Range.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Settings != nil {
		if err := d.Settings.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDictionaryEngineClause(d)
}

type DictionaryPrimaryKeyClause struct {
	PrimaryKeyPos Pos
	Keys          *ColumnExprList
	RParenPos     Pos
}

func (d *DictionaryPrimaryKeyClause) Pos() Pos {
	return d.PrimaryKeyPos
}

func (d *DictionaryPrimaryKeyClause) End() Pos {
	return d.RParenPos + 1
}

func (d *DictionaryPrimaryKeyClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Keys.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitDictionaryPrimaryKeyClause(d)
}

type DictionarySourceClause struct {
	SourcePos Pos
	Source    *Ident
	Args      []*DictionaryArgExpr
	RParenPos Pos
}

func (d *DictionarySourceClause) Pos() Pos {
	return d.SourcePos
}

func (d *DictionarySourceClause) End() Pos {
	return d.RParenPos + 1
}

func (d *DictionarySourceClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Source.Accept(visitor); err != nil {
		return err
	}
	for _, arg := range d.Args {
		if err := arg.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDictionarySourceClause(d)
}

type DictionaryArgExpr struct {
	ArgPos Pos
	Name   *Ident
	Value  Expr // can be Ident with optional parentheses or literal
}

func (d *DictionaryArgExpr) Pos() Pos {
	return d.ArgPos
}

func (d *DictionaryArgExpr) End() Pos {
	return d.Value.End()
}

func (d *DictionaryArgExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Name.Accept(visitor); err != nil {
		return err
	}
	if err := d.Value.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitDictionaryArgExpr(d)
}

type DictionaryLifetimeClause struct {
	LifetimePos Pos
	Min         *NumberLiteral
	Max         *NumberLiteral
	Value       *NumberLiteral // for simple LIFETIME(value) form
	RParenPos   Pos
}

func (d *DictionaryLifetimeClause) Pos() Pos {
	return d.LifetimePos
}

func (d *DictionaryLifetimeClause) End() Pos {
	return d.RParenPos + 1
}

func (d *DictionaryLifetimeClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if d.Value != nil {
		if err := d.Value.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Min != nil {
		if err := d.Min.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Max != nil {
		if err := d.Max.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDictionaryLifetimeClause(d)
}

type DictionaryLayoutClause struct {
	LayoutPos Pos
	Layout    *Ident
	Args      []*DictionaryArgExpr
	RParenPos Pos
}

func (d *DictionaryLayoutClause) Pos() Pos {
	return d.LayoutPos
}

func (d *DictionaryLayoutClause) End() Pos {
	return d.RParenPos + 1
}

func (d *DictionaryLayoutClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Layout.Accept(visitor); err != nil {
		return err
	}
	for _, arg := range d.Args {
		if err := arg.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDictionaryLayoutClause(d)
}

type DictionaryRangeClause struct {
	RangePos  Pos
	Min       *Ident
	Max       *Ident
	RParenPos Pos
}

func (d *DictionaryRangeClause) Pos() Pos {
	return d.RangePos
}

func (d *DictionaryRangeClause) End() Pos {
	return d.RParenPos + 1
}

func (d *DictionaryRangeClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Min.Accept(visitor); err != nil {
		return err
	}
	if err := d.Max.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitDictionaryRangeClause(d)
}

type WithTimeoutClause struct {
	WithTimeoutPos Pos
	Expr           Expr
	Number         *NumberLiteral
}

func (w *WithTimeoutClause) Pos() Pos {
	return w.WithTimeoutPos
}

func (w *WithTimeoutClause) End() Pos {
	return w.Number.End()
}

func (w *WithTimeoutClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	if err := w.Number.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWithTimeoutExpr(w)
}

type TableExpr struct {
	TablePos Pos
	TableEnd Pos
	Alias    *AliasExpr
	Expr     Expr
	HasFinal bool
}

func (t *TableExpr) Pos() Pos {
	return t.TablePos
}

func (t *TableExpr) End() Pos {
	return t.TableEnd
}

func (t *TableExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Expr.Accept(visitor); err != nil {
		return err
	}
	if t.Alias != nil {
		if err := t.Alias.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTableExpr(t)
}

type OnClause struct {
	OnPos Pos
	On    *ColumnExprList
}

func (o *OnClause) Pos() Pos {
	return o.OnPos
}

func (o *OnClause) End() Pos {
	return o.On.End()
}

func (o *OnClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	if err := o.On.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitOnExpr(o)
}

type UsingClause struct {
	UsingPos Pos
	Using    *ColumnExprList
}

func (u *UsingClause) Pos() Pos {
	return u.UsingPos
}

func (u *UsingClause) End() Pos {
	return u.Using.End()
}

func (u *UsingClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(u)
	defer visitor.Leave(u)
	if err := u.Using.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitUsingExpr(u)
}

type JoinExpr struct {
	JoinPos     Pos
	Left        Expr
	Right       Expr
	Modifiers   []string
	Constraints Expr
}

func (j *JoinExpr) Pos() Pos {
	return j.JoinPos
}

func (j *JoinExpr) End() Pos {
	// Return the rightmost position
	if j.Right != nil {
		return j.Right.End()
	}
	if j.Constraints != nil {
		return j.Constraints.End()
	}
	return j.Left.End()
}

func (j *JoinExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(j)
	defer visitor.Leave(j)
	if err := j.Left.Accept(visitor); err != nil {
		return err
	}
	if j.Right != nil {
		if err := j.Right.Accept(visitor); err != nil {
			return err
		}
	}
	if j.Constraints != nil {
		if err := j.Constraints.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitJoinExpr(j)
}

type JoinConstraintClause struct {
	ConstraintPos Pos
	On            *ColumnExprList
	Using         *ColumnExprList
}

func (j *JoinConstraintClause) Pos() Pos {
	return j.ConstraintPos
}

func (j *JoinConstraintClause) End() Pos {
	if j.On != nil {
		return j.On.End()
	}
	return j.Using.End()
}

func (j *JoinConstraintClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(j)
	defer visitor.Leave(j)
	if j.On != nil {
		if err := j.On.Accept(visitor); err != nil {
			return err
		}
	}
	if j.Using != nil {
		if err := j.Using.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitJoinConstraintExpr(j)
}

type FromClause struct {
	FromPos Pos
	Expr    Expr
}

func (f *FromClause) Pos() Pos {
	return f.FromPos
}

func (f *FromClause) End() Pos {
	return f.Expr.End()
}

func (f *FromClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitFromExpr(f)
}

type IsNullExpr struct {
	IsPos Pos
	Expr  Expr
}

func (n *IsNullExpr) Pos() Pos {
	return n.IsPos
}

func (n *IsNullExpr) End() Pos {
	return n.Expr.End()
}

func (n *IsNullExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitIsNullExpr(n)
}

type IsNotNullExpr struct {
	IsPos Pos
	Expr  Expr
}

func (n *IsNotNullExpr) Pos() Pos {
	return n.Expr.Pos()
}

func (n *IsNotNullExpr) End() Pos {
	return n.Expr.End()
}

func (n *IsNotNullExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitIsNotNullExpr(n)
}

type AliasExpr struct {
	Expr     Expr
	AliasPos Pos
	Alias    Expr
}

func (a *AliasExpr) Pos() Pos {
	return a.AliasPos
}

func (a *AliasExpr) End() Pos {
	return a.Alias.End()
}

func (a *AliasExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(a)
	defer visitor.Leave(a)
	if err := a.Expr.Accept(visitor); err != nil {
		return err
	}
	if err := a.Alias.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitAliasExpr(a)
}

type WhereClause struct {
	WherePos Pos
	Expr     Expr
}

func (w *WhereClause) Pos() Pos {
	return w.WherePos
}

func (w *WhereClause) End() Pos {
	return w.Expr.End()
}

func (w *WhereClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	if err := w.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWhereExpr(w)
}

type PrewhereClause struct {
	PrewherePos Pos
	Expr        Expr
}

func (w *PrewhereClause) Pos() Pos {
	return w.PrewherePos
}

func (w *PrewhereClause) End() Pos {
	return w.Expr.End()
}

func (w *PrewhereClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	if err := w.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitPrewhereExpr(w)
}

type GroupByClause struct {
	GroupByPos    Pos
	GroupByEnd    Pos
	AggregateType string
	Expr          Expr
	WithCube      bool
	WithRollup    bool
	WithTotals    bool
}

func (g *GroupByClause) Pos() Pos {
	return g.GroupByPos
}

func (g *GroupByClause) End() Pos {
	return g.GroupByEnd
}

func (g *GroupByClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(g)
	defer visitor.Leave(g)
	if g.Expr != nil {
		if err := g.Expr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitGroupByExpr(g)
}

type HavingClause struct {
	HavingPos Pos
	Expr      Expr
}

func (h *HavingClause) Pos() Pos {
	return h.HavingPos
}

func (h *HavingClause) End() Pos {
	return h.Expr.End()
}

func (h *HavingClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(h)
	defer visitor.Leave(h)
	if err := h.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitHavingExpr(h)
}

type LimitClause struct {
	LimitPos Pos
	Limit    Expr
	Offset   Expr
}

func (l *LimitClause) Pos() Pos {
	return l.LimitPos
}

func (l *LimitClause) End() Pos {
	if l.Offset != nil {
		return l.Offset.End()
	}
	return l.Limit.End()
}

func (l *LimitClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(l)
	defer visitor.Leave(l)
	if l.Limit != nil {
		if err := l.Limit.Accept(visitor); err != nil {
			return err
		}
	}
	if l.Offset != nil {
		if err := l.Offset.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitLimitExpr(l)
}

type LimitByClause struct {
	Limit  *LimitClause
	ByExpr *ColumnExprList
}

func (l *LimitByClause) Pos() Pos {
	return l.Limit.Pos()
}

func (l *LimitByClause) End() Pos {
	if l.ByExpr != nil {
		return l.ByExpr.End()
	}
	if l.Limit != nil {
		return l.Limit.End()
	}
	return l.Limit.End()
}

func (l *LimitByClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(l)
	defer visitor.Leave(l)
	if l.Limit != nil {
		if err := l.Limit.Accept(visitor); err != nil {
			return err
		}
	}
	if l.ByExpr != nil {
		if err := l.ByExpr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitLimitByExpr(l)
}

type WindowExpr struct {
	LeftParenPos  Pos
	RightParenPos Pos
	WindowName    *Ident
	PartitionBy   *PartitionByClause
	OrderBy       *OrderByClause
	Frame         *WindowFrameClause
}

func (w *WindowExpr) Pos() Pos {
	return w.LeftParenPos
}

func (w *WindowExpr) End() Pos {
	return w.RightParenPos
}

func (w *WindowExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	if w.WindowName != nil {
		if err := w.WindowName.Accept(visitor); err != nil {
			return err
		}
	}
	if w.PartitionBy != nil {
		if err := w.PartitionBy.Accept(visitor); err != nil {
			return err
		}
	}
	if w.OrderBy != nil {
		if err := w.OrderBy.Accept(visitor); err != nil {
			return err
		}
	}
	if w.Frame != nil {
		if err := w.Frame.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitWindowConditionExpr(w)
}

type WindowDefinition struct {
	Name  *Ident
	AsPos Pos
	Expr  *WindowExpr
}

func (w *WindowDefinition) Pos() Pos {
	if w == nil || w.Name == nil {
		return 0
	}
	return w.Name.Pos()
}

func (w *WindowDefinition) End() Pos {
	if w == nil || w.Expr == nil {
		return 0
	}
	return w.Expr.End()
}

type WindowClause struct {
	WindowPos Pos
	EndPos    Pos
	Windows   []*WindowDefinition
}

func (w *WindowClause) Pos() Pos {
	return w.WindowPos
}

func (w *WindowClause) End() Pos {
	if w.EndPos != 0 {
		return w.EndPos
	}
	if len(w.Windows) == 0 {
		return w.WindowPos
	}
	return w.Windows[len(w.Windows)-1].End()
}

func (w *WindowClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(w)
	defer visitor.Leave(w)
	for _, window := range w.Windows {
		if window == nil {
			continue
		}
		if window.Name != nil {
			if err := window.Name.Accept(visitor); err != nil {
				return err
			}
		}
		if window.Expr != nil {
			if err := window.Expr.Accept(visitor); err != nil {
				return err
			}
		}
	}
	return visitor.VisitWindowExpr(w)
}

type WindowFrameClause struct {
	FramePos Pos
	Type     string
	Extend   Expr
}

func (f *WindowFrameClause) Pos() Pos {
	return f.FramePos
}

func (f *WindowFrameClause) End() Pos {
	return f.Extend.End()
}

func (f *WindowFrameClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Extend.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWindowFrameExpr(f)
}

type WindowFrameExtendExpr struct {
	Expr      Expr
	Direction string
	EndPos    Pos
}

func (f *WindowFrameExtendExpr) Pos() Pos {
	return f.Expr.Pos()
}

func (f *WindowFrameExtendExpr) End() Pos {
	if f.EndPos != 0 {
		return f.EndPos
	}
	return f.Expr.End()
}

func (f *WindowFrameExtendExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWindowFrameExtendExpr(f)
}

type BetweenClause struct {
	Expr    Expr
	Between Expr
	AndPos  Pos
	And     Expr
}

func (f *BetweenClause) Pos() Pos {
	if f.Expr != nil {
		return f.Expr.Pos()
	}
	return f.Between.Pos()
}

func (f *BetweenClause) End() Pos {
	return f.And.End()
}

func (f *BetweenClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if f.Expr != nil {
		if err := f.Expr.Accept(visitor); err != nil {
			return err
		}
	}
	if err := f.Between.Accept(visitor); err != nil {
		return err
	}
	if err := f.And.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitBetweenClause(f)
}

type WindowFrameCurrentRow struct {
	CurrentPos Pos
	RowEnd     Pos
}

func (f *WindowFrameCurrentRow) Pos() Pos {
	return f.CurrentPos
}

func (f *WindowFrameCurrentRow) End() Pos {
	return f.RowEnd
}

func (f *WindowFrameCurrentRow) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	return visitor.VisitWindowFrameCurrentRow(f)
}

type WindowFrameUnbounded struct {
	UnboundedPos Pos
	UnboundedEnd Pos
	Direction    string
}

func (f *WindowFrameUnbounded) Pos() Pos {
	return f.UnboundedPos
}

func (f *WindowFrameUnbounded) End() Pos {
	return f.UnboundedEnd
}

func (f *WindowFrameUnbounded) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	return visitor.VisitWindowFrameUnbounded(f)
}

type WindowFrameNumber struct {
	Number    *NumberLiteral
	EndPos    Pos
	Direction string
}

func (f *WindowFrameNumber) Pos() Pos {
	return f.Number.Pos()
}

func (f *WindowFrameNumber) End() Pos {
	return f.EndPos
}

func (f *WindowFrameNumber) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Number.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWindowFrameNumber(f)
}

type WindowFrameParam struct {
	Param     *QueryParam
	EndPos    Pos
	Direction string
}

func (f *WindowFrameParam) Pos() Pos {
	return f.Param.Pos()
}

func (f *WindowFrameParam) End() Pos {
	return f.EndPos
}

func (f *WindowFrameParam) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Param.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitWindowFrameParam(f)
}

type SelectQuery struct {
	SelectPos     Pos
	StatementEnd  Pos
	With          *WithClause
	Top           *TopClause
	HasDistinct   bool
	DistinctOn    *DistinctOn
	SelectItems   []*SelectItem
	From          *FromClause
	Window        *WindowClause
	Prewhere      *PrewhereClause
	Where         *WhereClause
	GroupBy       *GroupByClause
	WithTotal     bool
	Having        *HavingClause
	OrderBy       *OrderByClause
	LimitBy       *LimitByClause
	Limit         *LimitClause
	Settings      *SettingsClause
	Format        *FormatClause
	UnionAll      *SelectQuery
	UnionDistinct *SelectQuery
	Except        *SelectQuery
}

func (s *SelectQuery) Pos() Pos {
	return s.SelectPos
}

func (s *SelectQuery) End() Pos {
	return s.StatementEnd
}

func (s *SelectQuery) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if s.With != nil {
		if err := s.With.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Top != nil {
		if err := s.Top.Accept(visitor); err != nil {
			return err
		}
	}
	if s.SelectItems != nil {
		for _, item := range s.SelectItems {
			if err := item.Accept(visitor); err != nil {
				return err
			}
		}
	}
	if s.From != nil {
		if err := s.From.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Window != nil {
		if err := s.Window.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Prewhere != nil {
		if err := s.Prewhere.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Where != nil {
		if err := s.Where.Accept(visitor); err != nil {
			return err
		}
	}
	if s.GroupBy != nil {
		if err := s.GroupBy.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Having != nil {
		if err := s.Having.Accept(visitor); err != nil {
			return err
		}
	}
	if s.OrderBy != nil {
		if err := s.OrderBy.Accept(visitor); err != nil {
			return err
		}
	}
	if s.LimitBy != nil {
		if err := s.LimitBy.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Limit != nil {
		if err := s.Limit.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Settings != nil {
		if err := s.Settings.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Format != nil {
		if err := s.Format.Accept(visitor); err != nil {
			return err
		}
	}
	if s.UnionAll != nil {
		if err := s.UnionAll.Accept(visitor); err != nil {
			return err
		}
	}
	if s.UnionDistinct != nil {
		if err := s.UnionDistinct.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Except != nil {
		if err := s.Except.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSelectQuery(s)
}

type DistinctOn struct {
	Idents        []*NestedIdentifier
	DistinctOnPos Pos
	DistinctOnEnd Pos
}

func (s *DistinctOn) Pos() Pos {
	return s.DistinctOnPos
}

func (s *DistinctOn) End() Pos {
	return s.DistinctOnEnd
}

func (s *DistinctOn) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	for _, ident := range s.Idents {
		if err := ident.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDistinctOn(s)
}

type SubQuery struct {
	HasParen bool
	Select   *SelectQuery
}

func (s *SubQuery) Pos() Pos {
	return s.Select.Pos()
}

func (s *SubQuery) End() Pos {
	return s.Select.End()
}

func (s *SubQuery) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if s.Select != nil {
		if err := s.Select.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSubQueryExpr(s)
}

type NotExpr struct {
	NotPos Pos
	Expr   Expr
}

func (n *NotExpr) Pos() Pos {
	return n.NotPos
}

func (n *NotExpr) End() Pos {
	return n.Expr.End()
}

func (n *NotExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitNotExpr(n)
}

type NegateExpr struct {
	NegatePos Pos
	Expr      Expr
}

func (n *NegateExpr) Pos() Pos {
	return n.NegatePos
}

func (n *NegateExpr) End() Pos {
	return n.Expr.End()
}

func (n *NegateExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitNegateExpr(n)
}

type GlobalInOperation struct {
	GlobalPos Pos
	Expr      Expr
}

func (g *GlobalInOperation) Pos() Pos {
	return g.GlobalPos
}

func (g *GlobalInOperation) End() Pos {
	return g.Expr.End()
}

func (g *GlobalInOperation) Accept(visitor ASTVisitor) error {
	visitor.Enter(g)
	defer visitor.Leave(g)
	if err := g.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitGlobalInExpr(g)
}

type IntervalFrom struct {
	Interval *Ident
	FromPos  Pos
	FromExpr Expr
}

func (i *IntervalFrom) Pos() Pos {
	return i.Interval.NamePos
}

func (i *IntervalFrom) End() Pos {
	return i.FromExpr.End()
}

func (i *IntervalFrom) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	if err := i.FromExpr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitIntervalFrom(i)
}

type ExtractExpr struct {
	ExtractPos Pos
	ExtractEnd Pos
	Parameters []Expr
}

func (e *ExtractExpr) Pos() Pos {
	return e.ExtractPos
}

func (e *ExtractExpr) End() Pos {
	return e.ExtractEnd
}

func (e *ExtractExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(e)
	defer visitor.Leave(e)
	for _, param := range e.Parameters {
		if err := param.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitExtractExpr(e)
}

type DropDatabase struct {
	DropPos      Pos
	StatementEnd Pos
	Name         *Ident
	IfExists     bool
	OnCluster    *ClusterClause
}

func (d *DropDatabase) Pos() Pos {
	return d.DropPos
}

func (d *DropDatabase) End() Pos {
	return d.StatementEnd
}

func (d *DropDatabase) Type() string {
	return "DATABASE"
}

func (d *DropDatabase) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Name.Accept(visitor); err != nil {
		return err
	}
	if d.OnCluster != nil {
		if err := d.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDropDatabase(d)
}

type DropStmt struct {
	DropPos      Pos
	StatementEnd Pos

	DropTarget  string
	Name        *TableIdentifier
	IfExists    bool
	OnCluster   *ClusterClause
	IsTemporary bool
	Modifier    string
}

func (d *DropStmt) Pos() Pos {
	return d.DropPos
}

func (d *DropStmt) End() Pos {
	return d.StatementEnd
}

func (d *DropStmt) Type() string {
	return "DROP " + d.DropTarget
}

func (d *DropStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Name.Accept(visitor); err != nil {
		return err
	}
	if d.OnCluster != nil {
		if err := d.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDropStmt(d)

}

type DropUserOrRole struct {
	DropPos      Pos
	Target       string
	StatementEnd Pos
	Names        []*RoleName
	IfExists     bool
	Modifier     string
	From         *Ident
}

func (d *DropUserOrRole) Pos() Pos {
	return d.DropPos
}

func (d *DropUserOrRole) End() Pos {
	return d.StatementEnd
}

func (d *DropUserOrRole) Type() string {
	return d.Target
}

func (d *DropUserOrRole) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	for _, name := range d.Names {
		if err := name.Accept(visitor); err != nil {
			return err
		}
	}
	if d.From != nil {
		if err := d.From.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDropUserOrRole(d)
}

type UseStmt struct {
	UsePos       Pos
	StatementEnd Pos
	Database     *Ident
}

func (u *UseStmt) Pos() Pos {
	return u.UsePos
}

func (u *UseStmt) End() Pos {
	return u.Database.End()
}

func (u *UseStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(u)
	defer visitor.Leave(u)
	if err := u.Database.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitUseExpr(u)
}

type CTEStmt struct {
	CTEPos Pos
	Expr   Expr
	Alias  Expr
}

func (c *CTEStmt) Pos() Pos {
	return c.CTEPos
}

func (c *CTEStmt) End() Pos {
	return c.Expr.End()
}

func (c *CTEStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Expr.Accept(visitor); err != nil {
		return err
	}
	if err := c.Alias.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitCTEExpr(c)
}

type SetStmt struct {
	SetPos   Pos
	Settings *SettingsClause
}

func (s *SetStmt) Pos() Pos {
	return s.SetPos
}

func (s *SetStmt) End() Pos {
	return s.Settings.End()
}

func (s *SetStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Settings.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitSetExpr(s)
}

type FormatClause struct {
	FormatPos Pos
	Format    *Ident
}

func (f *FormatClause) Pos() Pos {
	return f.FormatPos
}

func (f *FormatClause) End() Pos {
	return f.Format.End()
}

func (f *FormatClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(f)
	defer visitor.Leave(f)
	if err := f.Format.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitFormatExpr(f)
}

type OptimizeStmt struct {
	OptimizePos  Pos
	StatementEnd Pos
	Table        *TableIdentifier
	OnCluster    *ClusterClause
	Partition    *PartitionClause
	HasFinal     bool
	Deduplicate  *DeduplicateClause
}

func (o *OptimizeStmt) Pos() Pos {
	return o.OptimizePos
}

func (o *OptimizeStmt) End() Pos {
	return o.StatementEnd
}

func (o *OptimizeStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(o)
	defer visitor.Leave(o)
	if err := o.Table.Accept(visitor); err != nil {
		return err
	}
	if o.OnCluster != nil {
		if err := o.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if o.Partition != nil {
		if err := o.Partition.Accept(visitor); err != nil {
			return err
		}
	}
	if o.Deduplicate != nil {
		if err := o.Deduplicate.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitOptimizeExpr(o)
}

type DeduplicateClause struct {
	DeduplicatePos Pos
	By             *ColumnExprList
	Except         *ColumnExprList
}

func (d *DeduplicateClause) Pos() Pos {
	return d.DeduplicatePos
}

func (d *DeduplicateClause) End() Pos {
	if d.By != nil {
		return d.By.End()
	} else if d.Except != nil {
		return d.Except.End()
	}
	return d.DeduplicatePos + Pos(len(KeywordDeduplicate))
}

func (d *DeduplicateClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if d.By != nil {
		if err := d.By.Accept(visitor); err != nil {
			return err
		}
	}
	if d.Except != nil {
		if err := d.Except.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDeduplicateExpr(d)
}

type SystemStmt struct {
	SystemPos Pos
	Expr      Expr
}

func (s *SystemStmt) Pos() Pos {
	return s.SystemPos
}

func (s *SystemStmt) End() Pos {
	return s.Expr.End()
}

func (s *SystemStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitSystemExpr(s)
}

type SystemFlushExpr struct {
	FlushPos     Pos
	StatementEnd Pos
	Logs         bool
	Distributed  *TableIdentifier
}

func (s *SystemFlushExpr) Pos() Pos {
	return s.FlushPos
}

func (s *SystemFlushExpr) End() Pos {
	return s.StatementEnd
}

func (s *SystemFlushExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if s.Distributed != nil {
		if err := s.Distributed.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSystemFlushExpr(s)
}

type SystemReloadExpr struct {
	ReloadPos    Pos
	StatementEnd Pos
	Dictionary   *TableIdentifier
	Type         string
}

func (s *SystemReloadExpr) Pos() Pos {
	return s.ReloadPos
}

func (s *SystemReloadExpr) End() Pos {
	return s.StatementEnd
}

func (s *SystemReloadExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if s.Dictionary != nil {
		if err := s.Dictionary.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSystemReloadExpr(s)
}

type SystemSyncExpr struct {
	SyncPos Pos
	Cluster *TableIdentifier
}

func (s *SystemSyncExpr) Pos() Pos {
	return s.SyncPos
}

func (s *SystemSyncExpr) End() Pos {
	return s.Cluster.End()
}

func (s *SystemSyncExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Cluster.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitSystemSyncExpr(s)
}

type SystemCtrlExpr struct {
	CtrlPos      Pos
	StatementEnd Pos
	Command      string // START, STOP
	Type         string // REPLICATED, DISTRIBUTED
	Cluster      *TableIdentifier
}

func (s *SystemCtrlExpr) Pos() Pos {
	return s.CtrlPos
}

func (s *SystemCtrlExpr) End() Pos {
	return s.StatementEnd
}

func (s *SystemCtrlExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if s.Cluster != nil {
		if err := s.Cluster.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSystemCtrlExpr(s)
}

type SystemDropExpr struct {
	DropPos      Pos
	StatementEnd Pos
	Type         string
}

func (s *SystemDropExpr) Pos() Pos {
	return s.DropPos
}

func (s *SystemDropExpr) End() Pos {
	return s.StatementEnd
}

func (s *SystemDropExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	return visitor.VisitSystemDropExpr(s)
}

type TruncateTable struct {
	TruncatePos  Pos
	StatementEnd Pos
	IsTemporary  bool
	IfExists     bool
	Name         *TableIdentifier
	OnCluster    *ClusterClause
}

func (t *TruncateTable) Pos() Pos {
	return t.TruncatePos
}

func (t *TruncateTable) End() Pos {
	return t.StatementEnd
}

func (t *TruncateTable) Type() string {
	return "TRUNCATE TABLE"
}

func (t *TruncateTable) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Name.Accept(visitor); err != nil {
		return err
	}
	if t.OnCluster != nil {
		if err := t.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitTruncateTable(t)
}

type SampleClause struct {
	SamplePos Pos
	Ratio     *RatioExpr
	Offset    *RatioExpr
}

func (s *SampleClause) Pos() Pos {
	return s.SamplePos
}

func (s *SampleClause) End() Pos {
	if s.Offset != nil {
		return s.Offset.End()
	}
	return s.Ratio.End()
}

func (s *SampleClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if err := s.Ratio.Accept(visitor); err != nil {
		return err
	}
	if s.Offset != nil {
		if err := s.Offset.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitSampleRatioExpr(s)
}

type DeleteClause struct {
	DeletePos Pos
	Table     *TableIdentifier
	OnCluster *ClusterClause
	WhereExpr Expr
}

func (d *DeleteClause) Pos() Pos {
	return d.DeletePos
}

func (d *DeleteClause) End() Pos {
	return d.WhereExpr.End()
}

func (d *DeleteClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Table.Accept(visitor); err != nil {
		return err
	}
	if d.OnCluster != nil {
		if err := d.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	if d.WhereExpr != nil {
		if err := d.WhereExpr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitDeleteFromExpr(d)
}

type ColumnNamesExpr struct {
	LeftParenPos  Pos
	RightParenPos Pos
	ColumnNames   []NestedIdentifier
}

func (c *ColumnNamesExpr) Pos() Pos {
	return c.LeftParenPos
}

func (c *ColumnNamesExpr) End() Pos {
	return c.RightParenPos
}

func (c *ColumnNamesExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	for i := range c.ColumnNames {
		if err := c.ColumnNames[i].Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitColumnNamesExpr(c)
}

type AssignmentValues struct {
	LeftParenPos  Pos
	RightParenPos Pos
	Values        []Expr
}

func (v *AssignmentValues) Pos() Pos {
	return v.LeftParenPos
}

func (v *AssignmentValues) End() Pos {
	return v.RightParenPos
}

func (v *AssignmentValues) Accept(visitor ASTVisitor) error {
	visitor.Enter(v)
	defer visitor.Leave(v)
	for _, value := range v.Values {
		if err := value.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitValuesExpr(v)
}

type InsertStmt struct {
	InsertPos       Pos
	Format          *FormatClause
	HasTableKeyword bool
	Table           Expr
	ColumnNames     *ColumnNamesExpr
	Values          []*AssignmentValues
	SelectExpr      *SelectQuery
}

func (i *InsertStmt) Pos() Pos {
	return i.InsertPos
}

func (i *InsertStmt) End() Pos {
	if i.SelectExpr != nil {
		return i.SelectExpr.End()
	}
	return i.Values[len(i.Values)-1].End()
}

func (i *InsertStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(i)
	defer visitor.Leave(i)
	if i.Format != nil {
		if err := i.Format.Accept(visitor); err != nil {
			return err
		}
	}
	if err := i.Table.Accept(visitor); err != nil {
		return err
	}
	if i.ColumnNames != nil {
		if err := i.ColumnNames.Accept(visitor); err != nil {
			return err
		}
	}
	for _, value := range i.Values {
		if err := value.Accept(visitor); err != nil {
			return err
		}
	}
	if i.SelectExpr != nil {
		if err := i.SelectExpr.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitInsertExpr(i)
}

type CheckStmt struct {
	CheckPos  Pos
	Table     *TableIdentifier
	Partition *PartitionClause
}

func (c *CheckStmt) Pos() Pos {
	return c.CheckPos
}

func (c *CheckStmt) End() Pos {
	return c.Partition.End()
}

func (c *CheckStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(c)
	defer visitor.Leave(c)
	if err := c.Table.Accept(visitor); err != nil {
		return err
	}
	if c.Partition != nil {
		if err := c.Partition.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitCheckExpr(c)
}

type UnaryExpr struct {
	UnaryPos Pos
	Kind     TokenKind
	Expr     Expr
}

func (n *UnaryExpr) Pos() Pos {
	return n.UnaryPos
}

func (n *UnaryExpr) End() Pos {
	return n.Expr.End()
}

func (n *UnaryExpr) Accept(visitor ASTVisitor) error {
	visitor.Enter(n)
	defer visitor.Leave(n)
	if err := n.Expr.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitUnaryExpr(n)
}

type RenameStmt struct {
	RenamePos    Pos
	StatementEnd Pos

	RenameTarget   string
	TargetPairList []*TargetPair
	OnCluster      *ClusterClause
}

func (r *RenameStmt) Pos() Pos {
	return r.RenamePos
}

func (r *RenameStmt) End() Pos {
	return r.StatementEnd
}

func (r *RenameStmt) Type() string {
	return "RENAME " + r.RenameTarget
}

func (r *RenameStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(r)
	defer visitor.Leave(r)
	for _, pair := range r.TargetPairList {
		if err := pair.Old.Accept(visitor); err != nil {
			return err
		}
		if err := pair.New.Accept(visitor); err != nil {
			return err
		}
	}
	if r.OnCluster != nil {
		if err := r.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitRenameStmt(r)
}

type TargetPair struct {
	Old *TableIdentifier
	New *TableIdentifier
}

func (t *TargetPair) Pos() Pos {
	return t.Old.Pos()
}

func (t *TargetPair) End() Pos {
	return t.New.End()
}

func (t *TargetPair) Accept(visitor ASTVisitor) error {
	visitor.Enter(t)
	defer visitor.Leave(t)
	if err := t.Old.Accept(visitor); err != nil {
		return err
	}
	if err := t.New.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitTargetPairExpr(t)
}

type ExplainStmt struct {
	ExplainPos Pos
	Type       string
	Statement  Expr
}

func (e *ExplainStmt) Pos() Pos {
	return e.ExplainPos
}

func (e *ExplainStmt) End() Pos {
	return e.Statement.End()
}

func (e *ExplainStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(e)
	defer visitor.Leave(e)
	if err := e.Statement.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitExplainExpr(e)
}

type PrivilegeClause struct {
	PrivilegePos Pos
	PrivilegeEnd Pos
	Keywords     []string
	Params       *ParamExprList
}

func (p *PrivilegeClause) Pos() Pos {
	return p.PrivilegePos
}

func (p *PrivilegeClause) End() Pos {
	return p.PrivilegeEnd
}

func (p *PrivilegeClause) Accept(visitor ASTVisitor) error {
	visitor.Enter(p)
	defer visitor.Leave(p)
	if p.Params != nil {
		if err := p.Params.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitPrivilegeExpr(p)
}

type GrantPrivilegeStmt struct {
	GrantPos     Pos
	StatementEnd Pos
	OnCluster    *ClusterClause
	Privileges   []*PrivilegeClause
	On           *TableIdentifier
	To           []*Ident
	WithOptions  []string
}

func (g *GrantPrivilegeStmt) Pos() Pos {
	return g.GrantPos
}

func (g *GrantPrivilegeStmt) End() Pos {
	return g.StatementEnd
}

func (g *GrantPrivilegeStmt) Type() string {
	return "GRANT PRIVILEGE"
}

func (g *GrantPrivilegeStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(g)
	defer visitor.Leave(g)
	if g.OnCluster != nil {
		if err := g.OnCluster.Accept(visitor); err != nil {
			return err
		}
	}
	for _, privilege := range g.Privileges {
		if err := privilege.Accept(visitor); err != nil {
			return err
		}
	}
	if err := g.On.Accept(visitor); err != nil {
		return err
	}
	for _, role := range g.To {
		if err := role.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitGrantPrivilegeExpr(g)
}

type ShowStmt struct {
	ShowPos      Pos
	StatementEnd Pos
	ShowType     string           // e.g., "CREATE TABLE", "DATABASES", "TABLES"
	Target       *TableIdentifier // for SHOW CREATE TABLE table_name

	// Optional clauses for SHOW DATABASES
	NotLike     bool           // true if NOT LIKE/ILIKE
	LikeType    string         // "LIKE" or "ILIKE", empty if not used
	LikePattern Expr           // pattern expression for LIKE/ILIKE
	Limit       Expr           // limit expression
	OutFile     *StringLiteral // filename for INTO OUTFILE
	Format      *StringLiteral // format specification
}

func (s *ShowStmt) Pos() Pos {
	return s.ShowPos
}

func (s *ShowStmt) End() Pos {
	// Find the rightmost element to determine the end position
	if s.Format != nil {
		return s.Format.End()
	}
	if s.OutFile != nil {
		return s.OutFile.End()
	}
	if s.Limit != nil {
		return s.Limit.End()
	}
	if s.LikePattern != nil {
		return s.LikePattern.End()
	}
	if s.Target != nil {
		return s.Target.End()
	}
	return s.StatementEnd
}

func (s *ShowStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(s)
	defer visitor.Leave(s)
	if s.Target != nil {
		if err := s.Target.Accept(visitor); err != nil {
			return err
		}
	}
	if s.LikePattern != nil {
		if err := s.LikePattern.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Limit != nil {
		if err := s.Limit.Accept(visitor); err != nil {
			return err
		}
	}
	if s.OutFile != nil {
		if err := s.OutFile.Accept(visitor); err != nil {
			return err
		}
	}
	if s.Format != nil {
		if err := s.Format.Accept(visitor); err != nil {
			return err
		}
	}
	return visitor.VisitShowExpr(s)
}

type DescribeStmt struct {
	DescribePos  Pos
	StatementEnd Pos
	DescribeType string // e.g., "TABLE", empty if not used
	Target       *TableIdentifier
}

func (d *DescribeStmt) Pos() Pos {
	return d.DescribePos
}

func (d *DescribeStmt) End() Pos {
	return d.Target.End()
}

func (d *DescribeStmt) Accept(visitor ASTVisitor) error {
	visitor.Enter(d)
	defer visitor.Leave(d)
	if err := d.Target.Accept(visitor); err != nil {
		return err
	}
	return visitor.VisitDescribeExpr(d)
}


================================================
FILE: parser/ast_visitor.go
================================================
package parser

type ASTVisitor interface {
	VisitOperationExpr(expr *OperationExpr) error
	VisitTernaryExpr(expr *TernaryOperation) error
	VisitBinaryExpr(expr *BinaryOperation) error
	VisitIndexOperation(expr *IndexOperation) error
	VisitAlterTable(expr *AlterTable) error
	VisitAlterTableAttachPartition(expr *AlterTableAttachPartition) error
	VisitAlterTableDetachPartition(expr *AlterTableDetachPartition) error
	VisitAlterTableDropPartition(expr *AlterTableDropPartition) error
	VisitAlterTableFreezePartition(expr *AlterTableFreezePartition) error
	VisitAlterTableAddColumn(expr *AlterTableAddColumn) error
	VisitAlterTableAddIndex(expr *AlterTableAddIndex) error
	VisitAlterTableAddProjection(expr *AlterTableAddProjection) error
	VisitTableProjection(expr *TableProjection) error
	VisitProjectionOrderBy(expr *ProjectionOrderByClause) error
	VisitProjectionSelect(expr *ProjectionSelectStmt) error
	VisitAlterTableDropColumn(expr *AlterTableDropColumn) error
	VisitAlterTableDropIndex(expr *AlterTableDropIndex) error
	VisitAlterTableDropProjection(expr *AlterTableDropProjection) error
	VisitAlterTableRemoveTTL(expr *AlterTableRemoveTTL) error
	VisitAlterTableClearColumn(expr *AlterTableClearColumn) error
	VisitAlterTableClearIndex(expr *AlterTableClearIndex) error
	VisitAlterTableClearProjection(expr *AlterTableClearProjection) error
	VisitAlterTableMaterializeIndex(expr *AlterTableMaterializeIndex) error
	VisitAlterTableMaterializeProjection(expr *AlterTableMaterializeProjection) error
	VisitAlterTableRenameColumn(expr *AlterTableRenameColumn) error
	VisitAlterTableModifyTTL(expr *AlterTableModifyTTL) error
	VisitAlterTableModifyQuery(expr *AlterTableModifyQuery) error
	VisitAlterTableModifyColumn(expr *AlterTableModifyColumn) error
	VisitAlterTableModifySetting(expr *AlterTableModifySetting) error
	VisitAlterTableResetSetting(expr *AlterTableResetSetting) error
	VisitAlterTableReplacePartition(expr *AlterTableReplacePartition) error
	VisitAlterTableDelete(expr *AlterTableDelete) error
	VisitAlterTableUpdate(expr *AlterTableUpdate) error
	VisitUpdateAssignment(expr *UpdateAssignment) error
	VisitRemovePropertyType(expr *RemovePropertyType) error
	VisitTableIndex(expr *TableIndex) error
	VisitIdent(expr *Ident) error
	VisitUUID(expr *UUID) error
	VisitCreateDatabase(expr *CreateDatabase) error
	VisitCreateTable(expr *CreateTable) error
	VisitCreateMaterializedView(expr *CreateMaterializedView) error
	VisitCreateView(expr *CreateView) error
	VisitCreateFunction(expr *CreateFunction) error
	VisitRoleName(expr *RoleName) error
	VisitSettingPair(expr *SettingPair) error
	VisitRoleSetting(expr *RoleSetting) error
	VisitCreateRole(expr *CreateRole) error
	VisitCreateUser(expr *CreateUser) error
	VisitAuthenticationClause(expr *AuthenticationClause) error
	VisitHostClause(expr *HostClause) error
	VisitDefaultRoleClause(expr *DefaultRoleClause) error
	VisitGranteesClause(expr *GranteesClause) error
	VisitAlterRole(expr *AlterRole) error
	VisitRoleRenamePair(expr *RoleRenamePair) error
	VisitDestinationExpr(expr *DestinationClause) error
	VisitConstraintExpr(expr *ConstraintClause) error
	VisitNullLiteral(expr *NullLiteral) error
	VisitNotNullLiteral(expr *NotNullLiteral) error
	VisitPath(expr *Path) error
	VisitNestedIdentifier(expr *NestedIdentifier) error
	VisitTableIdentifier(expr *TableIdentifier) error
	VisitTableSchemaExpr(expr *TableSchemaClause) error
	VisitTableArgListExpr(expr *TableArgListExpr) error
	VisitTableFunctionExpr(expr *TableFunctionExpr) error
	VisitOnClusterExpr(expr *ClusterClause) error
	VisitPartitionExpr(expr *PartitionClause) error
	VisitPartitionByExpr(expr *PartitionByClause) error
	VisitPrimaryKeyExpr(expr *PrimaryKeyClause) error
	VisitSampleByExpr(expr *SampleByClause) error
	VisitTTLExpr(expr *TTLExpr) error
	VisitTTLExprList(expr *TTLClause) error
	VisitTTLPolicy(expr *TTLPolicy) error
	VisitTTLPolicyRule(expr *TTLPolicyRule) error
	VisitTTLPolicyItemAction(expr *TTLPolicyRuleAction) error
	VisitRefreshExpr(expr *RefreshExpr) error
	VisitOrderByExpr(expr *OrderExpr) error
	VisitOrderByListExpr(expr *OrderByClause) error
	VisitFill(expr *Fill) error
	VisitInterpolateItem(expr *InterpolateItem) error
	VisitInterpolateClause(expr *InterpolateClause) error
	VisitSettingsExpr(expr *SettingExpr) error
	VisitSettingsExprList(expr *SettingsClause) error
	VisitParamExprList(expr *ParamExprList) error
	VisitMapLiteral(expr *MapLiteral) error
	VisitNamedParameterExpr(expr *NamedParameterExpr) error
	VisitArrayParamList(expr *ArrayParamList) error
	VisitQueryParam(expr *QueryParam) error
	VisitObjectParams(expr *ObjectParams) error
	VisitFunctionExpr(expr *FunctionExpr) error
	VisitWindowFunctionExpr(expr *WindowFunctionExpr) error
	VisitColumnDef(expr *ColumnDef) error
	VisitColumnExpr(expr *ColumnExpr) error
	VisitTypedPlaceholder(expr *TypedPlaceholder) error
	VisitScalarType(expr *ScalarType) error
	VisitJSONType(expr *JSONType) error
	VisitPropertyType(expr *PropertyType) error
	VisitTypeWithParams(expr *TypeWithParams) error
	VisitComplexType(expr *ComplexType) error
	VisitNestedType(expr *NestedType) error
	VisitCompressionCodec(expr *CompressionCodec) error
	VisitNumberLiteral(expr *NumberLiteral) error
	VisitStringLiteral(expr *StringLiteral) error
	VisitRatioExpr(expr *RatioExpr) error
	VisitEnumValue(expr *EnumValue) error
	VisitEnumType(expr *EnumType) error
	VisitIntervalExpr(expr *IntervalExpr) error
	VisitEngineExpr(expr *EngineExpr) error
	VisitColumnTypeExpr(expr *ColumnTypeExpr) error
	VisitColumnArgList(expr *ColumnArgList) error
	VisitColumnExprList(expr *ColumnExprList) error
	VisitWhenExpr(expr *WhenClause) error
	VisitCaseExpr(expr *CaseExpr) error
	VisitCastExpr(expr *CastExpr) error
	VisitWithExpr(expr *WithClause) error
	VisitTopExpr(expr *TopClause) error
	VisitCreateLiveView(expr *CreateLiveView) error
	VisitCreateDictionary(expr *CreateDictionary) error
	VisitCreateNamedCollection(expr *CreateNamedCollection) error
	VisitNamedCollectionParam(expr *NamedCollectionParam) error
	VisitDictionarySchemaClause(expr *DictionarySchemaClause) error
	VisitDictionaryAttribute(expr *DictionaryAttribute) error
	VisitDictionaryEngineClause(expr *DictionaryEngineClause) error
	VisitDictionaryPrimaryKeyClause(expr *DictionaryPrimaryKeyClause) error
	VisitDictionarySourceClause(expr *DictionarySourceClause) error
	VisitDictionaryArgExpr(expr *DictionaryArgExpr) error
	VisitDictionaryLifetimeClause(expr *DictionaryLifetimeClause) error
	VisitDictionaryLayoutClause(expr *DictionaryLayoutClause) error
	VisitDictionaryRangeClause(expr *DictionaryRangeClause) error
	VisitWithTimeoutExpr(expr *WithTimeoutClause) error
	VisitTableExpr(expr *TableExpr) error
	VisitOnExpr(expr *OnClause) error
	VisitUsingExpr(expr *UsingClause) error
	VisitJoinExpr(expr *JoinExpr) error
	VisitJoinConstraintExpr(expr *JoinConstraintClause) error
	VisitJoinTableExpr(expr *JoinTableExpr) error
	VisitFromExpr(expr *FromClause) error
	VisitIsNullExpr(expr *IsNullExpr) error
	VisitIsNotNullExpr(expr *IsNotNullExpr) error
	VisitAliasExpr(expr *AliasExpr) error
	VisitWhereExpr(expr *WhereClause) error
	VisitPrewhereExpr(expr *PrewhereClause) error
	VisitGroupByExpr(expr *GroupByClause) error
	VisitHavingExpr(expr *HavingClause) error
	VisitLimitExpr(expr *LimitClause) error
	VisitLimitByExpr(expr *LimitByClause) error
	VisitWindowConditionExpr(expr *WindowExpr) error
	VisitWindowExpr(expr *WindowClause) error
	VisitWindowFrameExpr(expr *WindowFrameClause) error
	VisitWindowFrameExtendExpr(expr *WindowFrameExtendExpr) error
	VisitBetweenClause(expr *BetweenClause) error
	VisitWindowFrameCurrentRow(expr *WindowFrameCurrentRow) error
	VisitWindowFrameUnbounded(expr *WindowFrameUnbounded) error
	VisitWindowFrameNumber(expr *WindowFrameNumber) error
	VisitWindowFrameParam(expr *WindowFrameParam) error
	VisitSelectQuery(expr *SelectQuery) error
	VisitSubQueryExpr(expr *SubQuery) error
	VisitNotExpr(expr *NotExpr) error
	VisitNegateExpr(expr *NegateExpr) error
	VisitGlobalInExpr(expr *GlobalInOperation) error
	VisitExtractExpr(expr *ExtractExpr) error
	VisitIntervalFrom(expr *IntervalFrom) error
	VisitDropDatabase(expr *DropDatabase) error
	VisitDropStmt(expr *DropStmt) error
	VisitDropUserOrRole(expr *DropUserOrRole) error
	VisitUseExpr(expr *UseStmt) error
	VisitCTEExpr(expr *CTEStmt) error
	VisitSetExpr(expr *SetStmt) error
	VisitFormatExpr(expr *FormatClause) error
	VisitOptimizeExpr(expr *OptimizeStmt) error
	VisitDeduplicateExpr(expr *DeduplicateClause) error
	VisitSystemExpr(expr *SystemStmt) error
	VisitSystemFlushExpr(expr *SystemFlushExpr) error
	VisitSystemReloadExpr(expr *SystemReloadExpr) error
	VisitSystemSyncExpr(expr *SystemSyncExpr) error
	VisitSystemCtrlExpr(expr *SystemCtrlExpr) error
	VisitSystemDropExpr(expr *SystemDropExpr) error
	VisitTruncateTable(expr *TruncateTable) error
	VisitSampleRatioExpr(expr *SampleClause) error
	VisitPlaceHolderExpr(expr *PlaceHolder) error
	VisitDeleteFromExpr(expr *DeleteClause) error
	VisitColumnNamesExpr(expr *ColumnNamesExpr) error
	VisitValuesExpr(expr *AssignmentValues) error
	VisitInsertExpr(expr *InsertStmt) error
	VisitCheckExpr(expr *CheckStmt) error
	VisitUnaryExpr(expr *UnaryExpr) error
	VisitRenameStmt(expr *RenameStmt) error
	VisitExplainExpr(expr *ExplainStmt) error
	VisitPrivilegeExpr(expr *PrivilegeClause) error
	VisitGrantPrivilegeExpr(expr *GrantPrivilegeStmt) error
	VisitShowExpr(expr *ShowStmt) error
	VisitDescribeExpr(expr *DescribeStmt) error
	VisitSelectItem(expr *SelectItem) error
	VisitTargetPairExpr(expr *TargetPair) error
	VisitDistinctOn(expr *DistinctOn) error
	VisitBoolLiteral(expr *BoolLiteral) error

	Enter(expr Expr)
	Leave(expr Expr)
}

type VisitFunc func(expr Expr) error

type DefaultASTVisitor struct {
	Visit VisitFunc
}

func (v *DefaultASTVisitor) VisitOperationExpr(expr *OperationExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTernaryExpr(expr *TernaryOperation) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitBinaryExpr(expr *BinaryOperation) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitIndexOperation(expr *IndexOperation) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitJoinTableExpr(expr *JoinTableExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTable(expr *AlterTable) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableAttachPartition(expr *AlterTableAttachPartition) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableDetachPartition(expr *AlterTableDetachPartition) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableDropPartition(expr *AlterTableDropPartition) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableFreezePartition(expr *AlterTableFreezePartition) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableAddColumn(expr *AlterTableAddColumn) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableAddIndex(expr *AlterTableAddIndex) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableAddProjection(expr *AlterTableAddProjection) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitProjectionOrderBy(expr *ProjectionOrderByClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitProjectionSelect(expr *ProjectionSelectStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableProjection(expr *TableProjection) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableDropColumn(expr *AlterTableDropColumn) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableDropIndex(expr *AlterTableDropIndex) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableDropProjection(expr *AlterTableDropProjection) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableRemoveTTL(expr *AlterTableRemoveTTL) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableClearColumn(expr *AlterTableClearColumn) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableClearIndex(expr *AlterTableClearIndex) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableClearProjection(expr *AlterTableClearProjection) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableMaterializeProjection(expr *AlterTableMaterializeProjection) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableMaterializeIndex(expr *AlterTableMaterializeIndex) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableRenameColumn(expr *AlterTableRenameColumn) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableModifyQuery(expr *AlterTableModifyQuery) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableModifyTTL(expr *AlterTableModifyTTL) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableModifyColumn(expr *AlterTableModifyColumn) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableModifySetting(expr *AlterTableModifySetting) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableResetSetting(expr *AlterTableResetSetting) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableReplacePartition(expr *AlterTableReplacePartition) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableDelete(expr *AlterTableDelete) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterTableUpdate(expr *AlterTableUpdate) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitUpdateAssignment(expr *UpdateAssignment) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRemovePropertyType(expr *RemovePropertyType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableIndex(expr *TableIndex) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitIdent(expr *Ident) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitUUID(expr *UUID) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateDatabase(expr *CreateDatabase) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateTable(expr *CreateTable) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateMaterializedView(expr *CreateMaterializedView) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateView(expr *CreateView) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateFunction(expr *CreateFunction) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRoleName(expr *RoleName) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSettingPair(expr *SettingPair) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRoleSetting(expr *RoleSetting) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateRole(expr *CreateRole) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateUser(expr *CreateUser) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAuthenticationClause(expr *AuthenticationClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitHostClause(expr *HostClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDefaultRoleClause(expr *DefaultRoleClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitGranteesClause(expr *GranteesClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAlterRole(expr *AlterRole) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRoleRenamePair(expr *RoleRenamePair) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDestinationExpr(expr *DestinationClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitConstraintExpr(expr *ConstraintClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNullLiteral(expr *NullLiteral) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNotNullLiteral(expr *NotNullLiteral) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNestedIdentifier(expr *NestedIdentifier) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPath(expr *Path) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableIdentifier(expr *TableIdentifier) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableSchemaExpr(expr *TableSchemaClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableArgListExpr(expr *TableArgListExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableFunctionExpr(expr *TableFunctionExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitOnClusterExpr(expr *ClusterClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPartitionExpr(expr *PartitionClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPartitionByExpr(expr *PartitionByClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPrimaryKeyExpr(expr *PrimaryKeyClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSampleByExpr(expr *SampleByClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTTLExpr(expr *TTLExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTTLExprList(expr *TTLClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTTLPolicy(expr *TTLPolicy) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTTLPolicyRule(expr *TTLPolicyRule) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTTLPolicyItemAction(expr *TTLPolicyRuleAction) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRefreshExpr(expr *RefreshExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitOrderByExpr(expr *OrderExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitOrderByListExpr(expr *OrderByClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitFill(expr *Fill) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitInterpolateItem(expr *InterpolateItem) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitInterpolateClause(expr *InterpolateClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSettingsExpr(expr *SettingExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSettingsExprList(expr *SettingsClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitParamExprList(expr *ParamExprList) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitArrayParamList(expr *ArrayParamList) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitQueryParam(expr *QueryParam) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitMapLiteral(expr *MapLiteral) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNamedParameterExpr(expr *NamedParameterExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitObjectParams(expr *ObjectParams) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitFunctionExpr(expr *FunctionExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFunctionExpr(expr *WindowFunctionExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitColumnDef(expr *ColumnDef) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitColumnExpr(expr *ColumnExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTypedPlaceholder(expr *TypedPlaceholder) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitScalarType(expr *ScalarType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitJSONType(expr *JSONType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPropertyType(expr *PropertyType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTypeWithParams(expr *TypeWithParams) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitComplexType(expr *ComplexType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNestedType(expr *NestedType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCompressionCodec(expr *CompressionCodec) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNumberLiteral(expr *NumberLiteral) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitStringLiteral(expr *StringLiteral) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRatioExpr(expr *RatioExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitEnumValue(expr *EnumValue) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitEnumType(expr *EnumType) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitIntervalExpr(expr *IntervalExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitEngineExpr(expr *EngineExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitColumnTypeExpr(expr *ColumnTypeExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitColumnArgList(expr *ColumnArgList) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitColumnExprList(expr *ColumnExprList) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWhenExpr(expr *WhenClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCaseExpr(expr *CaseExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCastExpr(expr *CastExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWithExpr(expr *WithClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTopExpr(expr *TopClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateLiveView(expr *CreateLiveView) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateDictionary(expr *CreateDictionary) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCreateNamedCollection(expr *CreateNamedCollection) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNamedCollectionParam(expr *NamedCollectionParam) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionarySchemaClause(expr *DictionarySchemaClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryAttribute(expr *DictionaryAttribute) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryEngineClause(expr *DictionaryEngineClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryPrimaryKeyClause(expr *DictionaryPrimaryKeyClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionarySourceClause(expr *DictionarySourceClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryArgExpr(expr *DictionaryArgExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryLifetimeClause(expr *DictionaryLifetimeClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryLayoutClause(expr *DictionaryLayoutClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDictionaryRangeClause(expr *DictionaryRangeClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWithTimeoutExpr(expr *WithTimeoutClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTableExpr(expr *TableExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitOnExpr(expr *OnClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitUsingExpr(expr *UsingClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitJoinExpr(expr *JoinExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitJoinConstraintExpr(expr *JoinConstraintClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitFromExpr(expr *FromClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitIsNullExpr(expr *IsNullExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitIsNotNullExpr(expr *IsNotNullExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitAliasExpr(expr *AliasExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWhereExpr(expr *WhereClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPrewhereExpr(expr *PrewhereClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitGroupByExpr(expr *GroupByClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitHavingExpr(expr *HavingClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitLimitExpr(expr *LimitClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitLimitByExpr(expr *LimitByClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowConditionExpr(expr *WindowExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowExpr(expr *WindowClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFrameExpr(expr *WindowFrameClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFrameExtendExpr(expr *WindowFrameExtendExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitBetweenClause(expr *BetweenClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFrameCurrentRow(expr *WindowFrameCurrentRow) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFrameUnbounded(expr *WindowFrameUnbounded) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFrameNumber(expr *WindowFrameNumber) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitWindowFrameParam(expr *WindowFrameParam) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSelectQuery(expr *SelectQuery) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSubQueryExpr(expr *SubQuery) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNotExpr(expr *NotExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitNegateExpr(expr *NegateExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitGlobalInExpr(expr *GlobalInOperation) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitExtractExpr(expr *ExtractExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitIntervalFrom(expr *IntervalFrom) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDropDatabase(expr *DropDatabase) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDropStmt(expr *DropStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDropUserOrRole(expr *DropUserOrRole) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitUseExpr(expr *UseStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCTEExpr(expr *CTEStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSetExpr(expr *SetStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitFormatExpr(expr *FormatClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitOptimizeExpr(expr *OptimizeStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDeduplicateExpr(expr *DeduplicateClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSystemExpr(expr *SystemStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSystemFlushExpr(expr *SystemFlushExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSystemReloadExpr(expr *SystemReloadExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSystemSyncExpr(expr *SystemSyncExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSystemCtrlExpr(expr *SystemCtrlExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSystemDropExpr(expr *SystemDropExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitTruncateTable(expr *TruncateTable) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitSampleRatioExpr(expr *SampleClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitPlaceHolderExpr(expr *PlaceHolder) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitDeleteFromExpr(expr *DeleteClause) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitColumnNamesExpr(expr *ColumnNamesExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitValuesExpr(expr *AssignmentValues) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitInsertExpr(expr *InsertStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitCheckExpr(expr *CheckStmt) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitUnaryExpr(expr *UnaryExpr) error {
	if v.Visit != nil {
		return v.Visit(expr)
	}
	return nil
}

func (v *DefaultASTVisitor) VisitRenameStmt(expr *RenameStmt) error {
	if v.Visit 
Download .txt
gitextract_22vvr93l/

├── .github/
│   └── workflows/
│       └── ci.yaml
├── .gitignore
├── .golangci.yml
├── AGENTS.md
├── LICENSE
├── Makefile
├── README.md
├── go.mod
├── go.sum
├── main.go
└── parser/
    ├── ast.go
    ├── ast_visitor.go
    ├── benchmark_test.go
    ├── format.go
    ├── format_test.go
    ├── helper.go
    ├── keyword.go
    ├── lexer.go
    ├── lexer_test.go
    ├── parse_system.go
    ├── parser_alter.go
    ├── parser_column.go
    ├── parser_common.go
    ├── parser_drop.go
    ├── parser_query.go
    ├── parser_table.go
    ├── parser_test.go
    ├── parser_view.go
    ├── set.go
    ├── set_test.go
    ├── testdata/
    │   ├── basic/
    │   │   ├── format/
    │   │   │   ├── beautify/
    │   │   │   │   ├── quantile_functions.sql
    │   │   │   │   ├── set_statement.sql
    │   │   │   │   ├── settings_statement.sql
    │   │   │   │   └── use_database.sql
    │   │   │   ├── quantile_functions.sql
    │   │   │   ├── set_statement.sql
    │   │   │   ├── settings_statement.sql
    │   │   │   └── use_database.sql
    │   │   ├── output/
    │   │   │   ├── quantile_functions.sql.golden.json
    │   │   │   ├── set_statement.sql.golden.json
    │   │   │   ├── settings_statement.sql.golden.json
    │   │   │   └── use_database.sql.golden.json
    │   │   ├── quantile_functions.sql
    │   │   ├── set_statement.sql
    │   │   ├── settings_statement.sql
    │   │   └── use_database.sql
    │   ├── benchdata/
    │   │   ├── posthog_huge_0.sql
    │   │   └── posthog_huge_1.sql
    │   ├── ddl/
    │   │   ├── alter_role.sql
    │   │   ├── alter_table_add_column.sql
    │   │   ├── alter_table_add_index.sql
    │   │   ├── alter_table_add_projection.sql
    │   │   ├── alter_table_add_projection_group_by_only.sql
    │   │   ├── alter_table_attach_partition.sql
    │   │   ├── alter_table_clear_column.sql
    │   │   ├── alter_table_clear_index.sql
    │   │   ├── alter_table_clear_projection.sql
    │   │   ├── alter_table_delete.sql
    │   │   ├── alter_table_delete_with_cluster.sql
    │   │   ├── alter_table_detach_partition.sql
    │   │   ├── alter_table_drop_column.sql
    │   │   ├── alter_table_drop_detach_partition.sql
    │   │   ├── alter_table_drop_index.sql
    │   │   ├── alter_table_drop_partition.sql
    │   │   ├── alter_table_drop_projection.sql
    │   │   ├── alter_table_freeze_no_specify_partition.sql
    │   │   ├── alter_table_freeze_partition.sql
    │   │   ├── alter_table_materialize_index.sql
    │   │   ├── alter_table_materialize_projection.sql
    │   │   ├── alter_table_modify_column.sql
    │   │   ├── alter_table_modify_column_remove.sql
    │   │   ├── alter_table_modify_setting.sql
    │   │   ├── alter_table_remove_ttl.sql
    │   │   ├── alter_table_rename_column.sql
    │   │   ├── alter_table_replace_partition.sql
    │   │   ├── alter_table_reset_multiple_settings.sql
    │   │   ├── alter_table_reset_setting.sql
    │   │   ├── alter_table_update.sql
    │   │   ├── alter_table_update_in_partition.sql
    │   │   ├── alter_table_update_with_cluster.sql
    │   │   ├── attach_table_basic.sql
    │   │   ├── bug_001.sql
    │   │   ├── check.sql
    │   │   ├── create_database.sql
    │   │   ├── create_database_replicated.sql
    │   │   ├── create_dictionary_basic.sql
    │   │   ├── create_dictionary_comprehensive.sql
    │   │   ├── create_dictionary_with_comment.sql
    │   │   ├── create_distributed_table.sql
    │   │   ├── create_function_simple.sql
    │   │   ├── create_live_view_basic.sql
    │   │   ├── create_materialized_view_basic.sql
    │   │   ├── create_materialized_view_with_comment_before_as.sql
    │   │   ├── create_materialized_view_with_definer.sql
    │   │   ├── create_materialized_view_with_empty_table_schema.sql
    │   │   ├── create_materialized_view_with_gcs.sql
    │   │   ├── create_materialized_view_with_refresh.sql
    │   │   ├── create_mv_with_not_op.sql
    │   │   ├── create_mv_with_order_by.sql
    │   │   ├── create_named_collection_basic.sql
    │   │   ├── create_named_collection_simple.sql
    │   │   ├── create_named_collection_with_cluster.sql
    │   │   ├── create_named_collection_with_overridable.sql
    │   │   ├── create_or_replace.sql
    │   │   ├── create_role.sql
    │   │   ├── create_table_as_remote_function.sql
    │   │   ├── create_table_basic.sql
    │   │   ├── create_table_codec_no_args.sql
    │   │   ├── create_table_json_typehints.sql
    │   │   ├── create_table_with_codec_delta.sql
    │   │   ├── create_table_with_enum_fields.sql
    │   │   ├── create_table_with_index.sql
    │   │   ├── create_table_with_keyword_partition_by.sql
    │   │   ├── create_table_with_null_engine.sql
    │   │   ├── create_table_with_nullable.sql
    │   │   ├── create_table_with_on_clsuter.sql
    │   │   ├── create_table_with_projection.sql
    │   │   ├── create_table_with_projection_group_by_only.sql
    │   │   ├── create_table_with_qbit.sql
    │   │   ├── create_table_with_sample_by.sql
    │   │   ├── create_table_with_ttl_policy.sql
    │   │   ├── create_table_with_tuple_fields.sql
    │   │   ├── create_table_with_uuid.sql
    │   │   ├── create_user.sql
    │   │   ├── create_view_basic.sql
    │   │   ├── create_view_on_cluster_with_uuid.sql
    │   │   ├── create_view_with_comment.sql
    │   │   ├── create_with_time_zone.sql
    │   │   ├── desc_table_with_table_keyword.sql
    │   │   ├── desc_table_without_table_keyword.sql
    │   │   ├── describe_table_with_table_keyword.sql
    │   │   ├── describe_table_without_table_keyword.sql
    │   │   ├── drop_database.sql
    │   │   ├── drop_role.sql
    │   │   ├── drop_table_basic.sql
    │   │   ├── drop_table_with_no_delay.sql
    │   │   ├── drop_table_with_on_clsuter.sql
    │   │   ├── format/
    │   │   │   ├── alter_role.sql
    │   │   │   ├── alter_table_add_column.sql
    │   │   │   ├── alter_table_add_index.sql
    │   │   │   ├── alter_table_add_projection.sql
    │   │   │   ├── alter_table_add_projection_group_by_only.sql
    │   │   │   ├── alter_table_attach_partition.sql
    │   │   │   ├── alter_table_clear_column.sql
    │   │   │   ├── alter_table_clear_index.sql
    │   │   │   ├── alter_table_clear_projection.sql
    │   │   │   ├── alter_table_delete.sql
    │   │   │   ├── alter_table_delete_with_cluster.sql
    │   │   │   ├── alter_table_detach_partition.sql
    │   │   │   ├── alter_table_drop_column.sql
    │   │   │   ├── alter_table_drop_detach_partition.sql
    │   │   │   ├── alter_table_drop_index.sql
    │   │   │   ├── alter_table_drop_partition.sql
    │   │   │   ├── alter_table_drop_projection.sql
    │   │   │   ├── alter_table_freeze_no_specify_partition.sql
    │   │   │   ├── alter_table_freeze_partition.sql
    │   │   │   ├── alter_table_materialize_index.sql
    │   │   │   ├── alter_table_materialize_projection.sql
    │   │   │   ├── alter_table_modify_column.sql
    │   │   │   ├── alter_table_modify_column_remove.sql
    │   │   │   ├── alter_table_modify_setting.sql
    │   │   │   ├── alter_table_remove_ttl.sql
    │   │   │   ├── alter_table_rename_column.sql
    │   │   │   ├── alter_table_replace_partition.sql
    │   │   │   ├── alter_table_reset_multiple_settings.sql
    │   │   │   ├── alter_table_reset_setting.sql
    │   │   │   ├── alter_table_update.sql
    │   │   │   ├── alter_table_update_in_partition.sql
    │   │   │   ├── alter_table_update_with_cluster.sql
    │   │   │   ├── attach_table_basic.sql
    │   │   │   ├── beautify/
    │   │   │   │   ├── alter_role.sql
    │   │   │   │   ├── alter_table_add_column.sql
    │   │   │   │   ├── alter_table_add_index.sql
    │   │   │   │   ├── alter_table_add_projection.sql
    │   │   │   │   ├── alter_table_add_projection_group_by_only.sql
    │   │   │   │   ├── alter_table_attach_partition.sql
    │   │   │   │   ├── alter_table_clear_column.sql
    │   │   │   │   ├── alter_table_clear_index.sql
    │   │   │   │   ├── alter_table_clear_projection.sql
    │   │   │   │   ├── alter_table_delete.sql
    │   │   │   │   ├── alter_table_delete_with_cluster.sql
    │   │   │   │   ├── alter_table_detach_partition.sql
    │   │   │   │   ├── alter_table_drop_column.sql
    │   │   │   │   ├── alter_table_drop_detach_partition.sql
    │   │   │   │   ├── alter_table_drop_index.sql
    │   │   │   │   ├── alter_table_drop_partition.sql
    │   │   │   │   ├── alter_table_drop_projection.sql
    │   │   │   │   ├── alter_table_freeze_no_specify_partition.sql
    │   │   │   │   ├── alter_table_freeze_partition.sql
    │   │   │   │   ├── alter_table_materialize_index.sql
    │   │   │   │   ├── alter_table_materialize_projection.sql
    │   │   │   │   ├── alter_table_modify_column.sql
    │   │   │   │   ├── alter_table_modify_column_remove.sql
    │   │   │   │   ├── alter_table_modify_setting.sql
    │   │   │   │   ├── alter_table_remove_ttl.sql
    │   │   │   │   ├── alter_table_rename_column.sql
    │   │   │   │   ├── alter_table_replace_partition.sql
    │   │   │   │   ├── alter_table_reset_multiple_settings.sql
    │   │   │   │   ├── alter_table_reset_setting.sql
    │   │   │   │   ├── alter_table_update.sql
    │   │   │   │   ├── alter_table_update_in_partition.sql
    │   │   │   │   ├── alter_table_update_with_cluster.sql
    │   │   │   │   ├── attach_table_basic.sql
    │   │   │   │   ├── bug_001.sql
    │   │   │   │   ├── check.sql
    │   │   │   │   ├── create_database.sql
    │   │   │   │   ├── create_database_replicated.sql
    │   │   │   │   ├── create_dictionary_basic.sql
    │   │   │   │   ├── create_dictionary_comprehensive.sql
    │   │   │   │   ├── create_dictionary_with_comment.sql
    │   │   │   │   ├── create_distributed_table.sql
    │   │   │   │   ├── create_function_simple.sql
    │   │   │   │   ├── create_live_view_basic.sql
    │   │   │   │   ├── create_materialized_view_basic.sql
    │   │   │   │   ├── create_materialized_view_with_comment_before_as.sql
    │   │   │   │   ├── create_materialized_view_with_definer.sql
    │   │   │   │   ├── create_materialized_view_with_empty_table_schema.sql
    │   │   │   │   ├── create_materialized_view_with_gcs.sql
    │   │   │   │   ├── create_materialized_view_with_refresh.sql
    │   │   │   │   ├── create_mv_with_not_op.sql
    │   │   │   │   ├── create_mv_with_order_by.sql
    │   │   │   │   ├── create_named_collection_basic.sql
    │   │   │   │   ├── create_named_collection_simple.sql
    │   │   │   │   ├── create_named_collection_with_cluster.sql
    │   │   │   │   ├── create_named_collection_with_overridable.sql
    │   │   │   │   ├── create_or_replace.sql
    │   │   │   │   ├── create_role.sql
    │   │   │   │   ├── create_table_as_remote_function.sql
    │   │   │   │   ├── create_table_basic.sql
    │   │   │   │   ├── create_table_codec_no_args.sql
    │   │   │   │   ├── create_table_json_typehints.sql
    │   │   │   │   ├── create_table_with_codec_delta.sql
    │   │   │   │   ├── create_table_with_enum_fields.sql
    │   │   │   │   ├── create_table_with_index.sql
    │   │   │   │   ├── create_table_with_keyword_partition_by.sql
    │   │   │   │   ├── create_table_with_null_engine.sql
    │   │   │   │   ├── create_table_with_nullable.sql
    │   │   │   │   ├── create_table_with_on_clsuter.sql
    │   │   │   │   ├── create_table_with_projection.sql
    │   │   │   │   ├── create_table_with_projection_group_by_only.sql
    │   │   │   │   ├── create_table_with_qbit.sql
    │   │   │   │   ├── create_table_with_sample_by.sql
    │   │   │   │   ├── create_table_with_ttl_policy.sql
    │   │   │   │   ├── create_table_with_tuple_fields.sql
    │   │   │   │   ├── create_table_with_uuid.sql
    │   │   │   │   ├── create_user.sql
    │   │   │   │   ├── create_view_basic.sql
    │   │   │   │   ├── create_view_on_cluster_with_uuid.sql
    │   │   │   │   ├── create_view_with_comment.sql
    │   │   │   │   ├── create_with_time_zone.sql
    │   │   │   │   ├── desc_table_with_table_keyword.sql
    │   │   │   │   ├── desc_table_without_table_keyword.sql
    │   │   │   │   ├── describe_table_with_table_keyword.sql
    │   │   │   │   ├── describe_table_without_table_keyword.sql
    │   │   │   │   ├── drop_database.sql
    │   │   │   │   ├── drop_role.sql
    │   │   │   │   ├── drop_table_basic.sql
    │   │   │   │   ├── drop_table_with_no_delay.sql
    │   │   │   │   ├── drop_table_with_on_clsuter.sql
    │   │   │   │   ├── grant_privilege.sql
    │   │   │   │   ├── optimize.sql
    │   │   │   │   ├── rename.sql
    │   │   │   │   ├── show_create_table.sql
    │   │   │   │   ├── show_databases.sql
    │   │   │   │   ├── show_databases_comprehensive.sql
    │   │   │   │   ├── show_databases_format.sql
    │   │   │   │   ├── show_databases_format_string.sql
    │   │   │   │   ├── show_databases_ilike.sql
    │   │   │   │   ├── show_databases_like.sql
    │   │   │   │   ├── show_databases_limit.sql
    │   │   │   │   ├── show_databases_not_ilike.sql
    │   │   │   │   ├── show_databases_not_like.sql
    │   │   │   │   ├── show_databases_outfile.sql
    │   │   │   │   ├── show_tables.sql
    │   │   │   │   ├── systems.sql
    │   │   │   │   ├── truncate_table_basic.sql
    │   │   │   │   └── truncate_temporary_table_on_clsuter.sql
    │   │   │   ├── bug_001.sql
    │   │   │   ├── check.sql
    │   │   │   ├── create_database.sql
    │   │   │   ├── create_database_replicated.sql
    │   │   │   ├── create_dictionary_basic.sql
    │   │   │   ├── create_dictionary_comprehensive.sql
    │   │   │   ├── create_dictionary_with_comment.sql
    │   │   │   ├── create_distributed_table.sql
    │   │   │   ├── create_function_simple.sql
    │   │   │   ├── create_live_view_basic.sql
    │   │   │   ├── create_materialized_view_basic.sql
    │   │   │   ├── create_materialized_view_with_comment_before_as.sql
    │   │   │   ├── create_materialized_view_with_definer.sql
    │   │   │   ├── create_materialized_view_with_empty_table_schema.sql
    │   │   │   ├── create_materialized_view_with_gcs.sql
    │   │   │   ├── create_materialized_view_with_refresh.sql
    │   │   │   ├── create_mv_with_not_op.sql
    │   │   │   ├── create_mv_with_order_by.sql
    │   │   │   ├── create_named_collection_basic.sql
    │   │   │   ├── create_named_collection_simple.sql
    │   │   │   ├── create_named_collection_with_cluster.sql
    │   │   │   ├── create_named_collection_with_overridable.sql
    │   │   │   ├── create_or_replace.sql
    │   │   │   ├── create_role.sql
    │   │   │   ├── create_table_as_remote_function.sql
    │   │   │   ├── create_table_basic.sql
    │   │   │   ├── create_table_codec_no_args.sql
    │   │   │   ├── create_table_json_typehints.sql
    │   │   │   ├── create_table_with_codec_delta.sql
    │   │   │   ├── create_table_with_enum_fields.sql
    │   │   │   ├── create_table_with_index.sql
    │   │   │   ├── create_table_with_keyword_partition_by.sql
    │   │   │   ├── create_table_with_null_engine.sql
    │   │   │   ├── create_table_with_nullable.sql
    │   │   │   ├── create_table_with_on_clsuter.sql
    │   │   │   ├── create_table_with_projection.sql
    │   │   │   ├── create_table_with_projection_group_by_only.sql
    │   │   │   ├── create_table_with_qbit.sql
    │   │   │   ├── create_table_with_sample_by.sql
    │   │   │   ├── create_table_with_ttl_policy.sql
    │   │   │   ├── create_table_with_tuple_fields.sql
    │   │   │   ├── create_table_with_uuid.sql
    │   │   │   ├── create_user.sql
    │   │   │   ├── create_view_basic.sql
    │   │   │   ├── create_view_on_cluster_with_uuid.sql
    │   │   │   ├── create_view_with_comment.sql
    │   │   │   ├── create_with_time_zone.sql
    │   │   │   ├── desc_table_with_table_keyword.sql
    │   │   │   ├── desc_table_without_table_keyword.sql
    │   │   │   ├── describe_table_with_table_keyword.sql
    │   │   │   ├── describe_table_without_table_keyword.sql
    │   │   │   ├── drop_database.sql
    │   │   │   ├── drop_role.sql
    │   │   │   ├── drop_table_basic.sql
    │   │   │   ├── drop_table_with_no_delay.sql
    │   │   │   ├── drop_table_with_on_clsuter.sql
    │   │   │   ├── grant_privilege.sql
    │   │   │   ├── optimize.sql
    │   │   │   ├── rename.sql
    │   │   │   ├── show_create_table.sql
    │   │   │   ├── show_databases.sql
    │   │   │   ├── show_databases_comprehensive.sql
    │   │   │   ├── show_databases_format.sql
    │   │   │   ├── show_databases_format_string.sql
    │   │   │   ├── show_databases_ilike.sql
    │   │   │   ├── show_databases_like.sql
    │   │   │   ├── show_databases_limit.sql
    │   │   │   ├── show_databases_not_ilike.sql
    │   │   │   ├── show_databases_not_like.sql
    │   │   │   ├── show_databases_outfile.sql
    │   │   │   ├── show_tables.sql
    │   │   │   ├── systems.sql
    │   │   │   ├── truncate_table_basic.sql
    │   │   │   └── truncate_temporary_table_on_clsuter.sql
    │   │   ├── grant_privilege.sql
    │   │   ├── optimize.sql
    │   │   ├── output/
    │   │   │   ├── alter_role.sql.golden.json
    │   │   │   ├── alter_table_add_column.sql.golden.json
    │   │   │   ├── alter_table_add_index.sql.golden.json
    │   │   │   ├── alter_table_add_projection.sql.golden.json
    │   │   │   ├── alter_table_add_projection_group_by_only.sql.golden.json
    │   │   │   ├── alter_table_attach_partition.sql.golden.json
    │   │   │   ├── alter_table_clear_column.sql.golden.json
    │   │   │   ├── alter_table_clear_index.sql.golden.json
    │   │   │   ├── alter_table_clear_projection.sql.golden.json
    │   │   │   ├── alter_table_delete.sql.golden.json
    │   │   │   ├── alter_table_delete_with_cluster.sql.golden.json
    │   │   │   ├── alter_table_detach_partition.sql.golden.json
    │   │   │   ├── alter_table_drop_column.sql.golden.json
    │   │   │   ├── alter_table_drop_detach_partition.sql.golden.json
    │   │   │   ├── alter_table_drop_index.sql.golden.json
    │   │   │   ├── alter_table_drop_partition.sql.golden.json
    │   │   │   ├── alter_table_drop_projection.sql.golden.json
    │   │   │   ├── alter_table_freeze_no_specify_partition.sql.golden.json
    │   │   │   ├── alter_table_freeze_partition.sql.golden.json
    │   │   │   ├── alter_table_materialize_index.sql.golden.json
    │   │   │   ├── alter_table_materialize_projection.sql.golden.json
    │   │   │   ├── alter_table_modify_column.sql.golden.json
    │   │   │   ├── alter_table_modify_column_remove.sql.golden.json
    │   │   │   ├── alter_table_modify_setting.sql.golden.json
    │   │   │   ├── alter_table_remove_ttl.sql.golden.json
    │   │   │   ├── alter_table_rename_column.sql.golden.json
    │   │   │   ├── alter_table_replace_partition.sql.golden.json
    │   │   │   ├── alter_table_reset_multiple_settings.sql.golden.json
    │   │   │   ├── alter_table_reset_setting.sql.golden.json
    │   │   │   ├── alter_table_update.sql.golden.json
    │   │   │   ├── alter_table_update_in_partition.sql.golden.json
    │   │   │   ├── alter_table_update_with_cluster.sql.golden.json
    │   │   │   ├── attach_table_basic.sql.golden.json
    │   │   │   ├── bug_001.sql.golden.json
    │   │   │   ├── check.sql.golden.json
    │   │   │   ├── create_database.sql.golden.json
    │   │   │   ├── create_database_replicated.sql.golden.json
    │   │   │   ├── create_dictionary_basic.sql.golden.json
    │   │   │   ├── create_dictionary_comprehensive.sql.golden.json
    │   │   │   ├── create_dictionary_with_comment.sql.golden.json
    │   │   │   ├── create_distributed_table.sql.golden.json
    │   │   │   ├── create_function_simple.sql.golden.json
    │   │   │   ├── create_live_view_basic.sql.golden.json
    │   │   │   ├── create_materialized_view_basic.sql.golden.json
    │   │   │   ├── create_materialized_view_with_comment_before_as.sql.golden.json
    │   │   │   ├── create_materialized_view_with_definer.sql.golden.json
    │   │   │   ├── create_materialized_view_with_empty_table_schema.sql.golden.json
    │   │   │   ├── create_materialized_view_with_gcs.sql.golden.json
    │   │   │   ├── create_materialized_view_with_refresh.sql.golden.json
    │   │   │   ├── create_mv_with_not_op.sql.golden.json
    │   │   │   ├── create_mv_with_order_by.sql.golden.json
    │   │   │   ├── create_named_collection_basic.sql.golden.json
    │   │   │   ├── create_named_collection_simple.sql.golden.json
    │   │   │   ├── create_named_collection_with_cluster.sql.golden.json
    │   │   │   ├── create_named_collection_with_overridable.sql.golden.json
    │   │   │   ├── create_or_replace.sql.golden.json
    │   │   │   ├── create_role.sql.golden.json
    │   │   │   ├── create_table_as_remote_function.sql.golden.json
    │   │   │   ├── create_table_basic.sql.golden.json
    │   │   │   ├── create_table_codec_no_args.sql.golden.json
    │   │   │   ├── create_table_json_typehints.sql.golden.json
    │   │   │   ├── create_table_with_codec_delta.sql.golden.json
    │   │   │   ├── create_table_with_enum_fields.sql.golden.json
    │   │   │   ├── create_table_with_index.sql.golden.json
    │   │   │   ├── create_table_with_keyword_partition_by.sql.golden.json
    │   │   │   ├── create_table_with_null_engine.sql.golden.json
    │   │   │   ├── create_table_with_nullable.sql.golden.json
    │   │   │   ├── create_table_with_on_clsuter.sql.golden.json
    │   │   │   ├── create_table_with_projection.sql.golden.json
    │   │   │   ├── create_table_with_projection_group_by_only.sql.golden.json
    │   │   │   ├── create_table_with_qbit.sql.golden.json
    │   │   │   ├── create_table_with_sample_by.sql.golden.json
    │   │   │   ├── create_table_with_ttl_policy.sql.golden.json
    │   │   │   ├── create_table_with_tuple_fields.sql.golden.json
    │   │   │   ├── create_table_with_uuid.sql.golden.json
    │   │   │   ├── create_user.sql.golden.json
    │   │   │   ├── create_view_basic.sql.golden.json
    │   │   │   ├── create_view_on_cluster_with_uuid.sql.golden.json
    │   │   │   ├── create_view_with_comment.sql.golden.json
    │   │   │   ├── create_with_time_zone.sql.golden.json
    │   │   │   ├── desc_table_with_table_keyword.sql.golden.json
    │   │   │   ├── desc_table_without_table_keyword.sql.golden.json
    │   │   │   ├── describe_table_with_table_keyword.sql.golden.json
    │   │   │   ├── describe_table_without_table_keyword.sql.golden.json
    │   │   │   ├── drop_database.sql.golden.json
    │   │   │   ├── drop_role.sql.golden.json
    │   │   │   ├── drop_table_basic.sql.golden.json
    │   │   │   ├── drop_table_with_no_delay.sql.golden.json
    │   │   │   ├── drop_table_with_on_clsuter.sql.golden.json
    │   │   │   ├── grant_privilege.sql.golden.json
    │   │   │   ├── optimize.sql.golden.json
    │   │   │   ├── rename.sql.golden.json
    │   │   │   ├── show_create_table.sql.golden.json
    │   │   │   ├── show_databases.sql.golden.json
    │   │   │   ├── show_databases_comprehensive.sql.golden.json
    │   │   │   ├── show_databases_format.sql.golden.json
    │   │   │   ├── show_databases_format_string.sql.golden.json
    │   │   │   ├── show_databases_ilike.sql.golden.json
    │   │   │   ├── show_databases_like.sql.golden.json
    │   │   │   ├── show_databases_limit.sql.golden.json
    │   │   │   ├── show_databases_not_ilike.sql.golden.json
    │   │   │   ├── show_databases_not_like.sql.golden.json
    │   │   │   ├── show_databases_outfile.sql.golden.json
    │   │   │   ├── show_tables.sql.golden.json
    │   │   │   ├── systems.sql.golden.json
    │   │   │   ├── truncate_table_basic.sql.golden.json
    │   │   │   └── truncate_temporary_table_on_clsuter.sql.golden.json
    │   │   ├── rename.sql
    │   │   ├── show_create_table.sql
    │   │   ├── show_databases.sql
    │   │   ├── show_databases_comprehensive.sql
    │   │   ├── show_databases_format.sql
    │   │   ├── show_databases_format_string.sql
    │   │   ├── show_databases_ilike.sql
    │   │   ├── show_databases_like.sql
    │   │   ├── show_databases_limit.sql
    │   │   ├── show_databases_not_ilike.sql
    │   │   ├── show_databases_not_like.sql
    │   │   ├── show_databases_outfile.sql
    │   │   ├── show_tables.sql
    │   │   ├── systems.sql
    │   │   ├── truncate_table_basic.sql
    │   │   └── truncate_temporary_table_on_clsuter.sql
    │   ├── dml/
    │   │   ├── alter_table_modify_query.sql
    │   │   ├── alter_table_modify_ttl_multiple.sql
    │   │   ├── alter_table_with_comment.sql
    │   │   ├── alter_table_with_modify_remove_ttl.sql
    │   │   ├── alter_table_with_modify_ttl.sql
    │   │   ├── create_column_with_ttl.sql
    │   │   ├── delete_from.sql
    │   │   ├── format/
    │   │   │   ├── alter_table_modify_query.sql
    │   │   │   ├── alter_table_modify_ttl_multiple.sql
    │   │   │   ├── alter_table_with_comment.sql
    │   │   │   ├── alter_table_with_modify_remove_ttl.sql
    │   │   │   ├── alter_table_with_modify_ttl.sql
    │   │   │   ├── beautify/
    │   │   │   │   ├── alter_table_modify_query.sql
    │   │   │   │   ├── alter_table_modify_ttl_multiple.sql
    │   │   │   │   ├── alter_table_with_comment.sql
    │   │   │   │   ├── alter_table_with_modify_remove_ttl.sql
    │   │   │   │   ├── alter_table_with_modify_ttl.sql
    │   │   │   │   ├── create_column_with_ttl.sql
    │   │   │   │   ├── delete_from.sql
    │   │   │   │   ├── insert_select_without_from.sql
    │   │   │   │   ├── insert_values.sql
    │   │   │   │   ├── insert_with_format.sql
    │   │   │   │   ├── insert_with_keyword_placeholder.sql
    │   │   │   │   ├── insert_with_placeholder.sql
    │   │   │   │   └── insert_with_select.sql
    │   │   │   ├── create_column_with_ttl.sql
    │   │   │   ├── delete_from.sql
    │   │   │   ├── insert_select_without_from.sql
    │   │   │   ├── insert_values.sql
    │   │   │   ├── insert_with_format.sql
    │   │   │   ├── insert_with_keyword_placeholder.sql
    │   │   │   ├── insert_with_placeholder.sql
    │   │   │   └── insert_with_select.sql
    │   │   ├── insert_select_without_from.sql
    │   │   ├── insert_values.sql
    │   │   ├── insert_with_format.sql
    │   │   ├── insert_with_keyword_placeholder.sql
    │   │   ├── insert_with_placeholder.sql
    │   │   ├── insert_with_select.sql
    │   │   └── output/
    │   │       ├── alter_table_modify_query.sql.golden.json
    │   │       ├── alter_table_modify_ttl_multiple.sql.golden.json
    │   │       ├── alter_table_with_comment.sql.golden.json
    │   │       ├── alter_table_with_modify_remove_ttl.sql.golden.json
    │   │       ├── alter_table_with_modify_ttl.sql.golden.json
    │   │       ├── create_column_with_ttl.sql.golden.json
    │   │       ├── delete_from.sql.golden.json
    │   │       ├── insert_select_without_from.sql.golden.json
    │   │       ├── insert_values.sql.golden.json
    │   │       ├── insert_with_format.sql.golden.json
    │   │       ├── insert_with_keyword_placeholder.sql.golden.json
    │   │       ├── insert_with_placeholder.sql.golden.json
    │   │       └── insert_with_select.sql.golden.json
    │   └── query/
    │       ├── access_tuple_with_dot.sql
    │       ├── compatible/
    │       │   └── 1_stateful/
    │       │       ├── 00001_count_hits.sql
    │       │       ├── 00002_count_visits.sql
    │       │       ├── 00004_top_counters.sql
    │       │       ├── 00005_filtering.sql
    │       │       ├── 00006_agregates.sql
    │       │       ├── 00007_uniq.sql
    │       │       ├── 00008_uniq.sql
    │       │       ├── 00009_uniq_distributed.sql
    │       │       ├── 00010_quantiles_segfault.sql
    │       │       ├── 00011_sorting.sql
    │       │       ├── 00012_sorting_distributed.sql
    │       │       ├── 00013_sorting_of_nested.sql
    │       │       ├── 00014_filtering_arrays.sql
    │       │       ├── 00015_totals_and_no_aggregate_functions.sql
    │       │       ├── 00016_any_if_distributed_cond_always_false.sql
    │       │       ├── 00017_aggregation_uninitialized_memory.sql
    │       │       ├── 00020_distinct_order_by_distributed.sql
    │       │       ├── 00021_1_select_with_in.sql
    │       │       ├── 00021_2_select_with_in.sql
    │       │       ├── 00021_3_select_with_in.sql
    │       │       ├── 00022_merge_prewhere.sql
    │       │       ├── 00023_totals_limit.sql
    │       │       ├── 00024_random_counters.sql
    │       │       ├── 00030_array_enumerate_uniq.sql
    │       │       ├── 00031_array_enumerate_uniq.sql
    │       │       ├── 00032_aggregate_key64.sql
    │       │       ├── 00033_aggregate_key_string.sql
    │       │       ├── 00034_aggregate_key_fixed_string.sql
    │       │       ├── 00035_aggregate_keys128.sql
    │       │       ├── 00036_aggregate_hashed.sql
    │       │       ├── 00037_uniq_state_merge1.sql
    │       │       ├── 00038_uniq_state_merge2.sql
    │       │       ├── 00039_primary_key.sql
    │       │       ├── 00040_aggregating_materialized_view.sql
    │       │       ├── 00041_aggregating_materialized_view.sql
    │       │       ├── 00042_any_left_join.sql
    │       │       ├── 00043_any_left_join.sql
    │       │       ├── 00044_any_left_join_string.sql
    │       │       ├── 00045_uniq_upto.sql
    │       │       ├── 00046_uniq_upto_distributed.sql
    │       │       ├── 00047_bar.sql
    │       │       ├── 00048_min_max.sql
    │       │       ├── 00049_max_string_if.sql
    │       │       ├── 00050_min_max.sql
    │       │       ├── 00051_min_max_array.sql
    │       │       ├── 00052_group_by_in.sql
    │       │       ├── 00053_replicate_segfault.sql
    │       │       ├── 00054_merge_tree_partitions.sql
    │       │       ├── 00055_index_and_not.sql
    │       │       ├── 00056_view.sql
    │       │       ├── 00059_merge_sorting_empty_array_joined.sql
    │       │       ├── 00060_move_to_prewhere_and_sets.sql
    │       │       ├── 00061_storage_buffer.sql
    │       │       ├── 00062_loyalty.sql
    │       │       ├── 00063_loyalty_joins.sql
    │       │       ├── 00065_loyalty_with_storage_join.sql
    │       │       ├── 00066_sorting_distributed_many_replicas.sql
    │       │       ├── 00067_union_all.sql
    │       │       ├── 00068_subquery_in_prewhere.sql
    │       │       ├── 00069_duplicate_aggregation_keys.sql
    │       │       ├── 00071_merge_tree_optimize_aio.sql
    │       │       ├── 00072_compare_date_and_string_index.sql
    │       │       ├── 00073_uniq_array.sql
    │       │       ├── 00074_full_join.sql
    │       │       ├── 00075_left_array_join.sql
    │       │       ├── 00076_system_columns_bytes.sql
    │       │       ├── 00077_log_tinylog_stripelog.sql
    │       │       ├── 00078_group_by_arrays.sql
    │       │       ├── 00079_array_join_not_used_joined_column.sql
    │       │       ├── 00080_array_join_and_union.sql
    │       │       ├── 00081_group_by_without_key_and_totals.sql
    │       │       ├── 00082_quantiles.sql
    │       │       ├── 00083_array_filter.sql
    │       │       ├── 00084_external_aggregation.sql
    │       │       ├── 00085_monotonic_evaluation_segfault.sql
    │       │       ├── 00086_array_reduce.sql
    │       │       ├── 00087_where_0.sql
    │       │       ├── 00088_global_in_one_shard_and_rows_before_limit.sql
    │       │       ├── 00089_position_functions_with_non_constant_arg.sql
    │       │       ├── 00091_prewhere_two_conditions.sql
    │       │       ├── 00093_prewhere_array_join.sql
    │       │       ├── 00094_order_by_array_join_limit.sql
    │       │       ├── 00095_hyperscan_profiler.sql
    │       │       ├── 00097_constexpr_in_index.sql
    │       │       ├── 00139_like.sql
    │       │       ├── 00140_rename.sql
    │       │       ├── 00141_transform.sql
    │       │       ├── 00142_system_columns.sql
    │       │       ├── 00143_transform_non_const_default.sql
    │       │       ├── 00144_functions_of_aggregation_states.sql
    │       │       ├── 00145_aggregate_functions_statistics.sql
    │       │       ├── 00146_aggregate_function_uniq.sql
    │       │       ├── 00147_global_in_aggregate_function.sql
    │       │       ├── 00148_monotonic_functions_and_index.sql
    │       │       ├── 00149_quantiles_timing_distributed.sql
    │       │       ├── 00150_quantiles_timing_precision.sql
    │       │       ├── 00151_order_by_read_in_order.sql
    │       │       ├── 00152_insert_different_granularity.sql
    │       │       ├── 00153_aggregate_arena_race.sql
    │       │       ├── 00154_avro.sql
    │       │       ├── 00156_max_execution_speed_sample_merge.sql
    │       │       ├── 00157_cache_dictionary.sql
    │       │       ├── 00158_cache_dictionary_has.sql
    │       │       ├── 00160_decode_xml_component.sql
    │       │       ├── 00162_mmap_compression_none.sql
    │       │       ├── 00164_quantileBfloat16.sql
    │       │       ├── 00165_jit_aggregate_functions.sql
    │       │       ├── 00166_explain_estimate.sql
    │       │       ├── 00167_read_bytes_from_fs.sql
    │       │       ├── 00169_contingency.sql
    │       │       ├── 00170_s3_cache.sql
    │       │       ├── 00171_grouping_aggregated_transform_bug.sql
    │       │       ├── 00172_early_constant_folding.sql
    │       │       ├── 00173_group_by_use_nulls.sql
    │       │       ├── 00174_distinct_in_order.sql
    │       │       ├── 00175_counting_resources_in_subqueries.sql
    │       │       ├── 00176_distinct_limit_by_limit_bug_43377.sql
    │       │       └── 00177_select_from_gcs.sql
    │       ├── create_window_view.sql
    │       ├── format/
    │       │   ├── access_tuple_with_dot.sql
    │       │   ├── beautify/
    │       │   │   ├── access_tuple_with_dot.sql
    │       │   │   ├── create_window_view.sql
    │       │   │   ├── query_with_expr_compare.sql
    │       │   │   ├── select_case_multiple_when.sql
    │       │   │   ├── select_case_when_exists.sql
    │       │   │   ├── select_cast.sql
    │       │   │   ├── select_column_alias_string.sql
    │       │   │   ├── select_concat_expr.sql
    │       │   │   ├── select_expr.sql
    │       │   │   ├── select_extract_with_regex.sql
    │       │   │   ├── select_item_with_modifiers.sql
    │       │   │   ├── select_json_type.sql
    │       │   │   ├── select_keyword_alias_no_as.sql
    │       │   │   ├── select_order_by_timestamp.sql
    │       │   │   ├── select_order_by_with_fill_basic.sql
    │       │   │   ├── select_order_by_with_fill_from_to.sql
    │       │   │   ├── select_order_by_with_fill_interpolate.sql
    │       │   │   ├── select_order_by_with_fill_interpolate_no_columns.sql
    │       │   │   ├── select_order_by_with_fill_staleness.sql
    │       │   │   ├── select_order_by_with_fill_step.sql
    │       │   │   ├── select_simple.sql
    │       │   │   ├── select_simple_field_alias.sql
    │       │   │   ├── select_simple_with_bracket.sql
    │       │   │   ├── select_simple_with_cte_with_column_aliases.sql
    │       │   │   ├── select_simple_with_group_by_with_cube_totals.sql
    │       │   │   ├── select_simple_with_is_not_null.sql
    │       │   │   ├── select_simple_with_is_null.sql
    │       │   │   ├── select_simple_with_limit.sql
    │       │   │   ├── select_simple_with_top_clause.sql
    │       │   │   ├── select_simple_with_with_clause.sql
    │       │   │   ├── select_table_alias_without_keyword.sql
    │       │   │   ├── select_table_function_with_query.sql
    │       │   │   ├── select_when_condition.sql
    │       │   │   ├── select_window_comprehensive.sql
    │       │   │   ├── select_window_cte.sql
    │       │   │   ├── select_window_keyword_name_in_parens.sql
    │       │   │   ├── select_window_named_in_parens.sql
    │       │   │   ├── select_window_named_reference_extensions.sql
    │       │   │   ├── select_window_params.sql
    │       │   │   ├── select_with_distinct.sql
    │       │   │   ├── select_with_distinct_keyword.sql
    │       │   │   ├── select_with_distinct_on_dotted_columns.sql
    │       │   │   ├── select_with_distinct_on_keyword.sql
    │       │   │   ├── select_with_group_by.sql
    │       │   │   ├── select_with_join_only.sql
    │       │   │   ├── select_with_keyword_in_group_by.sql
    │       │   │   ├── select_with_keyword_placeholder.sql
    │       │   │   ├── select_with_left_join.sql
    │       │   │   ├── select_with_literal_table_name.sql
    │       │   │   ├── select_with_multi_array_and_inner_join.sql
    │       │   │   ├── select_with_multi_array_join.sql
    │       │   │   ├── select_with_multi_except.sql
    │       │   │   ├── select_with_multi_join.sql
    │       │   │   ├── select_with_multi_line_comment.sql
    │       │   │   ├── select_with_multi_union.sql
    │       │   │   ├── select_with_multi_union_distinct.sql
    │       │   │   ├── select_with_number_field.sql
    │       │   │   ├── select_with_placeholder.sql
    │       │   │   ├── select_with_query_parameter.sql
    │       │   │   ├── select_with_settings_additional_table_filters.sql
    │       │   │   ├── select_with_single_quote_table.sql
    │       │   │   ├── select_with_string_expr.sql
    │       │   │   ├── select_with_union_distinct.sql
    │       │   │   ├── select_with_variable.sql
    │       │   │   ├── select_with_window_function.sql
    │       │   │   ├── select_without_from_where.sql
    │       │   │   └── set_simple.sql
    │       │   ├── create_window_view.sql
    │       │   ├── query_with_expr_compare.sql
    │       │   ├── select_case_multiple_when.sql
    │       │   ├── select_case_when_exists.sql
    │       │   ├── select_cast.sql
    │       │   ├── select_column_alias_string.sql
    │       │   ├── select_concat_expr.sql
    │       │   ├── select_expr.sql
    │       │   ├── select_extract_with_regex.sql
    │       │   ├── select_item_with_modifiers.sql
    │       │   ├── select_json_type.sql
    │       │   ├── select_keyword_alias_no_as.sql
    │       │   ├── select_order_by_timestamp.sql
    │       │   ├── select_order_by_with_fill_basic.sql
    │       │   ├── select_order_by_with_fill_from_to.sql
    │       │   ├── select_order_by_with_fill_interpolate.sql
    │       │   ├── select_order_by_with_fill_interpolate_no_columns.sql
    │       │   ├── select_order_by_with_fill_staleness.sql
    │       │   ├── select_order_by_with_fill_step.sql
    │       │   ├── select_simple.sql
    │       │   ├── select_simple_field_alias.sql
    │       │   ├── select_simple_with_bracket.sql
    │       │   ├── select_simple_with_cte_with_column_aliases.sql
    │       │   ├── select_simple_with_group_by_with_cube_totals.sql
    │       │   ├── select_simple_with_is_not_null.sql
    │       │   ├── select_simple_with_is_null.sql
    │       │   ├── select_simple_with_limit.sql
    │       │   ├── select_simple_with_top_clause.sql
    │       │   ├── select_simple_with_with_clause.sql
    │       │   ├── select_table_alias_without_keyword.sql
    │       │   ├── select_table_function_with_query.sql
    │       │   ├── select_when_condition.sql
    │       │   ├── select_window_comprehensive.sql
    │       │   ├── select_window_cte.sql
    │       │   ├── select_window_keyword_name_in_parens.sql
    │       │   ├── select_window_named_in_parens.sql
    │       │   ├── select_window_named_reference_extensions.sql
    │       │   ├── select_window_params.sql
    │       │   ├── select_with_distinct.sql
    │       │   ├── select_with_distinct_keyword.sql
    │       │   ├── select_with_distinct_on_dotted_columns.sql
    │       │   ├── select_with_distinct_on_keyword.sql
    │       │   ├── select_with_group_by.sql
    │       │   ├── select_with_join_only.sql
    │       │   ├── select_with_keyword_in_group_by.sql
    │       │   ├── select_with_keyword_placeholder.sql
    │       │   ├── select_with_left_join.sql
    │       │   ├── select_with_literal_table_name.sql
    │       │   ├── select_with_multi_array_and_inner_join.sql
    │       │   ├── select_with_multi_array_join.sql
    │       │   ├── select_with_multi_except.sql
    │       │   ├── select_with_multi_join.sql
    │       │   ├── select_with_multi_line_comment.sql
    │       │   ├── select_with_multi_union.sql
    │       │   ├── select_with_multi_union_distinct.sql
    │       │   ├── select_with_number_field.sql
    │       │   ├── select_with_placeholder.sql
    │       │   ├── select_with_query_parameter.sql
    │       │   ├── select_with_settings_additional_table_filters.sql
    │       │   ├── select_with_single_quote_table.sql
    │       │   ├── select_with_string_expr.sql
    │       │   ├── select_with_union_distinct.sql
    │       │   ├── select_with_variable.sql
    │       │   ├── select_with_window_function.sql
    │       │   ├── select_without_from_where.sql
    │       │   └── set_simple.sql
    │       ├── output/
    │       │   ├── access_tuple_with_dot.sql.golden.json
    │       │   ├── create_window_view.sql.golden.json
    │       │   ├── query_with_expr_compare.sql.golden.json
    │       │   ├── select_case_multiple_when.sql.golden.json
    │       │   ├── select_case_when_exists.sql.golden.json
    │       │   ├── select_cast.sql.golden.json
    │       │   ├── select_column_alias_string.sql.golden.json
    │       │   ├── select_concat_expr.sql.golden.json
    │       │   ├── select_expr.sql.golden.json
    │       │   ├── select_extract_with_regex.sql.golden.json
    │       │   ├── select_item_with_modifiers.sql.golden.json
    │       │   ├── select_json_type.sql.golden.json
    │       │   ├── select_keyword_alias_no_as.sql.golden.json
    │       │   ├── select_order_by_timestamp.sql.golden.json
    │       │   ├── select_order_by_with_fill_basic.sql.golden.json
    │       │   ├── select_order_by_with_fill_from_to.sql.golden.json
    │       │   ├── select_order_by_with_fill_interpolate.sql.golden.json
    │       │   ├── select_order_by_with_fill_interpolate_no_columns.sql.golden.json
    │       │   ├── select_order_by_with_fill_staleness.sql.golden.json
    │       │   ├── select_order_by_with_fill_step.sql.golden.json
    │       │   ├── select_simple.sql.golden.json
    │       │   ├── select_simple_field_alias.sql.golden.json
    │       │   ├── select_simple_with_bracket.sql.golden.json
    │       │   ├── select_simple_with_cte_with_column_aliases.sql.golden.json
    │       │   ├── select_simple_with_group_by_with_cube_totals.sql.golden.json
    │       │   ├── select_simple_with_is_not_null.sql.golden.json
    │       │   ├── select_simple_with_is_null.sql.golden.json
    │       │   ├── select_simple_with_limit.sql.golden.json
    │       │   ├── select_simple_with_top_clause.sql.golden.json
    │       │   ├── select_simple_with_with_clause.sql.golden.json
    │       │   ├── select_table_alias_without_keyword.sql.golden.json
    │       │   ├── select_table_function_with_query.sql.golden.json
    │       │   ├── select_when_condition.sql.golden.json
    │       │   ├── select_window_comprehensive.sql.golden.json
    │       │   ├── select_window_cte.sql.golden.json
    │       │   ├── select_window_keyword_name_in_parens.sql.golden.json
    │       │   ├── select_window_named_in_parens.sql.golden.json
    │       │   ├── select_window_named_reference_extensions.sql.golden.json
    │       │   ├── select_window_params.sql.golden.json
    │       │   ├── select_with_distinct.sql.golden.json
    │       │   ├── select_with_distinct_keyword.sql.golden.json
    │       │   ├── select_with_distinct_on_dotted_columns.sql.golden.json
    │       │   ├── select_with_distinct_on_keyword.sql.golden.json
    │       │   ├── select_with_group_by.sql.golden.json
    │       │   ├── select_with_join_only.sql.golden.json
    │       │   ├── select_with_keyword_in_group_by.sql.golden.json
    │       │   ├── select_with_keyword_placeholder.sql.golden.json
    │       │   ├── select_with_left_join.sql.golden.json
    │       │   ├── select_with_literal_table_name.sql.golden.json
    │       │   ├── select_with_multi_array_and_inner_join.sql.golden.json
    │       │   ├── select_with_multi_array_join.sql.golden.json
    │       │   ├── select_with_multi_except.sql.golden.json
    │       │   ├── select_with_multi_join.sql.golden.json
    │       │   ├── select_with_multi_line_comment.sql.golden.json
    │       │   ├── select_with_multi_union.sql.golden.json
    │       │   ├── select_with_multi_union_distinct.sql.golden.json
    │       │   ├── select_with_number_field.sql.golden.json
    │       │   ├── select_with_placeholder.sql.golden.json
    │       │   ├── select_with_query_parameter.sql.golden.json
    │       │   ├── select_with_settings_additional_table_filters.sql.golden.json
    │       │   ├── select_with_single_quote_table.sql.golden.json
    │       │   ├── select_with_string_expr.sql.golden.json
    │       │   ├── select_with_union_distinct.sql.golden.json
    │       │   ├── select_with_variable.sql.golden.json
    │       │   ├── select_with_window_function.sql.golden.json
    │       │   ├── select_without_from_where.sql.golden.json
    │       │   └── set_simple.sql.golden.json
    │       ├── query_with_expr_compare.sql
    │       ├── select_case_multiple_when.sql
    │       ├── select_case_when_exists.sql
    │       ├── select_cast.sql
    │       ├── select_column_alias_string.sql
    │       ├── select_concat_expr.sql
    │       ├── select_expr.sql
    │       ├── select_extract_with_regex.sql
    │       ├── select_item_with_modifiers.sql
    │       ├── select_json_type.sql
    │       ├── select_keyword_alias_no_as.sql
    │       ├── select_order_by_timestamp.sql
    │       ├── select_order_by_with_fill_basic.sql
    │       ├── select_order_by_with_fill_from_to.sql
    │       ├── select_order_by_with_fill_interpolate.sql
    │       ├── select_order_by_with_fill_interpolate_no_columns.sql
    │       ├── select_order_by_with_fill_staleness.sql
    │       ├── select_order_by_with_fill_step.sql
    │       ├── select_simple.sql
    │       ├── select_simple_field_alias.sql
    │       ├── select_simple_with_bracket.sql
    │       ├── select_simple_with_cte_with_column_aliases.sql
    │       ├── select_simple_with_group_by_with_cube_totals.sql
    │       ├── select_simple_with_is_not_null.sql
    │       ├── select_simple_with_is_null.sql
    │       ├── select_simple_with_limit.sql
    │       ├── select_simple_with_top_clause.sql
    │       ├── select_simple_with_with_clause.sql
    │       ├── select_table_alias_without_keyword.sql
    │       ├── select_table_function_with_query.sql
    │       ├── select_when_condition.sql
    │       ├── select_window_comprehensive.sql
    │       ├── select_window_cte.sql
    │       ├── select_window_keyword_name_in_parens.sql
    │       ├── select_window_named_in_parens.sql
    │       ├── select_window_named_reference_extensions.sql
    │       ├── select_window_params.sql
    │       ├── select_with_distinct.sql
    │       ├── select_with_distinct_keyword.sql
    │       ├── select_with_distinct_on_dotted_columns.sql
    │       ├── select_with_distinct_on_keyword.sql
    │       ├── select_with_group_by.sql
    │       ├── select_with_join_only.sql
    │       ├── select_with_keyword_in_group_by.sql
    │       ├── select_with_keyword_placeholder.sql
    │       ├── select_with_left_join.sql
    │       ├── select_with_literal_table_name.sql
    │       ├── select_with_multi_array_and_inner_join.sql
    │       ├── select_with_multi_array_join.sql
    │       ├── select_with_multi_except.sql
    │       ├── select_with_multi_join.sql
    │       ├── select_with_multi_line_comment.sql
    │       ├── select_with_multi_union.sql
    │       ├── select_with_multi_union_distinct.sql
    │       ├── select_with_number_field.sql
    │       ├── select_with_placeholder.sql
    │       ├── select_with_query_parameter.sql
    │       ├── select_with_settings_additional_table_filters.sql
    │       ├── select_with_single_quote_table.sql
    │       ├── select_with_string_expr.sql
    │       ├── select_with_union_distinct.sql
    │       ├── select_with_variable.sql
    │       ├── select_with_window_function.sql
    │       ├── select_without_from_where.sql
    │       └── set_simple.sql
    ├── type.go
    ├── visitor_test.go
    ├── walk.go
    └── walk_test.go
Download .txt
SYMBOL INDEX (2101 symbols across 125 files)

FILE: main.go
  constant VERSION (line 13) | VERSION = "0.4.17"
  constant help (line 14) | help = `
  function init (line 26) | func init() {
  function main (line 34) | func main() {

FILE: parser/ast.go
  type OrderDirection (line 3) | type OrderDirection
  constant OrderDirectionNone (line 6) | OrderDirectionNone OrderDirection = ""
  constant OrderDirectionAsc (line 7) | OrderDirectionAsc  OrderDirection = "ASC"
  constant OrderDirectionDesc (line 8) | OrderDirectionDesc OrderDirection = "DESC"
  type Expr (line 11) | type Expr interface
  type DDL (line 18) | type DDL interface
  type SelectItem (line 23) | type SelectItem struct
    method Pos (line 30) | func (s *SelectItem) Pos() Pos {
    method End (line 34) | func (s *SelectItem) End() Pos {
    method Accept (line 44) | func (s *SelectItem) Accept(visitor ASTVisitor) error {
  type OperationExpr (line 63) | type OperationExpr struct
    method Pos (line 68) | func (o *OperationExpr) Pos() Pos {
    method End (line 72) | func (o *OperationExpr) End() Pos {
    method Accept (line 76) | func (o *OperationExpr) Accept(visitor ASTVisitor) error {
  type TernaryOperation (line 82) | type TernaryOperation struct
    method Pos (line 88) | func (t *TernaryOperation) Pos() Pos {
    method End (line 92) | func (t *TernaryOperation) End() Pos {
    method Accept (line 96) | func (t *TernaryOperation) Accept(visitor ASTVisitor) error {
  type BinaryOperation (line 111) | type BinaryOperation struct
    method Pos (line 119) | func (p *BinaryOperation) Pos() Pos {
    method End (line 123) | func (p *BinaryOperation) End() Pos {
    method Accept (line 127) | func (p *BinaryOperation) Accept(visitor ASTVisitor) error {
  type IndexOperation (line 139) | type IndexOperation struct
    method Accept (line 145) | func (i *IndexOperation) Accept(visitor ASTVisitor) error {
    method Pos (line 157) | func (i *IndexOperation) Pos() Pos {
    method End (line 161) | func (i *IndexOperation) End() Pos {
  type JoinTableExpr (line 165) | type JoinTableExpr struct
    method Accept (line 172) | func (j *JoinTableExpr) Accept(visitor ASTVisitor) error {
    method Pos (line 184) | func (j *JoinTableExpr) Pos() Pos {
    method End (line 188) | func (j *JoinTableExpr) End() Pos {
  type AlterTableClause (line 192) | type AlterTableClause interface
  type AlterTable (line 197) | type AlterTable struct
    method Pos (line 205) | func (a *AlterTable) Pos() Pos {
    method End (line 209) | func (a *AlterTable) End() Pos {
    method Type (line 213) | func (a *AlterTable) Type() string {
    method Accept (line 217) | func (a *AlterTable) Accept(visitor ASTVisitor) error {
  type AlterTableAttachPartition (line 237) | type AlterTableAttachPartition struct
    method Pos (line 244) | func (a *AlterTableAttachPartition) Pos() Pos {
    method End (line 248) | func (a *AlterTableAttachPartition) End() Pos {
    method AlterType (line 255) | func (a *AlterTableAttachPartition) AlterType() string {
    method Accept (line 259) | func (a *AlterTableAttachPartition) Accept(visitor ASTVisitor) error {
  type AlterTableDetachPartition (line 273) | type AlterTableDetachPartition struct
    method Pos (line 279) | func (a *AlterTableDetachPartition) Pos() Pos {
    method End (line 283) | func (a *AlterTableDetachPartition) End() Pos {
    method AlterType (line 287) | func (a *AlterTableDetachPartition) AlterType() string {
    method Accept (line 291) | func (a *AlterTableDetachPartition) Accept(visitor ASTVisitor) error {
  type AlterTableDropPartition (line 305) | type AlterTableDropPartition struct
    method Pos (line 312) | func (a *AlterTableDropPartition) Pos() Pos {
    method End (line 316) | func (a *AlterTableDropPartition) End() Pos {
    method AlterType (line 323) | func (a *AlterTableDropPartition) AlterType() string {
    method Accept (line 327) | func (a *AlterTableDropPartition) Accept(visitor ASTVisitor) error {
  type AlterTableMaterializeProjection (line 336) | type AlterTableMaterializeProjection struct
    method Pos (line 344) | func (a *AlterTableMaterializeProjection) Pos() Pos {
    method End (line 348) | func (a *AlterTableMaterializeProjection) End() Pos {
    method AlterType (line 352) | func (a *AlterTableMaterializeProjection) AlterType() string {
    method Accept (line 356) | func (a *AlterTableMaterializeProjection) Accept(visitor ASTVisitor) e...
  type AlterTableMaterializeIndex (line 370) | type AlterTableMaterializeIndex struct
    method Pos (line 378) | func (a *AlterTableMaterializeIndex) Pos() Pos {
    method End (line 382) | func (a *AlterTableMaterializeIndex) End() Pos {
    method AlterType (line 386) | func (a *AlterTableMaterializeIndex) AlterType() string {
    method Accept (line 390) | func (a *AlterTableMaterializeIndex) Accept(visitor ASTVisitor) error {
  type AlterTableFreezePartition (line 404) | type AlterTableFreezePartition struct
    method Pos (line 410) | func (a *AlterTableFreezePartition) Pos() Pos {
    method End (line 414) | func (a *AlterTableFreezePartition) End() Pos {
    method AlterType (line 418) | func (a *AlterTableFreezePartition) AlterType() string {
    method Accept (line 422) | func (a *AlterTableFreezePartition) Accept(visitor ASTVisitor) error {
  type AlterTableAddColumn (line 433) | type AlterTableAddColumn struct
    method Pos (line 443) | func (a *AlterTableAddColumn) Pos() Pos {
    method End (line 447) | func (a *AlterTableAddColumn) End() Pos {
    method AlterType (line 454) | func (a *AlterTableAddColumn) AlterType() string {
    method Accept (line 458) | func (a *AlterTableAddColumn) Accept(visitor ASTVisitor) error {
  type AlterTableAddIndex (line 477) | type AlterTableAddIndex struct
    method Pos (line 486) | func (a *AlterTableAddIndex) Pos() Pos {
    method End (line 490) | func (a *AlterTableAddIndex) End() Pos {
    method AlterType (line 494) | func (a *AlterTableAddIndex) AlterType() string {
    method Accept (line 498) | func (a *AlterTableAddIndex) Accept(visitor ASTVisitor) error {
  type ProjectionOrderByClause (line 512) | type ProjectionOrderByClause struct
    method Pos (line 517) | func (p *ProjectionOrderByClause) Pos() Pos {
    method End (line 521) | func (p *ProjectionOrderByClause) End() Pos {
    method Accept (line 525) | func (p *ProjectionOrderByClause) Accept(visitor ASTVisitor) error {
  type ProjectionSelectStmt (line 531) | type ProjectionSelectStmt struct
    method Pos (line 540) | func (p *ProjectionSelectStmt) Pos() Pos {
    method End (line 545) | func (p *ProjectionSelectStmt) End() Pos {
    method Accept (line 549) | func (p *ProjectionSelectStmt) Accept(visitor ASTVisitor) error {
  type TableProjection (line 573) | type TableProjection struct
    method Pos (line 580) | func (t *TableProjection) Pos() Pos {
    method End (line 584) | func (t *TableProjection) End() Pos {
    method Accept (line 588) | func (t *TableProjection) Accept(visitor ASTVisitor) error {
  type AlterTableAddProjection (line 600) | type AlterTableAddProjection struct
    method Pos (line 609) | func (a *AlterTableAddProjection) Pos() Pos {
    method End (line 613) | func (a *AlterTableAddProjection) End() Pos {
    method AlterType (line 617) | func (a *AlterTableAddProjection) AlterType() string {
    method Accept (line 621) | func (a *AlterTableAddProjection) Accept(visitor ASTVisitor) error {
  type AlterTableDropColumn (line 635) | type AlterTableDropColumn struct
    method Pos (line 641) | func (a *AlterTableDropColumn) Pos() Pos {
    method End (line 645) | func (a *AlterTableDropColumn) End() Pos {
    method AlterType (line 649) | func (a *AlterTableDropColumn) AlterType() string {
    method Accept (line 653) | func (a *AlterTableDropColumn) Accept(visitor ASTVisitor) error {
  type AlterTableDropIndex (line 662) | type AlterTableDropIndex struct
    method Pos (line 668) | func (a *AlterTableDropIndex) Pos() Pos {
    method End (line 672) | func (a *AlterTableDropIndex) End() Pos {
    method AlterType (line 676) | func (a *AlterTableDropIndex) AlterType() string {
    method Accept (line 680) | func (a *AlterTableDropIndex) Accept(visitor ASTVisitor) error {
  type AlterTableDropProjection (line 689) | type AlterTableDropProjection struct
    method Pos (line 695) | func (a *AlterTableDropProjection) Pos() Pos {
    method End (line 699) | func (a *AlterTableDropProjection) End() Pos {
    method AlterType (line 703) | func (a *AlterTableDropProjection) AlterType() string {
    method Accept (line 707) | func (a *AlterTableDropProjection) Accept(visitor ASTVisitor) error {
  type AlterTableRemoveTTL (line 716) | type AlterTableRemoveTTL struct
    method Pos (line 721) | func (a *AlterTableRemoveTTL) Pos() Pos {
    method End (line 725) | func (a *AlterTableRemoveTTL) End() Pos {
    method AlterType (line 729) | func (a *AlterTableRemoveTTL) AlterType() string {
    method Accept (line 733) | func (a *AlterTableRemoveTTL) Accept(visitor ASTVisitor) error {
  type AlterTableClearColumn (line 739) | type AlterTableClearColumn struct
    method Pos (line 748) | func (a *AlterTableClearColumn) Pos() Pos {
    method End (line 752) | func (a *AlterTableClearColumn) End() Pos {
    method AlterType (line 756) | func (a *AlterTableClearColumn) AlterType() string {
    method Accept (line 760) | func (a *AlterTableClearColumn) Accept(visitor ASTVisitor) error {
  type AlterTableClearIndex (line 774) | type AlterTableClearIndex struct
    method Pos (line 783) | func (a *AlterTableClearIndex) Pos() Pos {
    method End (line 787) | func (a *AlterTableClearIndex) End() Pos {
    method AlterType (line 791) | func (a *AlterTableClearIndex) AlterType() string {
    method Accept (line 795) | func (a *AlterTableClearIndex) Accept(visitor ASTVisitor) error {
  type AlterTableClearProjection (line 809) | type AlterTableClearProjection struct
    method Pos (line 818) | func (a *AlterTableClearProjection) Pos() Pos {
    method End (line 822) | func (a *AlterTableClearProjection) End() Pos {
    method AlterType (line 826) | func (a *AlterTableClearProjection) AlterType() string {
    method Accept (line 830) | func (a *AlterTableClearProjection) Accept(visitor ASTVisitor) error {
  type AlterTableRenameColumn (line 844) | type AlterTableRenameColumn struct
    method Pos (line 852) | func (a *AlterTableRenameColumn) Pos() Pos {
    method End (line 856) | func (a *AlterTableRenameColumn) End() Pos {
    method AlterType (line 860) | func (a *AlterTableRenameColumn) AlterType() string {
    method Accept (line 864) | func (a *AlterTableRenameColumn) Accept(visitor ASTVisitor) error {
  type AlterTableModifyQuery (line 876) | type AlterTableModifyQuery struct
    method Pos (line 882) | func (a *AlterTableModifyQuery) Pos() Pos {
    method End (line 886) | func (a *AlterTableModifyQuery) End() Pos {
    method AlterType (line 890) | func (a *AlterTableModifyQuery) AlterType() string {
    method Accept (line 894) | func (a *AlterTableModifyQuery) Accept(visitor ASTVisitor) error {
  type AlterTableModifyTTL (line 903) | type AlterTableModifyTTL struct
    method Pos (line 909) | func (a *AlterTableModifyTTL) Pos() Pos {
    method End (line 913) | func (a *AlterTableModifyTTL) End() Pos {
    method AlterType (line 917) | func (a *AlterTableModifyTTL) AlterType() string {
    method Accept (line 921) | func (a *AlterTableModifyTTL) Accept(visitor ASTVisitor) error {
  type AlterTableModifyColumn (line 930) | type AlterTableModifyColumn struct
    method Pos (line 939) | func (a *AlterTableModifyColumn) Pos() Pos {
    method End (line 943) | func (a *AlterTableModifyColumn) End() Pos {
    method AlterType (line 947) | func (a *AlterTableModifyColumn) AlterType() string {
    method Accept (line 951) | func (a *AlterTableModifyColumn) Accept(visitor ASTVisitor) error {
  type AlterTableModifySetting (line 965) | type AlterTableModifySetting struct
    method Pos (line 971) | func (a *AlterTableModifySetting) Pos() Pos {
    method End (line 975) | func (a *AlterTableModifySetting) End() Pos {
    method AlterType (line 979) | func (a *AlterTableModifySetting) AlterType() string {
    method Accept (line 983) | func (a *AlterTableModifySetting) Accept(visitor ASTVisitor) error {
  type AlterTableResetSetting (line 994) | type AlterTableResetSetting struct
    method Pos (line 1000) | func (a *AlterTableResetSetting) Pos() Pos {
    method End (line 1004) | func (a *AlterTableResetSetting) End() Pos {
    method AlterType (line 1008) | func (a *AlterTableResetSetting) AlterType() string {
    method Accept (line 1012) | func (a *AlterTableResetSetting) Accept(visitor ASTVisitor) error {
  type AlterTableReplacePartition (line 1023) | type AlterTableReplacePartition struct
    method Pos (line 1029) | func (a *AlterTableReplacePartition) Pos() Pos {
    method End (line 1033) | func (a *AlterTableReplacePartition) End() Pos {
    method AlterType (line 1037) | func (a *AlterTableReplacePartition) AlterType() string {
    method Accept (line 1041) | func (a *AlterTableReplacePartition) Accept(visitor ASTVisitor) error {
  type AlterTableDelete (line 1053) | type AlterTableDelete struct
    method Pos (line 1059) | func (a *AlterTableDelete) Pos() Pos {
    method End (line 1063) | func (a *AlterTableDelete) End() Pos {
    method AlterType (line 1067) | func (a *AlterTableDelete) AlterType() string {
    method Accept (line 1071) | func (a *AlterTableDelete) Accept(visitor ASTVisitor) error {
  type AlterTableUpdate (line 1080) | type AlterTableUpdate struct
    method Pos (line 1088) | func (a *AlterTableUpdate) Pos() Pos {
    method End (line 1092) | func (a *AlterTableUpdate) End() Pos {
    method AlterType (line 1096) | func (a *AlterTableUpdate) AlterType() string {
    method Accept (line 1100) | func (a *AlterTableUpdate) Accept(visitor ASTVisitor) error {
  type UpdateAssignment (line 1119) | type UpdateAssignment struct
    method Pos (line 1125) | func (u *UpdateAssignment) Pos() Pos {
    method End (line 1129) | func (u *UpdateAssignment) End() Pos {
    method Accept (line 1133) | func (u *UpdateAssignment) Accept(visitor ASTVisitor) error {
  type RemovePropertyType (line 1145) | type RemovePropertyType struct
    method Pos (line 1151) | func (a *RemovePropertyType) Pos() Pos {
    method End (line 1155) | func (a *RemovePropertyType) End() Pos {
    method Accept (line 1159) | func (a *RemovePropertyType) Accept(visitor ASTVisitor) error {
  type TableIndex (line 1168) | type TableIndex struct
    method Pos (line 1177) | func (a *TableIndex) Pos() Pos {
    method End (line 1181) | func (a *TableIndex) End() Pos {
    method Accept (line 1185) | func (a *TableIndex) Accept(visitor ASTVisitor) error {
  type Ident (line 1203) | type Ident struct
    method Pos (line 1210) | func (i *Ident) Pos() Pos {
    method End (line 1214) | func (i *Ident) End() Pos {
    method Accept (line 1218) | func (i *Ident) Accept(visitor ASTVisitor) error {
  type UUID (line 1224) | type UUID struct
    method Pos (line 1228) | func (u *UUID) Pos() Pos {
    method End (line 1232) | func (u *UUID) End() Pos {
    method Accept (line 1236) | func (u *UUID) Accept(visitor ASTVisitor) error {
  type CreateDatabase (line 1242) | type CreateDatabase struct
    method Pos (line 1252) | func (c *CreateDatabase) Pos() Pos {
    method End (line 1256) | func (c *CreateDatabase) End() Pos {
    method Type (line 1260) | func (c *CreateDatabase) Type() string {
    method Accept (line 1264) | func (c *CreateDatabase) Accept(visitor ASTVisitor) error {
  type CreateTable (line 1280) | type CreateTable struct
    method Pos (line 1296) | func (c *CreateTable) Pos() Pos {
    method End (line 1300) | func (c *CreateTable) End() Pos {
    method Type (line 1304) | func (c *CreateTable) Type() string {
    method Accept (line 1308) | func (c *CreateTable) Accept(visitor ASTVisitor) error {
  type CreateMaterializedView (line 1347) | type CreateMaterializedView struct
    method Pos (line 1368) | func (c *CreateMaterializedView) Pos() Pos {
    method End (line 1372) | func (c *CreateMaterializedView) End() Pos {
    method Type (line 1376) | func (c *CreateMaterializedView) Type() string {
    method Accept (line 1380) | func (c *CreateMaterializedView) Accept(visitor ASTVisitor) error {
  type CreateView (line 1446) | type CreateView struct
    method Pos (line 1459) | func (c *CreateView) Pos() Pos {
    method End (line 1463) | func (c *CreateView) End() Pos {
    method Type (line 1467) | func (c *CreateView) Type() string {
    method Accept (line 1471) | func (c *CreateView) Accept(visitor ASTVisitor) error {
  type CreateFunction (line 1505) | type CreateFunction struct
    method Type (line 1515) | func (c *CreateFunction) Type() string {
    method Pos (line 1519) | func (c *CreateFunction) Pos() Pos {
    method End (line 1523) | func (c *CreateFunction) End() Pos {
    method Accept (line 1527) | func (c *CreateFunction) Accept(visitor ASTVisitor) error {
  type RoleName (line 1547) | type RoleName struct
    method Pos (line 1553) | func (r *RoleName) Pos() Pos {
    method End (line 1557) | func (r *RoleName) End() Pos {
    method Accept (line 1567) | func (r *RoleName) Accept(visitor ASTVisitor) error {
  type SettingPair (line 1586) | type SettingPair struct
    method Pos (line 1592) | func (s *SettingPair) Pos() Pos {
    method End (line 1596) | func (s *SettingPair) End() Pos {
    method Accept (line 1600) | func (s *SettingPair) Accept(visitor ASTVisitor) error {
  type RoleSetting (line 1614) | type RoleSetting struct
    method Pos (line 1619) | func (r *RoleSetting) Pos() Pos {
    method End (line 1626) | func (r *RoleSetting) End() Pos {
    method Accept (line 1633) | func (r *RoleSetting) Accept(visitor ASTVisitor) error {
  type CreateRole (line 1649) | type CreateRole struct
    method Pos (line 1659) | func (c *CreateRole) Pos() Pos {
    method End (line 1663) | func (c *CreateRole) End() Pos {
    method Type (line 1667) | func (c *CreateRole) Type() string {
    method Accept (line 1671) | func (c *CreateRole) Accept(visitor ASTVisitor) error {
  type AuthenticationClause (line 1692) | type AuthenticationClause struct
    method Pos (line 1703) | func (a *AuthenticationClause) Pos() Pos {
    method End (line 1707) | func (a *AuthenticationClause) End() Pos {
    method Accept (line 1711) | func (a *AuthenticationClause) Accept(visitor ASTVisitor) error {
  type HostClause (line 1732) | type HostClause struct
    method Pos (line 1739) | func (h *HostClause) Pos() Pos {
    method End (line 1743) | func (h *HostClause) End() Pos {
    method Accept (line 1747) | func (h *HostClause) Accept(visitor ASTVisitor) error {
  type DefaultRoleClause (line 1758) | type DefaultRoleClause struct
    method Pos (line 1765) | func (d *DefaultRoleClause) Pos() Pos {
    method End (line 1769) | func (d *DefaultRoleClause) End() Pos {
    method Accept (line 1773) | func (d *DefaultRoleClause) Accept(visitor ASTVisitor) error {
  type GranteesClause (line 1784) | type GranteesClause struct
    method Pos (line 1793) | func (g *GranteesClause) Pos() Pos {
    method End (line 1797) | func (g *GranteesClause) End() Pos {
    method Accept (line 1801) | func (g *GranteesClause) Accept(visitor ASTVisitor) error {
  type CreateUser (line 1817) | type CreateUser struct
    method Pos (line 1833) | func (c *CreateUser) Pos() Pos {
    method End (line 1837) | func (c *CreateUser) End() Pos {
    method Type (line 1841) | func (c *CreateUser) Type() string {
    method Accept (line 1845) | func (c *CreateUser) Accept(visitor ASTVisitor) error {
  type AlterRole (line 1891) | type AlterRole struct
    method Pos (line 1899) | func (a *AlterRole) Pos() Pos {
    method End (line 1903) | func (a *AlterRole) End() Pos {
    method Type (line 1907) | func (a *AlterRole) Type() string {
    method Accept (line 1911) | func (a *AlterRole) Accept(visitor ASTVisitor) error {
  type RoleRenamePair (line 1927) | type RoleRenamePair struct
    method Pos (line 1933) | func (r *RoleRenamePair) Pos() Pos {
    method End (line 1937) | func (r *RoleRenamePair) End() Pos {
    method Accept (line 1941) | func (r *RoleRenamePair) Accept(visitor ASTVisitor) error {
  type DestinationClause (line 1955) | type DestinationClause struct
    method Pos (line 1961) | func (d *DestinationClause) Pos() Pos {
    method End (line 1965) | func (d *DestinationClause) End() Pos {
    method Accept (line 1969) | func (d *DestinationClause) Accept(visitor ASTVisitor) error {
  type ConstraintClause (line 1978) | type ConstraintClause struct
    method Pos (line 1984) | func (c *ConstraintClause) Pos() Pos {
    method End (line 1988) | func (c *ConstraintClause) End() Pos {
    method Accept (line 1992) | func (c *ConstraintClause) Accept(visitor ASTVisitor) error {
  type NullLiteral (line 2004) | type NullLiteral struct
    method Pos (line 2008) | func (n *NullLiteral) Pos() Pos {
    method End (line 2012) | func (n *NullLiteral) End() Pos {
    method Accept (line 2016) | func (n *NullLiteral) Accept(visitor ASTVisitor) error {
  type NotNullLiteral (line 2022) | type NotNullLiteral struct
    method Pos (line 2027) | func (n *NotNullLiteral) Pos() Pos {
    method End (line 2031) | func (n *NotNullLiteral) End() Pos {
    method Accept (line 2035) | func (n *NotNullLiteral) Accept(visitor ASTVisitor) error {
  type NestedIdentifier (line 2044) | type NestedIdentifier struct
    method Pos (line 2049) | func (n *NestedIdentifier) Pos() Pos {
    method End (line 2053) | func (n *NestedIdentifier) End() Pos {
    method Accept (line 2060) | func (n *NestedIdentifier) Accept(visitor ASTVisitor) error {
  type Path (line 2074) | type Path struct
    method Pos (line 2078) | func (p *Path) Pos() Pos {
    method End (line 2085) | func (p *Path) End() Pos {
    method Accept (line 2092) | func (p *Path) Accept(visitor ASTVisitor) error {
  type TableIdentifier (line 2103) | type TableIdentifier struct
    method Pos (line 2108) | func (t *TableIdentifier) Pos() Pos {
    method End (line 2115) | func (t *TableIdentifier) End() Pos {
    method Accept (line 2119) | func (t *TableIdentifier) Accept(visitor ASTVisitor) error {
  type TableSchemaClause (line 2133) | type TableSchemaClause struct
    method Pos (line 2141) | func (t *TableSchemaClause) Pos() Pos {
    method End (line 2145) | func (t *TableSchemaClause) End() Pos {
    method Accept (line 2149) | func (t *TableSchemaClause) Accept(visitor ASTVisitor) error {
  type TableArgListExpr (line 2170) | type TableArgListExpr struct
    method Pos (line 2176) | func (t *TableArgListExpr) Pos() Pos {
    method End (line 2180) | func (t *TableArgListExpr) End() Pos {
    method Accept (line 2184) | func (t *TableArgListExpr) Accept(visitor ASTVisitor) error {
  type TableFunctionExpr (line 2195) | type TableFunctionExpr struct
    method Pos (line 2200) | func (t *TableFunctionExpr) Pos() Pos {
    method End (line 2204) | func (t *TableFunctionExpr) End() Pos {
    method Accept (line 2208) | func (t *TableFunctionExpr) Accept(visitor ASTVisitor) error {
  type ClusterClause (line 2220) | type ClusterClause struct
    method Pos (line 2225) | func (o *ClusterClause) Pos() Pos {
    method End (line 2229) | func (o *ClusterClause) End() Pos {
    method Accept (line 2233) | func (o *ClusterClause) Accept(visitor ASTVisitor) error {
  type PartitionClause (line 2242) | type PartitionClause struct
    method Pos (line 2249) | func (p *PartitionClause) Pos() Pos {
    method End (line 2253) | func (p *PartitionClause) End() Pos {
    method Accept (line 2260) | func (p *PartitionClause) Accept(visitor ASTVisitor) error {
  type PartitionByClause (line 2276) | type PartitionByClause struct
    method Pos (line 2281) | func (p *PartitionByClause) Pos() Pos {
    method End (line 2285) | func (p *PartitionByClause) End() Pos {
    method Accept (line 2289) | func (p *PartitionByClause) Accept(visitor ASTVisitor) error {
  type PrimaryKeyClause (line 2298) | type PrimaryKeyClause struct
    method Pos (line 2303) | func (p *PrimaryKeyClause) Pos() Pos {
    method End (line 2307) | func (p *PrimaryKeyClause) End() Pos {
    method Accept (line 2311) | func (p *PrimaryKeyClause) Accept(visitor ASTVisitor) error {
  type SampleByClause (line 2320) | type SampleByClause struct
    method Pos (line 2325) | func (s *SampleByClause) Pos() Pos {
    method End (line 2329) | func (s *SampleByClause) End() Pos {
    method Accept (line 2333) | func (s *SampleByClause) Accept(visitor ASTVisitor) error {
  type TTLPolicyRuleAction (line 2342) | type TTLPolicyRuleAction struct
    method Pos (line 2349) | func (t *TTLPolicyRuleAction) Pos() Pos {
    method End (line 2353) | func (t *TTLPolicyRuleAction) End() Pos {
    method Accept (line 2360) | func (t *TTLPolicyRuleAction) Accept(visitor ASTVisitor) error {
  type RefreshExpr (line 2371) | type RefreshExpr struct
    method Pos (line 2378) | func (r *RefreshExpr) Pos() Pos {
    method End (line 2382) | func (r *RefreshExpr) End() Pos {
    method Accept (line 2389) | func (r *RefreshExpr) Accept(visitor ASTVisitor) error {
  type TTLPolicyRule (line 2405) | type TTLPolicyRule struct
    method Pos (line 2412) | func (t *TTLPolicyRule) Pos() Pos {
    method End (line 2416) | func (t *TTLPolicyRule) End() Pos {
    method Accept (line 2426) | func (t *TTLPolicyRule) Accept(visitor ASTVisitor) error {
  type TTLPolicy (line 2442) | type TTLPolicy struct
    method Pos (line 2448) | func (t *TTLPolicy) Pos() Pos {
    method End (line 2458) | func (t *TTLPolicy) End() Pos {
    method Accept (line 2468) | func (t *TTLPolicy) Accept(visitor ASTVisitor) error {
  type TTLExpr (line 2489) | type TTLExpr struct
    method Pos (line 2495) | func (t *TTLExpr) Pos() Pos {
    method End (line 2499) | func (t *TTLExpr) End() Pos {
    method Accept (line 2503) | func (t *TTLExpr) Accept(visitor ASTVisitor) error {
  type TTLClause (line 2517) | type TTLClause struct
    method Pos (line 2523) | func (t *TTLClause) Pos() Pos {
    method End (line 2527) | func (t *TTLClause) End() Pos {
    method Accept (line 2531) | func (t *TTLClause) Accept(visitor ASTVisitor) error {
  type Fill (line 2542) | type Fill struct
    method Pos (line 2550) | func (f *Fill) Pos() Pos {
    method End (line 2554) | func (f *Fill) End() Pos {
    method Accept (line 2570) | func (f *Fill) Accept(visitor ASTVisitor) error {
  type OrderExpr (line 2596) | type OrderExpr struct
    method Pos (line 2604) | func (o *OrderExpr) Pos() Pos {
    method End (line 2608) | func (o *OrderExpr) End() Pos {
    method Accept (line 2618) | func (o *OrderExpr) Accept(visitor ASTVisitor) error {
  type InterpolateItem (line 2637) | type InterpolateItem struct
    method Pos (line 2642) | func (i *InterpolateItem) Pos() Pos {
    method End (line 2646) | func (i *InterpolateItem) End() Pos {
    method Accept (line 2653) | func (i *InterpolateItem) Accept(visitor ASTVisitor) error {
  type InterpolateClause (line 2667) | type InterpolateClause struct
    method Pos (line 2673) | func (i *InterpolateClause) Pos() Pos {
    method End (line 2677) | func (i *InterpolateClause) End() Pos {
    method Accept (line 2681) | func (i *InterpolateClause) Accept(visitor ASTVisitor) error {
  type OrderByClause (line 2692) | type OrderByClause struct
    method Pos (line 2699) | func (o *OrderByClause) Pos() Pos {
    method End (line 2703) | func (o *OrderByClause) End() Pos {
    method Accept (line 2710) | func (o *OrderByClause) Accept(visitor ASTVisitor) error {
  type SettingExpr (line 2726) | type SettingExpr struct
    method Pos (line 2732) | func (s *SettingExpr) Pos() Pos {
    method End (line 2736) | func (s *SettingExpr) End() Pos {
    method Accept (line 2740) | func (s *SettingExpr) Accept(visitor ASTVisitor) error {
  type SettingsClause (line 2752) | type SettingsClause struct
    method Pos (line 2758) | func (s *SettingsClause) Pos() Pos {
    method End (line 2762) | func (s *SettingsClause) End() Pos {
    method Accept (line 2766) | func (s *SettingsClause) Accept(visitor ASTVisitor) error {
  type ParamExprList (line 2777) | type ParamExprList struct
    method Pos (line 2784) | func (f *ParamExprList) Pos() Pos {
    method End (line 2788) | func (f *ParamExprList) End() Pos {
    method Accept (line 2792) | func (f *ParamExprList) Accept(visitor ASTVisitor) error {
  type KeyValue (line 2806) | type KeyValue struct
  type MapLiteral (line 2811) | type MapLiteral struct
    method Pos (line 2817) | func (m *MapLiteral) Pos() Pos {
    method End (line 2821) | func (m *MapLiteral) End() Pos {
    method Accept (line 2825) | func (m *MapLiteral) Accept(visitor ASTVisitor) error {
  type NamedParameterExpr (line 2839) | type NamedParameterExpr struct
    method Pos (line 2845) | func (n *NamedParameterExpr) Pos() Pos {
    method End (line 2849) | func (n *NamedParameterExpr) End() Pos {
    method Accept (line 2853) | func (n *NamedParameterExpr) Accept(visitor ASTVisitor) error {
  type QueryParam (line 2865) | type QueryParam struct
    method Pos (line 2872) | func (q *QueryParam) Pos() Pos {
    method End (line 2876) | func (q *QueryParam) End() Pos {
    method Accept (line 2880) | func (q *QueryParam) Accept(visitor ASTVisitor) error {
  type ArrayParamList (line 2892) | type ArrayParamList struct
    method Pos (line 2898) | func (a *ArrayParamList) Pos() Pos {
    method End (line 2902) | func (a *ArrayParamList) End() Pos {
    method Accept (line 2906) | func (a *ArrayParamList) Accept(visitor ASTVisitor) error {
  type ObjectParams (line 2915) | type ObjectParams struct
    method Pos (line 2920) | func (o *ObjectParams) Pos() Pos {
    method End (line 2924) | func (o *ObjectParams) End() Pos {
    method Accept (line 2928) | func (o *ObjectParams) Accept(visitor ASTVisitor) error {
  type FunctionExpr (line 2940) | type FunctionExpr struct
    method Pos (line 2945) | func (f *FunctionExpr) Pos() Pos {
    method End (line 2949) | func (f *FunctionExpr) End() Pos {
    method Accept (line 2953) | func (f *FunctionExpr) Accept(visitor ASTVisitor) error {
  type WindowFunctionExpr (line 2965) | type WindowFunctionExpr struct
    method Pos (line 2971) | func (w *WindowFunctionExpr) Pos() Pos {
    method End (line 2975) | func (w *WindowFunctionExpr) End() Pos {
    method Accept (line 2979) | func (w *WindowFunctionExpr) Accept(visitor ASTVisitor) error {
  type TypedPlaceholder (line 2991) | type TypedPlaceholder struct
    method Pos (line 2998) | func (t *TypedPlaceholder) Pos() Pos {
    method End (line 3002) | func (t *TypedPlaceholder) End() Pos {
    method Accept (line 3006) | func (t *TypedPlaceholder) Accept(visitor ASTVisitor) error {
  type ColumnExpr (line 3018) | type ColumnExpr struct
    method Pos (line 3023) | func (c *ColumnExpr) Pos() Pos {
    method End (line 3027) | func (c *ColumnExpr) End() Pos {
    method Accept (line 3034) | func (c *ColumnExpr) Accept(visitor ASTVisitor) error {
  type ColumnDef (line 3048) | type ColumnDef struct
    method Pos (line 3067) | func (c *ColumnDef) Pos() Pos {
    method End (line 3071) | func (c *ColumnDef) End() Pos {
    method Accept (line 3075) | func (c *ColumnDef) Accept(visitor ASTVisitor) error {
  type ColumnType (line 3129) | type ColumnType interface
  type ScalarType (line 3134) | type ScalarType struct
    method Pos (line 3138) | func (s *ScalarType) Pos() Pos {
    method End (line 3142) | func (s *ScalarType) End() Pos {
    method Accept (line 3146) | func (s *ScalarType) Accept(visitor ASTVisitor) error {
    method Type (line 3155) | func (s *ScalarType) Type() string {
  type JSONPath (line 3159) | type JSONPath struct
  type JSONTypeHint (line 3163) | type JSONTypeHint struct
  type JSONOption (line 3168) | type JSONOption struct
  type JSONOptions (line 3177) | type JSONOptions struct
    method Pos (line 3183) | func (j *JSONOptions) Pos() Pos {
    method End (line 3187) | func (j *JSONOptions) End() Pos {
  type JSONType (line 3191) | type JSONType struct
    method Pos (line 3196) | func (j *JSONType) Pos() Pos {
    method End (line 3200) | func (j *JSONType) End() Pos {
    method Type (line 3207) | func (j *JSONType) Type() string {
    method Accept (line 3211) | func (j *JSONType) Accept(visitor ASTVisitor) error {
  type PropertyType (line 3220) | type PropertyType struct
    method Pos (line 3224) | func (c *PropertyType) Pos() Pos {
    method End (line 3228) | func (c *PropertyType) End() Pos {
    method Accept (line 3232) | func (c *PropertyType) Accept(visitor ASTVisitor) error {
    method Type (line 3241) | func (c *PropertyType) Type() string {
  type TypeWithParams (line 3245) | type TypeWithParams struct
    method Pos (line 3252) | func (s *TypeWithParams) Pos() Pos {
    method End (line 3256) | func (s *TypeWithParams) End() Pos {
    method Accept (line 3260) | func (s *TypeWithParams) Accept(visitor ASTVisitor) error {
    method Type (line 3274) | func (s *TypeWithParams) Type() string {
  type ComplexType (line 3278) | type ComplexType struct
    method Pos (line 3285) | func (c *ComplexType) Pos() Pos {
    method End (line 3289) | func (c *ComplexType) End() Pos {
    method Accept (line 3293) | func (c *ComplexType) Accept(visitor ASTVisitor) error {
    method Type (line 3307) | func (c *ComplexType) Type() string {
  type NestedType (line 3311) | type NestedType struct
    method Pos (line 3318) | func (n *NestedType) Pos() Pos {
    method End (line 3322) | func (n *NestedType) End() Pos {
    method Accept (line 3326) | func (n *NestedType) Accept(visitor ASTVisitor) error {
    method Type (line 3340) | func (n *NestedType) Type() string {
  type CompressionCodec (line 3344) | type CompressionCodec struct
    method Pos (line 3353) | func (c *CompressionCodec) Pos() Pos {
    method End (line 3357) | func (c *CompressionCodec) End() Pos {
    method Accept (line 3361) | func (c *CompressionCodec) Accept(visitor ASTVisitor) error {
  type Literal (line 3387) | type Literal interface
  type NumberLiteral (line 3391) | type NumberLiteral struct
    method Pos (line 3398) | func (n *NumberLiteral) Pos() Pos {
    method End (line 3402) | func (n *NumberLiteral) End() Pos {
    method Accept (line 3406) | func (n *NumberLiteral) Accept(visitor ASTVisitor) error {
  type StringLiteral (line 3412) | type StringLiteral struct
    method Pos (line 3418) | func (s *StringLiteral) Pos() Pos {
    method End (line 3422) | func (s *StringLiteral) End() Pos {
    method Accept (line 3426) | func (s *StringLiteral) Accept(visitor ASTVisitor) error {
  type BoolLiteral (line 3432) | type BoolLiteral struct
    method Pos (line 3438) | func (b *BoolLiteral) Pos() Pos {
    method End (line 3442) | func (b *BoolLiteral) End() Pos {
    method Accept (line 3446) | func (b *BoolLiteral) Accept(visitor ASTVisitor) error {
  type PlaceHolder (line 3452) | type PlaceHolder struct
    method Pos (line 3458) | func (p *PlaceHolder) Pos() Pos {
    method End (line 3462) | func (p *PlaceHolder) End() Pos {
    method Accept (line 3466) | func (p *PlaceHolder) Accept(visitor ASTVisitor) error {
  type RatioExpr (line 3472) | type RatioExpr struct
    method Pos (line 3478) | func (r *RatioExpr) Pos() Pos {
    method End (line 3482) | func (r *RatioExpr) End() Pos {
    method Accept (line 3489) | func (r *RatioExpr) Accept(visitor ASTVisitor) error {
  type EnumValue (line 3503) | type EnumValue struct
    method Pos (line 3508) | func (e *EnumValue) Pos() Pos {
    method End (line 3512) | func (e *EnumValue) End() Pos {
    method Accept (line 3516) | func (e *EnumValue) Accept(visitor ASTVisitor) error {
  type EnumType (line 3528) | type EnumType struct
    method Pos (line 3535) | func (e *EnumType) Pos() Pos {
    method End (line 3539) | func (e *EnumType) End() Pos {
    method Accept (line 3543) | func (e *EnumType) Accept(visitor ASTVisitor) error {
    method Type (line 3557) | func (e *EnumType) Type() string {
  type IntervalExpr (line 3561) | type IntervalExpr struct
    method Pos (line 3569) | func (i *IntervalExpr) Pos() Pos {
    method End (line 3576) | func (i *IntervalExpr) End() Pos {
    method Accept (line 3580) | func (i *IntervalExpr) Accept(visitor ASTVisitor) error {
  type EngineExpr (line 3593) | type EngineExpr struct
    method Pos (line 3606) | func (e *EngineExpr) Pos() Pos {
    method End (line 3610) | func (e *EngineExpr) End() Pos {
    method Accept (line 3614) | func (e *EngineExpr) Accept(visitor ASTVisitor) error {
  type ColumnTypeExpr (line 3655) | type ColumnTypeExpr struct
    method Pos (line 3659) | func (c *ColumnTypeExpr) Pos() Pos {
    method End (line 3663) | func (c *ColumnTypeExpr) End() Pos {
    method Accept (line 3667) | func (c *ColumnTypeExpr) Accept(visitor ASTVisitor) error {
  type ColumnArgList (line 3676) | type ColumnArgList struct
    method Pos (line 3683) | func (c *ColumnArgList) Pos() Pos {
    method End (line 3687) | func (c *ColumnArgList) End() Pos {
    method Accept (line 3691) | func (c *ColumnArgList) Accept(visitor ASTVisitor) error {
  type ColumnExprList (line 3702) | type ColumnExprList struct
    method Pos (line 3709) | func (c *ColumnExprList) Pos() Pos {
    method End (line 3713) | func (c *ColumnExprList) End() Pos {
    method Accept (line 3717) | func (c *ColumnExprList) Accept(visitor ASTVisitor) error {
  type WhenClause (line 3728) | type WhenClause struct
    method Pos (line 3737) | func (w *WhenClause) Pos() Pos {
    method End (line 3741) | func (w *WhenClause) End() Pos {
    method Accept (line 3748) | func (w *WhenClause) Accept(visitor ASTVisitor) error {
  type CaseExpr (line 3765) | type CaseExpr struct
    method Pos (line 3774) | func (c *CaseExpr) Pos() Pos {
    method End (line 3778) | func (c *CaseExpr) End() Pos {
    method Accept (line 3782) | func (c *CaseExpr) Accept(visitor ASTVisitor) error {
  type CastExpr (line 3803) | type CastExpr struct
    method Pos (line 3811) | func (c *CastExpr) Pos() Pos {
    method End (line 3815) | func (c *CastExpr) End() Pos {
    method Accept (line 3819) | func (c *CastExpr) Accept(visitor ASTVisitor) error {
  type WithClause (line 3831) | type WithClause struct
    method Pos (line 3837) | func (w *WithClause) Pos() Pos {
    method End (line 3841) | func (w *WithClause) End() Pos {
    method Accept (line 3845) | func (w *WithClause) Accept(visitor ASTVisitor) error {
  type TopClause (line 3856) | type TopClause struct
    method Pos (line 3863) | func (t *TopClause) Pos() Pos {
    method End (line 3867) | func (t *TopClause) End() Pos {
    method Accept (line 3871) | func (t *TopClause) Accept(visitor ASTVisitor) error {
  type CreateLiveView (line 3880) | type CreateLiveView struct
    method Type (line 3893) | func (c *CreateLiveView) Type() string {
    method Pos (line 3897) | func (c *CreateLiveView) Pos() Pos {
    method End (line 3901) | func (c *CreateLiveView) End() Pos {
    method Accept (line 3905) | func (c *CreateLiveView) Accept(visitor ASTVisitor) error {
  type CreateDictionary (line 3944) | type CreateDictionary struct
    method Type (line 3957) | func (c *CreateDictionary) Type() string {
    method Pos (line 3961) | func (c *CreateDictionary) Pos() Pos {
    method End (line 3965) | func (c *CreateDictionary) End() Pos {
    method Accept (line 3969) | func (c *CreateDictionary) Accept(visitor ASTVisitor) error {
  type CreateNamedCollection (line 4003) | type CreateNamedCollection struct
    method Pos (line 4012) | func (c *CreateNamedCollection) Pos() Pos {
    method End (line 4016) | func (c *CreateNamedCollection) End() Pos {
    method Type (line 4020) | func (c *CreateNamedCollection) Type() string {
    method Accept (line 4024) | func (c *CreateNamedCollection) Accept(visitor ASTVisitor) error {
  type NamedCollectionParam (line 4043) | type NamedCollectionParam struct
    method Pos (line 4051) | func (n *NamedCollectionParam) Pos() Pos {
    method End (line 4055) | func (n *NamedCollectionParam) End() Pos {
    method Accept (line 4059) | func (n *NamedCollectionParam) Accept(visitor ASTVisitor) error {
  type DictionarySchemaClause (line 4071) | type DictionarySchemaClause struct
    method Pos (line 4077) | func (d *DictionarySchemaClause) Pos() Pos {
    method End (line 4081) | func (d *DictionarySchemaClause) End() Pos {
    method Accept (line 4085) | func (d *DictionarySchemaClause) Accept(visitor ASTVisitor) error {
  type DictionaryAttribute (line 4096) | type DictionaryAttribute struct
    method Pos (line 4107) | func (d *DictionaryAttribute) Pos() Pos {
    method End (line 4111) | func (d *DictionaryAttribute) End() Pos {
    method Accept (line 4130) | func (d *DictionaryAttribute) Accept(visitor ASTVisitor) error {
  type DictionaryEngineClause (line 4152) | type DictionaryEngineClause struct
    method Pos (line 4162) | func (d *DictionaryEngineClause) Pos() Pos {
    method End (line 4166) | func (d *DictionaryEngineClause) End() Pos {
    method Accept (line 4188) | func (d *DictionaryEngineClause) Accept(visitor ASTVisitor) error {
  type DictionaryPrimaryKeyClause (line 4224) | type DictionaryPrimaryKeyClause struct
    method Pos (line 4230) | func (d *DictionaryPrimaryKeyClause) Pos() Pos {
    method End (line 4234) | func (d *DictionaryPrimaryKeyClause) End() Pos {
    method Accept (line 4238) | func (d *DictionaryPrimaryKeyClause) Accept(visitor ASTVisitor) error {
  type DictionarySourceClause (line 4247) | type DictionarySourceClause struct
    method Pos (line 4254) | func (d *DictionarySourceClause) Pos() Pos {
    method End (line 4258) | func (d *DictionarySourceClause) End() Pos {
    method Accept (line 4262) | func (d *DictionarySourceClause) Accept(visitor ASTVisitor) error {
  type DictionaryArgExpr (line 4276) | type DictionaryArgExpr struct
    method Pos (line 4282) | func (d *DictionaryArgExpr) Pos() Pos {
    method End (line 4286) | func (d *DictionaryArgExpr) End() Pos {
    method Accept (line 4290) | func (d *DictionaryArgExpr) Accept(visitor ASTVisitor) error {
  type DictionaryLifetimeClause (line 4302) | type DictionaryLifetimeClause struct
    method Pos (line 4310) | func (d *DictionaryLifetimeClause) Pos() Pos {
    method End (line 4314) | func (d *DictionaryLifetimeClause) End() Pos {
    method Accept (line 4318) | func (d *DictionaryLifetimeClause) Accept(visitor ASTVisitor) error {
  type DictionaryLayoutClause (line 4339) | type DictionaryLayoutClause struct
    method Pos (line 4346) | func (d *DictionaryLayoutClause) Pos() Pos {
    method End (line 4350) | func (d *DictionaryLayoutClause) End() Pos {
    method Accept (line 4354) | func (d *DictionaryLayoutClause) Accept(visitor ASTVisitor) error {
  type DictionaryRangeClause (line 4368) | type DictionaryRangeClause struct
    method Pos (line 4375) | func (d *DictionaryRangeClause) Pos() Pos {
    method End (line 4379) | func (d *DictionaryRangeClause) End() Pos {
    method Accept (line 4383) | func (d *DictionaryRangeClause) Accept(visitor ASTVisitor) error {
  type WithTimeoutClause (line 4395) | type WithTimeoutClause struct
    method Pos (line 4401) | func (w *WithTimeoutClause) Pos() Pos {
    method End (line 4405) | func (w *WithTimeoutClause) End() Pos {
    method Accept (line 4409) | func (w *WithTimeoutClause) Accept(visitor ASTVisitor) error {
  type TableExpr (line 4418) | type TableExpr struct
    method Pos (line 4426) | func (t *TableExpr) Pos() Pos {
    method End (line 4430) | func (t *TableExpr) End() Pos {
    method Accept (line 4434) | func (t *TableExpr) Accept(visitor ASTVisitor) error {
  type OnClause (line 4448) | type OnClause struct
    method Pos (line 4453) | func (o *OnClause) Pos() Pos {
    method End (line 4457) | func (o *OnClause) End() Pos {
    method Accept (line 4461) | func (o *OnClause) Accept(visitor ASTVisitor) error {
  type UsingClause (line 4470) | type UsingClause struct
    method Pos (line 4475) | func (u *UsingClause) Pos() Pos {
    method End (line 4479) | func (u *UsingClause) End() Pos {
    method Accept (line 4483) | func (u *UsingClause) Accept(visitor ASTVisitor) error {
  type JoinExpr (line 4492) | type JoinExpr struct
    method Pos (line 4500) | func (j *JoinExpr) Pos() Pos {
    method End (line 4504) | func (j *JoinExpr) End() Pos {
    method Accept (line 4515) | func (j *JoinExpr) Accept(visitor ASTVisitor) error {
  type JoinConstraintClause (line 4534) | type JoinConstraintClause struct
    method Pos (line 4540) | func (j *JoinConstraintClause) Pos() Pos {
    method End (line 4544) | func (j *JoinConstraintClause) End() Pos {
    method Accept (line 4551) | func (j *JoinConstraintClause) Accept(visitor ASTVisitor) error {
  type FromClause (line 4567) | type FromClause struct
    method Pos (line 4572) | func (f *FromClause) Pos() Pos {
    method End (line 4576) | func (f *FromClause) End() Pos {
    method Accept (line 4580) | func (f *FromClause) Accept(visitor ASTVisitor) error {
  type IsNullExpr (line 4589) | type IsNullExpr struct
    method Pos (line 4594) | func (n *IsNullExpr) Pos() Pos {
    method End (line 4598) | func (n *IsNullExpr) End() Pos {
    method Accept (line 4602) | func (n *IsNullExpr) Accept(visitor ASTVisitor) error {
  type IsNotNullExpr (line 4611) | type IsNotNullExpr struct
    method Pos (line 4616) | func (n *IsNotNullExpr) Pos() Pos {
    method End (line 4620) | func (n *IsNotNullExpr) End() Pos {
    method Accept (line 4624) | func (n *IsNotNullExpr) Accept(visitor ASTVisitor) error {
  type AliasExpr (line 4633) | type AliasExpr struct
    method Pos (line 4639) | func (a *AliasExpr) Pos() Pos {
    method End (line 4643) | func (a *AliasExpr) End() Pos {
    method Accept (line 4647) | func (a *AliasExpr) Accept(visitor ASTVisitor) error {
  type WhereClause (line 4659) | type WhereClause struct
    method Pos (line 4664) | func (w *WhereClause) Pos() Pos {
    method End (line 4668) | func (w *WhereClause) End() Pos {
    method Accept (line 4672) | func (w *WhereClause) Accept(visitor ASTVisitor) error {
  type PrewhereClause (line 4681) | type PrewhereClause struct
    method Pos (line 4686) | func (w *PrewhereClause) Pos() Pos {
    method End (line 4690) | func (w *PrewhereClause) End() Pos {
    method Accept (line 4694) | func (w *PrewhereClause) Accept(visitor ASTVisitor) error {
  type GroupByClause (line 4703) | type GroupByClause struct
    method Pos (line 4713) | func (g *GroupByClause) Pos() Pos {
    method End (line 4717) | func (g *GroupByClause) End() Pos {
    method Accept (line 4721) | func (g *GroupByClause) Accept(visitor ASTVisitor) error {
  type HavingClause (line 4732) | type HavingClause struct
    method Pos (line 4737) | func (h *HavingClause) Pos() Pos {
    method End (line 4741) | func (h *HavingClause) End() Pos {
    method Accept (line 4745) | func (h *HavingClause) Accept(visitor ASTVisitor) error {
  type LimitClause (line 4754) | type LimitClause struct
    method Pos (line 4760) | func (l *LimitClause) Pos() Pos {
    method End (line 4764) | func (l *LimitClause) End() Pos {
    method Accept (line 4771) | func (l *LimitClause) Accept(visitor ASTVisitor) error {
  type LimitByClause (line 4787) | type LimitByClause struct
    method Pos (line 4792) | func (l *LimitByClause) Pos() Pos {
    method End (line 4796) | func (l *LimitByClause) End() Pos {
    method Accept (line 4806) | func (l *LimitByClause) Accept(visitor ASTVisitor) error {
  type WindowExpr (line 4822) | type WindowExpr struct
    method Pos (line 4831) | func (w *WindowExpr) Pos() Pos {
    method End (line 4835) | func (w *WindowExpr) End() Pos {
    method Accept (line 4839) | func (w *WindowExpr) Accept(visitor ASTVisitor) error {
  type WindowDefinition (line 4865) | type WindowDefinition struct
    method Pos (line 4871) | func (w *WindowDefinition) Pos() Pos {
    method End (line 4878) | func (w *WindowDefinition) End() Pos {
  type WindowClause (line 4885) | type WindowClause struct
    method Pos (line 4891) | func (w *WindowClause) Pos() Pos {
    method End (line 4895) | func (w *WindowClause) End() Pos {
    method Accept (line 4905) | func (w *WindowClause) Accept(visitor ASTVisitor) error {
  type WindowFrameClause (line 4926) | type WindowFrameClause struct
    method Pos (line 4932) | func (f *WindowFrameClause) Pos() Pos {
    method End (line 4936) | func (f *WindowFrameClause) End() Pos {
    method Accept (line 4940) | func (f *WindowFrameClause) Accept(visitor ASTVisitor) error {
  type WindowFrameExtendExpr (line 4949) | type WindowFrameExtendExpr struct
    method Pos (line 4955) | func (f *WindowFrameExtendExpr) Pos() Pos {
    method End (line 4959) | func (f *WindowFrameExtendExpr) End() Pos {
    method Accept (line 4966) | func (f *WindowFrameExtendExpr) Accept(visitor ASTVisitor) error {
  type BetweenClause (line 4975) | type BetweenClause struct
    method Pos (line 4982) | func (f *BetweenClause) Pos() Pos {
    method End (line 4989) | func (f *BetweenClause) End() Pos {
    method Accept (line 4993) | func (f *BetweenClause) Accept(visitor ASTVisitor) error {
  type WindowFrameCurrentRow (line 5010) | type WindowFrameCurrentRow struct
    method Pos (line 5015) | func (f *WindowFrameCurrentRow) Pos() Pos {
    method End (line 5019) | func (f *WindowFrameCurrentRow) End() Pos {
    method Accept (line 5023) | func (f *WindowFrameCurrentRow) Accept(visitor ASTVisitor) error {
  type WindowFrameUnbounded (line 5029) | type WindowFrameUnbounded struct
    method Pos (line 5035) | func (f *WindowFrameUnbounded) Pos() Pos {
    method End (line 5039) | func (f *WindowFrameUnbounded) End() Pos {
    method Accept (line 5043) | func (f *WindowFrameUnbounded) Accept(visitor ASTVisitor) error {
  type WindowFrameNumber (line 5049) | type WindowFrameNumber struct
    method Pos (line 5055) | func (f *WindowFrameNumber) Pos() Pos {
    method End (line 5059) | func (f *WindowFrameNumber) End() Pos {
    method Accept (line 5063) | func (f *WindowFrameNumber) Accept(visitor ASTVisitor) error {
  type WindowFrameParam (line 5072) | type WindowFrameParam struct
    method Pos (line 5078) | func (f *WindowFrameParam) Pos() Pos {
    method End (line 5082) | func (f *WindowFrameParam) End() Pos {
    method Accept (line 5086) | func (f *WindowFrameParam) Accept(visitor ASTVisitor) error {
  type SelectQuery (line 5095) | type SelectQuery struct
    method Pos (line 5120) | func (s *SelectQuery) Pos() Pos {
    method End (line 5124) | func (s *SelectQuery) End() Pos {
    method Accept (line 5128) | func (s *SelectQuery) Accept(visitor ASTVisitor) error {
  type DistinctOn (line 5221) | type DistinctOn struct
    method Pos (line 5227) | func (s *DistinctOn) Pos() Pos {
    method End (line 5231) | func (s *DistinctOn) End() Pos {
    method Accept (line 5235) | func (s *DistinctOn) Accept(visitor ASTVisitor) error {
  type SubQuery (line 5246) | type SubQuery struct
    method Pos (line 5251) | func (s *SubQuery) Pos() Pos {
    method End (line 5255) | func (s *SubQuery) End() Pos {
    method Accept (line 5259) | func (s *SubQuery) Accept(visitor ASTVisitor) error {
  type NotExpr (line 5270) | type NotExpr struct
    method Pos (line 5275) | func (n *NotExpr) Pos() Pos {
    method End (line 5279) | func (n *NotExpr) End() Pos {
    method Accept (line 5283) | func (n *NotExpr) Accept(visitor ASTVisitor) error {
  type NegateExpr (line 5292) | type NegateExpr struct
    method Pos (line 5297) | func (n *NegateExpr) Pos() Pos {
    method End (line 5301) | func (n *NegateExpr) End() Pos {
    method Accept (line 5305) | func (n *NegateExpr) Accept(visitor ASTVisitor) error {
  type GlobalInOperation (line 5314) | type GlobalInOperation struct
    method Pos (line 5319) | func (g *GlobalInOperation) Pos() Pos {
    method End (line 5323) | func (g *GlobalInOperation) End() Pos {
    method Accept (line 5327) | func (g *GlobalInOperation) Accept(visitor ASTVisitor) error {
  type IntervalFrom (line 5336) | type IntervalFrom struct
    method Pos (line 5342) | func (i *IntervalFrom) Pos() Pos {
    method End (line 5346) | func (i *IntervalFrom) End() Pos {
    method Accept (line 5350) | func (i *IntervalFrom) Accept(visitor ASTVisitor) error {
  type ExtractExpr (line 5359) | type ExtractExpr struct
    method Pos (line 5365) | func (e *ExtractExpr) Pos() Pos {
    method End (line 5369) | func (e *ExtractExpr) End() Pos {
    method Accept (line 5373) | func (e *ExtractExpr) Accept(visitor ASTVisitor) error {
  type DropDatabase (line 5384) | type DropDatabase struct
    method Pos (line 5392) | func (d *DropDatabase) Pos() Pos {
    method End (line 5396) | func (d *DropDatabase) End() Pos {
    method Type (line 5400) | func (d *DropDatabase) Type() string {
    method Accept (line 5404) | func (d *DropDatabase) Accept(visitor ASTVisitor) error {
  type DropStmt (line 5418) | type DropStmt struct
    method Pos (line 5430) | func (d *DropStmt) Pos() Pos {
    method End (line 5434) | func (d *DropStmt) End() Pos {
    method Type (line 5438) | func (d *DropStmt) Type() string {
    method Accept (line 5442) | func (d *DropStmt) Accept(visitor ASTVisitor) error {
  type DropUserOrRole (line 5457) | type DropUserOrRole struct
    method Pos (line 5467) | func (d *DropUserOrRole) Pos() Pos {
    method End (line 5471) | func (d *DropUserOrRole) End() Pos {
    method Type (line 5475) | func (d *DropUserOrRole) Type() string {
    method Accept (line 5479) | func (d *DropUserOrRole) Accept(visitor ASTVisitor) error {
  type UseStmt (line 5495) | type UseStmt struct
    method Pos (line 5501) | func (u *UseStmt) Pos() Pos {
    method End (line 5505) | func (u *UseStmt) End() Pos {
    method Accept (line 5509) | func (u *UseStmt) Accept(visitor ASTVisitor) error {
  type CTEStmt (line 5518) | type CTEStmt struct
    method Pos (line 5524) | func (c *CTEStmt) Pos() Pos {
    method End (line 5528) | func (c *CTEStmt) End() Pos {
    method Accept (line 5532) | func (c *CTEStmt) Accept(visitor ASTVisitor) error {
  type SetStmt (line 5544) | type SetStmt struct
    method Pos (line 5549) | func (s *SetStmt) Pos() Pos {
    method End (line 5553) | func (s *SetStmt) End() Pos {
    method Accept (line 5557) | func (s *SetStmt) Accept(visitor ASTVisitor) error {
  type FormatClause (line 5566) | type FormatClause struct
    method Pos (line 5571) | func (f *FormatClause) Pos() Pos {
    method End (line 5575) | func (f *FormatClause) End() Pos {
    method Accept (line 5579) | func (f *FormatClause) Accept(visitor ASTVisitor) error {
  type OptimizeStmt (line 5588) | type OptimizeStmt struct
    method Pos (line 5598) | func (o *OptimizeStmt) Pos() Pos {
    method End (line 5602) | func (o *OptimizeStmt) End() Pos {
    method Accept (line 5606) | func (o *OptimizeStmt) Accept(visitor ASTVisitor) error {
  type DeduplicateClause (line 5630) | type DeduplicateClause struct
    method Pos (line 5636) | func (d *DeduplicateClause) Pos() Pos {
    method End (line 5640) | func (d *DeduplicateClause) End() Pos {
    method Accept (line 5649) | func (d *DeduplicateClause) Accept(visitor ASTVisitor) error {
  type SystemStmt (line 5665) | type SystemStmt struct
    method Pos (line 5670) | func (s *SystemStmt) Pos() Pos {
    method End (line 5674) | func (s *SystemStmt) End() Pos {
    method Accept (line 5678) | func (s *SystemStmt) Accept(visitor ASTVisitor) error {
  type SystemFlushExpr (line 5687) | type SystemFlushExpr struct
    method Pos (line 5694) | func (s *SystemFlushExpr) Pos() Pos {
    method End (line 5698) | func (s *SystemFlushExpr) End() Pos {
    method Accept (line 5702) | func (s *SystemFlushExpr) Accept(visitor ASTVisitor) error {
  type SystemReloadExpr (line 5713) | type SystemReloadExpr struct
    method Pos (line 5720) | func (s *SystemReloadExpr) Pos() Pos {
    method End (line 5724) | func (s *SystemReloadExpr) End() Pos {
    method Accept (line 5728) | func (s *SystemReloadExpr) Accept(visitor ASTVisitor) error {
  type SystemSyncExpr (line 5739) | type SystemSyncExpr struct
    method Pos (line 5744) | func (s *SystemSyncExpr) Pos() Pos {
    method End (line 5748) | func (s *SystemSyncExpr) End() Pos {
    method Accept (line 5752) | func (s *SystemSyncExpr) Accept(visitor ASTVisitor) error {
  type SystemCtrlExpr (line 5761) | type SystemCtrlExpr struct
    method Pos (line 5769) | func (s *SystemCtrlExpr) Pos() Pos {
    method End (line 5773) | func (s *SystemCtrlExpr) End() Pos {
    method Accept (line 5777) | func (s *SystemCtrlExpr) Accept(visitor ASTVisitor) error {
  type SystemDropExpr (line 5788) | type SystemDropExpr struct
    method Pos (line 5794) | func (s *SystemDropExpr) Pos() Pos {
    method End (line 5798) | func (s *SystemDropExpr) End() Pos {
    method Accept (line 5802) | func (s *SystemDropExpr) Accept(visitor ASTVisitor) error {
  type TruncateTable (line 5808) | type TruncateTable struct
    method Pos (line 5817) | func (t *TruncateTable) Pos() Pos {
    method End (line 5821) | func (t *TruncateTable) End() Pos {
    method Type (line 5825) | func (t *TruncateTable) Type() string {
    method Accept (line 5829) | func (t *TruncateTable) Accept(visitor ASTVisitor) error {
  type SampleClause (line 5843) | type SampleClause struct
    method Pos (line 5849) | func (s *SampleClause) Pos() Pos {
    method End (line 5853) | func (s *SampleClause) End() Pos {
    method Accept (line 5860) | func (s *SampleClause) Accept(visitor ASTVisitor) error {
  type DeleteClause (line 5874) | type DeleteClause struct
    method Pos (line 5881) | func (d *DeleteClause) Pos() Pos {
    method End (line 5885) | func (d *DeleteClause) End() Pos {
    method Accept (line 5889) | func (d *DeleteClause) Accept(visitor ASTVisitor) error {
  type ColumnNamesExpr (line 5908) | type ColumnNamesExpr struct
    method Pos (line 5914) | func (c *ColumnNamesExpr) Pos() Pos {
    method End (line 5918) | func (c *ColumnNamesExpr) End() Pos {
    method Accept (line 5922) | func (c *ColumnNamesExpr) Accept(visitor ASTVisitor) error {
  type AssignmentValues (line 5933) | type AssignmentValues struct
    method Pos (line 5939) | func (v *AssignmentValues) Pos() Pos {
    method End (line 5943) | func (v *AssignmentValues) End() Pos {
    method Accept (line 5947) | func (v *AssignmentValues) Accept(visitor ASTVisitor) error {
  type InsertStmt (line 5958) | type InsertStmt struct
    method Pos (line 5968) | func (i *InsertStmt) Pos() Pos {
    method End (line 5972) | func (i *InsertStmt) End() Pos {
    method Accept (line 5979) | func (i *InsertStmt) Accept(visitor ASTVisitor) error {
  type CheckStmt (line 6008) | type CheckStmt struct
    method Pos (line 6014) | func (c *CheckStmt) Pos() Pos {
    method End (line 6018) | func (c *CheckStmt) End() Pos {
    method Accept (line 6022) | func (c *CheckStmt) Accept(visitor ASTVisitor) error {
  type UnaryExpr (line 6036) | type UnaryExpr struct
    method Pos (line 6042) | func (n *UnaryExpr) Pos() Pos {
    method End (line 6046) | func (n *UnaryExpr) End() Pos {
    method Accept (line 6050) | func (n *UnaryExpr) Accept(visitor ASTVisitor) error {
  type RenameStmt (line 6059) | type RenameStmt struct
    method Pos (line 6068) | func (r *RenameStmt) Pos() Pos {
    method End (line 6072) | func (r *RenameStmt) End() Pos {
    method Type (line 6076) | func (r *RenameStmt) Type() string {
    method Accept (line 6080) | func (r *RenameStmt) Accept(visitor ASTVisitor) error {
  type TargetPair (line 6099) | type TargetPair struct
    method Pos (line 6104) | func (t *TargetPair) Pos() Pos {
    method End (line 6108) | func (t *TargetPair) End() Pos {
    method Accept (line 6112) | func (t *TargetPair) Accept(visitor ASTVisitor) error {
  type ExplainStmt (line 6124) | type ExplainStmt struct
    method Pos (line 6130) | func (e *ExplainStmt) Pos() Pos {
    method End (line 6134) | func (e *ExplainStmt) End() Pos {
    method Accept (line 6138) | func (e *ExplainStmt) Accept(visitor ASTVisitor) error {
  type PrivilegeClause (line 6147) | type PrivilegeClause struct
    method Pos (line 6154) | func (p *PrivilegeClause) Pos() Pos {
    method End (line 6158) | func (p *PrivilegeClause) End() Pos {
    method Accept (line 6162) | func (p *PrivilegeClause) Accept(visitor ASTVisitor) error {
  type GrantPrivilegeStmt (line 6173) | type GrantPrivilegeStmt struct
    method Pos (line 6183) | func (g *GrantPrivilegeStmt) Pos() Pos {
    method End (line 6187) | func (g *GrantPrivilegeStmt) End() Pos {
    method Type (line 6191) | func (g *GrantPrivilegeStmt) Type() string {
    method Accept (line 6195) | func (g *GrantPrivilegeStmt) Accept(visitor ASTVisitor) error {
  type ShowStmt (line 6219) | type ShowStmt struct
    method Pos (line 6234) | func (s *ShowStmt) Pos() Pos {
    method End (line 6238) | func (s *ShowStmt) End() Pos {
    method Accept (line 6258) | func (s *ShowStmt) Accept(visitor ASTVisitor) error {
  type DescribeStmt (line 6289) | type DescribeStmt struct
    method Pos (line 6296) | func (d *DescribeStmt) Pos() Pos {
    method End (line 6300) | func (d *DescribeStmt) End() Pos {
    method Accept (line 6304) | func (d *DescribeStmt) Accept(visitor ASTVisitor) error {

FILE: parser/ast_visitor.go
  type ASTVisitor (line 3) | type ASTVisitor interface
  type VisitFunc (line 204) | type VisitFunc
  type DefaultASTVisitor (line 206) | type DefaultASTVisitor struct
    method VisitOperationExpr (line 210) | func (v *DefaultASTVisitor) VisitOperationExpr(expr *OperationExpr) er...
    method VisitTernaryExpr (line 217) | func (v *DefaultASTVisitor) VisitTernaryExpr(expr *TernaryOperation) e...
    method VisitBinaryExpr (line 224) | func (v *DefaultASTVisitor) VisitBinaryExpr(expr *BinaryOperation) err...
    method VisitIndexOperation (line 231) | func (v *DefaultASTVisitor) VisitIndexOperation(expr *IndexOperation) ...
    method VisitJoinTableExpr (line 238) | func (v *DefaultASTVisitor) VisitJoinTableExpr(expr *JoinTableExpr) er...
    method VisitAlterTable (line 245) | func (v *DefaultASTVisitor) VisitAlterTable(expr *AlterTable) error {
    method VisitAlterTableAttachPartition (line 252) | func (v *DefaultASTVisitor) VisitAlterTableAttachPartition(expr *Alter...
    method VisitAlterTableDetachPartition (line 259) | func (v *DefaultASTVisitor) VisitAlterTableDetachPartition(expr *Alter...
    method VisitAlterTableDropPartition (line 266) | func (v *DefaultASTVisitor) VisitAlterTableDropPartition(expr *AlterTa...
    method VisitAlterTableFreezePartition (line 273) | func (v *DefaultASTVisitor) VisitAlterTableFreezePartition(expr *Alter...
    method VisitAlterTableAddColumn (line 280) | func (v *DefaultASTVisitor) VisitAlterTableAddColumn(expr *AlterTableA...
    method VisitAlterTableAddIndex (line 287) | func (v *DefaultASTVisitor) VisitAlterTableAddIndex(expr *AlterTableAd...
    method VisitAlterTableAddProjection (line 294) | func (v *DefaultASTVisitor) VisitAlterTableAddProjection(expr *AlterTa...
    method VisitProjectionOrderBy (line 301) | func (v *DefaultASTVisitor) VisitProjectionOrderBy(expr *ProjectionOrd...
    method VisitProjectionSelect (line 308) | func (v *DefaultASTVisitor) VisitProjectionSelect(expr *ProjectionSele...
    method VisitTableProjection (line 315) | func (v *DefaultASTVisitor) VisitTableProjection(expr *TableProjection...
    method VisitAlterTableDropColumn (line 322) | func (v *DefaultASTVisitor) VisitAlterTableDropColumn(expr *AlterTable...
    method VisitAlterTableDropIndex (line 329) | func (v *DefaultASTVisitor) VisitAlterTableDropIndex(expr *AlterTableD...
    method VisitAlterTableDropProjection (line 336) | func (v *DefaultASTVisitor) VisitAlterTableDropProjection(expr *AlterT...
    method VisitAlterTableRemoveTTL (line 343) | func (v *DefaultASTVisitor) VisitAlterTableRemoveTTL(expr *AlterTableR...
    method VisitAlterTableClearColumn (line 350) | func (v *DefaultASTVisitor) VisitAlterTableClearColumn(expr *AlterTabl...
    method VisitAlterTableClearIndex (line 357) | func (v *DefaultASTVisitor) VisitAlterTableClearIndex(expr *AlterTable...
    method VisitAlterTableClearProjection (line 364) | func (v *DefaultASTVisitor) VisitAlterTableClearProjection(expr *Alter...
    method VisitAlterTableMaterializeProjection (line 371) | func (v *DefaultASTVisitor) VisitAlterTableMaterializeProjection(expr ...
    method VisitAlterTableMaterializeIndex (line 378) | func (v *DefaultASTVisitor) VisitAlterTableMaterializeIndex(expr *Alte...
    method VisitAlterTableRenameColumn (line 385) | func (v *DefaultASTVisitor) VisitAlterTableRenameColumn(expr *AlterTab...
    method VisitAlterTableModifyQuery (line 392) | func (v *DefaultASTVisitor) VisitAlterTableModifyQuery(expr *AlterTabl...
    method VisitAlterTableModifyTTL (line 399) | func (v *DefaultASTVisitor) VisitAlterTableModifyTTL(expr *AlterTableM...
    method VisitAlterTableModifyColumn (line 406) | func (v *DefaultASTVisitor) VisitAlterTableModifyColumn(expr *AlterTab...
    method VisitAlterTableModifySetting (line 413) | func (v *DefaultASTVisitor) VisitAlterTableModifySetting(expr *AlterTa...
    method VisitAlterTableResetSetting (line 420) | func (v *DefaultASTVisitor) VisitAlterTableResetSetting(expr *AlterTab...
    method VisitAlterTableReplacePartition (line 427) | func (v *DefaultASTVisitor) VisitAlterTableReplacePartition(expr *Alte...
    method VisitAlterTableDelete (line 434) | func (v *DefaultASTVisitor) VisitAlterTableDelete(expr *AlterTableDele...
    method VisitAlterTableUpdate (line 441) | func (v *DefaultASTVisitor) VisitAlterTableUpdate(expr *AlterTableUpda...
    method VisitUpdateAssignment (line 448) | func (v *DefaultASTVisitor) VisitUpdateAssignment(expr *UpdateAssignme...
    method VisitRemovePropertyType (line 455) | func (v *DefaultASTVisitor) VisitRemovePropertyType(expr *RemoveProper...
    method VisitTableIndex (line 462) | func (v *DefaultASTVisitor) VisitTableIndex(expr *TableIndex) error {
    method VisitIdent (line 469) | func (v *DefaultASTVisitor) VisitIdent(expr *Ident) error {
    method VisitUUID (line 476) | func (v *DefaultASTVisitor) VisitUUID(expr *UUID) error {
    method VisitCreateDatabase (line 483) | func (v *DefaultASTVisitor) VisitCreateDatabase(expr *CreateDatabase) ...
    method VisitCreateTable (line 490) | func (v *DefaultASTVisitor) VisitCreateTable(expr *CreateTable) error {
    method VisitCreateMaterializedView (line 497) | func (v *DefaultASTVisitor) VisitCreateMaterializedView(expr *CreateMa...
    method VisitCreateView (line 504) | func (v *DefaultASTVisitor) VisitCreateView(expr *CreateView) error {
    method VisitCreateFunction (line 511) | func (v *DefaultASTVisitor) VisitCreateFunction(expr *CreateFunction) ...
    method VisitRoleName (line 518) | func (v *DefaultASTVisitor) VisitRoleName(expr *RoleName) error {
    method VisitSettingPair (line 525) | func (v *DefaultASTVisitor) VisitSettingPair(expr *SettingPair) error {
    method VisitRoleSetting (line 532) | func (v *DefaultASTVisitor) VisitRoleSetting(expr *RoleSetting) error {
    method VisitCreateRole (line 539) | func (v *DefaultASTVisitor) VisitCreateRole(expr *CreateRole) error {
    method VisitCreateUser (line 546) | func (v *DefaultASTVisitor) VisitCreateUser(expr *CreateUser) error {
    method VisitAuthenticationClause (line 553) | func (v *DefaultASTVisitor) VisitAuthenticationClause(expr *Authentica...
    method VisitHostClause (line 560) | func (v *DefaultASTVisitor) VisitHostClause(expr *HostClause) error {
    method VisitDefaultRoleClause (line 567) | func (v *DefaultASTVisitor) VisitDefaultRoleClause(expr *DefaultRoleCl...
    method VisitGranteesClause (line 574) | func (v *DefaultASTVisitor) VisitGranteesClause(expr *GranteesClause) ...
    method VisitAlterRole (line 581) | func (v *DefaultASTVisitor) VisitAlterRole(expr *AlterRole) error {
    method VisitRoleRenamePair (line 588) | func (v *DefaultASTVisitor) VisitRoleRenamePair(expr *RoleRenamePair) ...
    method VisitDestinationExpr (line 595) | func (v *DefaultASTVisitor) VisitDestinationExpr(expr *DestinationClau...
    method VisitConstraintExpr (line 602) | func (v *DefaultASTVisitor) VisitConstraintExpr(expr *ConstraintClause...
    method VisitNullLiteral (line 609) | func (v *DefaultASTVisitor) VisitNullLiteral(expr *NullLiteral) error {
    method VisitNotNullLiteral (line 616) | func (v *DefaultASTVisitor) VisitNotNullLiteral(expr *NotNullLiteral) ...
    method VisitNestedIdentifier (line 623) | func (v *DefaultASTVisitor) VisitNestedIdentifier(expr *NestedIdentifi...
    method VisitPath (line 630) | func (v *DefaultASTVisitor) VisitPath(expr *Path) error {
    method VisitTableIdentifier (line 637) | func (v *DefaultASTVisitor) VisitTableIdentifier(expr *TableIdentifier...
    method VisitTableSchemaExpr (line 644) | func (v *DefaultASTVisitor) VisitTableSchemaExpr(expr *TableSchemaClau...
    method VisitTableArgListExpr (line 651) | func (v *DefaultASTVisitor) VisitTableArgListExpr(expr *TableArgListEx...
    method VisitTableFunctionExpr (line 658) | func (v *DefaultASTVisitor) VisitTableFunctionExpr(expr *TableFunction...
    method VisitOnClusterExpr (line 665) | func (v *DefaultASTVisitor) VisitOnClusterExpr(expr *ClusterClause) er...
    method VisitPartitionExpr (line 672) | func (v *DefaultASTVisitor) VisitPartitionExpr(expr *PartitionClause) ...
    method VisitPartitionByExpr (line 679) | func (v *DefaultASTVisitor) VisitPartitionByExpr(expr *PartitionByClau...
    method VisitPrimaryKeyExpr (line 686) | func (v *DefaultASTVisitor) VisitPrimaryKeyExpr(expr *PrimaryKeyClause...
    method VisitSampleByExpr (line 693) | func (v *DefaultASTVisitor) VisitSampleByExpr(expr *SampleByClause) er...
    method VisitTTLExpr (line 700) | func (v *DefaultASTVisitor) VisitTTLExpr(expr *TTLExpr) error {
    method VisitTTLExprList (line 707) | func (v *DefaultASTVisitor) VisitTTLExprList(expr *TTLClause) error {
    method VisitTTLPolicy (line 714) | func (v *DefaultASTVisitor) VisitTTLPolicy(expr *TTLPolicy) error {
    method VisitTTLPolicyRule (line 721) | func (v *DefaultASTVisitor) VisitTTLPolicyRule(expr *TTLPolicyRule) er...
    method VisitTTLPolicyItemAction (line 728) | func (v *DefaultASTVisitor) VisitTTLPolicyItemAction(expr *TTLPolicyRu...
    method VisitRefreshExpr (line 735) | func (v *DefaultASTVisitor) VisitRefreshExpr(expr *RefreshExpr) error {
    method VisitOrderByExpr (line 742) | func (v *DefaultASTVisitor) VisitOrderByExpr(expr *OrderExpr) error {
    method VisitOrderByListExpr (line 749) | func (v *DefaultASTVisitor) VisitOrderByListExpr(expr *OrderByClause) ...
    method VisitFill (line 756) | func (v *DefaultASTVisitor) VisitFill(expr *Fill) error {
    method VisitInterpolateItem (line 763) | func (v *DefaultASTVisitor) VisitInterpolateItem(expr *InterpolateItem...
    method VisitInterpolateClause (line 770) | func (v *DefaultASTVisitor) VisitInterpolateClause(expr *InterpolateCl...
    method VisitSettingsExpr (line 777) | func (v *DefaultASTVisitor) VisitSettingsExpr(expr *SettingExpr) error {
    method VisitSettingsExprList (line 784) | func (v *DefaultASTVisitor) VisitSettingsExprList(expr *SettingsClause...
    method VisitParamExprList (line 791) | func (v *DefaultASTVisitor) VisitParamExprList(expr *ParamExprList) er...
    method VisitArrayParamList (line 798) | func (v *DefaultASTVisitor) VisitArrayParamList(expr *ArrayParamList) ...
    method VisitQueryParam (line 805) | func (v *DefaultASTVisitor) VisitQueryParam(expr *QueryParam) error {
    method VisitMapLiteral (line 812) | func (v *DefaultASTVisitor) VisitMapLiteral(expr *MapLiteral) error {
    method VisitNamedParameterExpr (line 819) | func (v *DefaultASTVisitor) VisitNamedParameterExpr(expr *NamedParamet...
    method VisitObjectParams (line 826) | func (v *DefaultASTVisitor) VisitObjectParams(expr *ObjectParams) error {
    method VisitFunctionExpr (line 833) | func (v *DefaultASTVisitor) VisitFunctionExpr(expr *FunctionExpr) error {
    method VisitWindowFunctionExpr (line 840) | func (v *DefaultASTVisitor) VisitWindowFunctionExpr(expr *WindowFuncti...
    method VisitColumnDef (line 847) | func (v *DefaultASTVisitor) VisitColumnDef(expr *ColumnDef) error {
    method VisitColumnExpr (line 854) | func (v *DefaultASTVisitor) VisitColumnExpr(expr *ColumnExpr) error {
    method VisitTypedPlaceholder (line 861) | func (v *DefaultASTVisitor) VisitTypedPlaceholder(expr *TypedPlacehold...
    method VisitScalarType (line 868) | func (v *DefaultASTVisitor) VisitScalarType(expr *ScalarType) error {
    method VisitJSONType (line 875) | func (v *DefaultASTVisitor) VisitJSONType(expr *JSONType) error {
    method VisitPropertyType (line 882) | func (v *DefaultASTVisitor) VisitPropertyType(expr *PropertyType) error {
    method VisitTypeWithParams (line 889) | func (v *DefaultASTVisitor) VisitTypeWithParams(expr *TypeWithParams) ...
    method VisitComplexType (line 896) | func (v *DefaultASTVisitor) VisitComplexType(expr *ComplexType) error {
    method VisitNestedType (line 903) | func (v *DefaultASTVisitor) VisitNestedType(expr *NestedType) error {
    method VisitCompressionCodec (line 910) | func (v *DefaultASTVisitor) VisitCompressionCodec(expr *CompressionCod...
    method VisitNumberLiteral (line 917) | func (v *DefaultASTVisitor) VisitNumberLiteral(expr *NumberLiteral) er...
    method VisitStringLiteral (line 924) | func (v *DefaultASTVisitor) VisitStringLiteral(expr *StringLiteral) er...
    method VisitRatioExpr (line 931) | func (v *DefaultASTVisitor) VisitRatioExpr(expr *RatioExpr) error {
    method VisitEnumValue (line 938) | func (v *DefaultASTVisitor) VisitEnumValue(expr *EnumValue) error {
    method VisitEnumType (line 945) | func (v *DefaultASTVisitor) VisitEnumType(expr *EnumType) error {
    method VisitIntervalExpr (line 952) | func (v *DefaultASTVisitor) VisitIntervalExpr(expr *IntervalExpr) error {
    method VisitEngineExpr (line 959) | func (v *DefaultASTVisitor) VisitEngineExpr(expr *EngineExpr) error {
    method VisitColumnTypeExpr (line 966) | func (v *DefaultASTVisitor) VisitColumnTypeExpr(expr *ColumnTypeExpr) ...
    method VisitColumnArgList (line 973) | func (v *DefaultASTVisitor) VisitColumnArgList(expr *ColumnArgList) er...
    method VisitColumnExprList (line 980) | func (v *DefaultASTVisitor) VisitColumnExprList(expr *ColumnExprList) ...
    method VisitWhenExpr (line 987) | func (v *DefaultASTVisitor) VisitWhenExpr(expr *WhenClause) error {
    method VisitCaseExpr (line 994) | func (v *DefaultASTVisitor) VisitCaseExpr(expr *CaseExpr) error {
    method VisitCastExpr (line 1001) | func (v *DefaultASTVisitor) VisitCastExpr(expr *CastExpr) error {
    method VisitWithExpr (line 1008) | func (v *DefaultASTVisitor) VisitWithExpr(expr *WithClause) error {
    method VisitTopExpr (line 1015) | func (v *DefaultASTVisitor) VisitTopExpr(expr *TopClause) error {
    method VisitCreateLiveView (line 1022) | func (v *DefaultASTVisitor) VisitCreateLiveView(expr *CreateLiveView) ...
    method VisitCreateDictionary (line 1029) | func (v *DefaultASTVisitor) VisitCreateDictionary(expr *CreateDictiona...
    method VisitCreateNamedCollection (line 1036) | func (v *DefaultASTVisitor) VisitCreateNamedCollection(expr *CreateNam...
    method VisitNamedCollectionParam (line 1043) | func (v *DefaultASTVisitor) VisitNamedCollectionParam(expr *NamedColle...
    method VisitDictionarySchemaClause (line 1050) | func (v *DefaultASTVisitor) VisitDictionarySchemaClause(expr *Dictiona...
    method VisitDictionaryAttribute (line 1057) | func (v *DefaultASTVisitor) VisitDictionaryAttribute(expr *DictionaryA...
    method VisitDictionaryEngineClause (line 1064) | func (v *DefaultASTVisitor) VisitDictionaryEngineClause(expr *Dictiona...
    method VisitDictionaryPrimaryKeyClause (line 1071) | func (v *DefaultASTVisitor) VisitDictionaryPrimaryKeyClause(expr *Dict...
    method VisitDictionarySourceClause (line 1078) | func (v *DefaultASTVisitor) VisitDictionarySourceClause(expr *Dictiona...
    method VisitDictionaryArgExpr (line 1085) | func (v *DefaultASTVisitor) VisitDictionaryArgExpr(expr *DictionaryArg...
    method VisitDictionaryLifetimeClause (line 1092) | func (v *DefaultASTVisitor) VisitDictionaryLifetimeClause(expr *Dictio...
    method VisitDictionaryLayoutClause (line 1099) | func (v *DefaultASTVisitor) VisitDictionaryLayoutClause(expr *Dictiona...
    method VisitDictionaryRangeClause (line 1106) | func (v *DefaultASTVisitor) VisitDictionaryRangeClause(expr *Dictionar...
    method VisitWithTimeoutExpr (line 1113) | func (v *DefaultASTVisitor) VisitWithTimeoutExpr(expr *WithTimeoutClau...
    method VisitTableExpr (line 1120) | func (v *DefaultASTVisitor) VisitTableExpr(expr *TableExpr) error {
    method VisitOnExpr (line 1127) | func (v *DefaultASTVisitor) VisitOnExpr(expr *OnClause) error {
    method VisitUsingExpr (line 1134) | func (v *DefaultASTVisitor) VisitUsingExpr(expr *UsingClause) error {
    method VisitJoinExpr (line 1141) | func (v *DefaultASTVisitor) VisitJoinExpr(expr *JoinExpr) error {
    method VisitJoinConstraintExpr (line 1148) | func (v *DefaultASTVisitor) VisitJoinConstraintExpr(expr *JoinConstrai...
    method VisitFromExpr (line 1155) | func (v *DefaultASTVisitor) VisitFromExpr(expr *FromClause) error {
    method VisitIsNullExpr (line 1162) | func (v *DefaultASTVisitor) VisitIsNullExpr(expr *IsNullExpr) error {
    method VisitIsNotNullExpr (line 1169) | func (v *DefaultASTVisitor) VisitIsNotNullExpr(expr *IsNotNullExpr) er...
    method VisitAliasExpr (line 1176) | func (v *DefaultASTVisitor) VisitAliasExpr(expr *AliasExpr) error {
    method VisitWhereExpr (line 1183) | func (v *DefaultASTVisitor) VisitWhereExpr(expr *WhereClause) error {
    method VisitPrewhereExpr (line 1190) | func (v *DefaultASTVisitor) VisitPrewhereExpr(expr *PrewhereClause) er...
    method VisitGroupByExpr (line 1197) | func (v *DefaultASTVisitor) VisitGroupByExpr(expr *GroupByClause) error {
    method VisitHavingExpr (line 1204) | func (v *DefaultASTVisitor) VisitHavingExpr(expr *HavingClause) error {
    method VisitLimitExpr (line 1211) | func (v *DefaultASTVisitor) VisitLimitExpr(expr *LimitClause) error {
    method VisitLimitByExpr (line 1218) | func (v *DefaultASTVisitor) VisitLimitByExpr(expr *LimitByClause) error {
    method VisitWindowConditionExpr (line 1225) | func (v *DefaultASTVisitor) VisitWindowConditionExpr(expr *WindowExpr)...
    method VisitWindowExpr (line 1232) | func (v *DefaultASTVisitor) VisitWindowExpr(expr *WindowClause) error {
    method VisitWindowFrameExpr (line 1239) | func (v *DefaultASTVisitor) VisitWindowFrameExpr(expr *WindowFrameClau...
    method VisitWindowFrameExtendExpr (line 1246) | func (v *DefaultASTVisitor) VisitWindowFrameExtendExpr(expr *WindowFra...
    method VisitBetweenClause (line 1253) | func (v *DefaultASTVisitor) VisitBetweenClause(expr *BetweenClause) er...
    method VisitWindowFrameCurrentRow (line 1260) | func (v *DefaultASTVisitor) VisitWindowFrameCurrentRow(expr *WindowFra...
    method VisitWindowFrameUnbounded (line 1267) | func (v *DefaultASTVisitor) VisitWindowFrameUnbounded(expr *WindowFram...
    method VisitWindowFrameNumber (line 1274) | func (v *DefaultASTVisitor) VisitWindowFrameNumber(expr *WindowFrameNu...
    method VisitWindowFrameParam (line 1281) | func (v *DefaultASTVisitor) VisitWindowFrameParam(expr *WindowFramePar...
    method VisitSelectQuery (line 1288) | func (v *DefaultASTVisitor) VisitSelectQuery(expr *SelectQuery) error {
    method VisitSubQueryExpr (line 1295) | func (v *DefaultASTVisitor) VisitSubQueryExpr(expr *SubQuery) error {
    method VisitNotExpr (line 1302) | func (v *DefaultASTVisitor) VisitNotExpr(expr *NotExpr) error {
    method VisitNegateExpr (line 1309) | func (v *DefaultASTVisitor) VisitNegateExpr(expr *NegateExpr) error {
    method VisitGlobalInExpr (line 1316) | func (v *DefaultASTVisitor) VisitGlobalInExpr(expr *GlobalInOperation)...
    method VisitExtractExpr (line 1323) | func (v *DefaultASTVisitor) VisitExtractExpr(expr *ExtractExpr) error {
    method VisitIntervalFrom (line 1330) | func (v *DefaultASTVisitor) VisitIntervalFrom(expr *IntervalFrom) error {
    method VisitDropDatabase (line 1337) | func (v *DefaultASTVisitor) VisitDropDatabase(expr *DropDatabase) error {
    method VisitDropStmt (line 1344) | func (v *DefaultASTVisitor) VisitDropStmt(expr *DropStmt) error {
    method VisitDropUserOrRole (line 1351) | func (v *DefaultASTVisitor) VisitDropUserOrRole(expr *DropUserOrRole) ...
    method VisitUseExpr (line 1358) | func (v *DefaultASTVisitor) VisitUseExpr(expr *UseStmt) error {
    method VisitCTEExpr (line 1365) | func (v *DefaultASTVisitor) VisitCTEExpr(expr *CTEStmt) error {
    method VisitSetExpr (line 1372) | func (v *DefaultASTVisitor) VisitSetExpr(expr *SetStmt) error {
    method VisitFormatExpr (line 1379) | func (v *DefaultASTVisitor) VisitFormatExpr(expr *FormatClause) error {
    method VisitOptimizeExpr (line 1386) | func (v *DefaultASTVisitor) VisitOptimizeExpr(expr *OptimizeStmt) error {
    method VisitDeduplicateExpr (line 1393) | func (v *DefaultASTVisitor) VisitDeduplicateExpr(expr *DeduplicateClau...
    method VisitSystemExpr (line 1400) | func (v *DefaultASTVisitor) VisitSystemExpr(expr *SystemStmt) error {
    method VisitSystemFlushExpr (line 1407) | func (v *DefaultASTVisitor) VisitSystemFlushExpr(expr *SystemFlushExpr...
    method VisitSystemReloadExpr (line 1414) | func (v *DefaultASTVisitor) VisitSystemReloadExpr(expr *SystemReloadEx...
    method VisitSystemSyncExpr (line 1421) | func (v *DefaultASTVisitor) VisitSystemSyncExpr(expr *SystemSyncExpr) ...
    method VisitSystemCtrlExpr (line 1428) | func (v *DefaultASTVisitor) VisitSystemCtrlExpr(expr *SystemCtrlExpr) ...
    method VisitSystemDropExpr (line 1435) | func (v *DefaultASTVisitor) VisitSystemDropExpr(expr *SystemDropExpr) ...
    method VisitTruncateTable (line 1442) | func (v *DefaultASTVisitor) VisitTruncateTable(expr *TruncateTable) er...
    method VisitSampleRatioExpr (line 1449) | func (v *DefaultASTVisitor) VisitSampleRatioExpr(expr *SampleClause) e...
    method VisitPlaceHolderExpr (line 1456) | func (v *DefaultASTVisitor) VisitPlaceHolderExpr(expr *PlaceHolder) er...
    method VisitDeleteFromExpr (line 1463) | func (v *DefaultASTVisitor) VisitDeleteFromExpr(expr *DeleteClause) er...
    method VisitColumnNamesExpr (line 1470) | func (v *DefaultASTVisitor) VisitColumnNamesExpr(expr *ColumnNamesExpr...
    method VisitValuesExpr (line 1477) | func (v *DefaultASTVisitor) VisitValuesExpr(expr *AssignmentValues) er...
    method VisitInsertExpr (line 1484) | func (v *DefaultASTVisitor) VisitInsertExpr(expr *InsertStmt) error {
    method VisitCheckExpr (line 1491) | func (v *DefaultASTVisitor) VisitCheckExpr(expr *CheckStmt) error {
    method VisitUnaryExpr (line 1498) | func (v *DefaultASTVisitor) VisitUnaryExpr(expr *UnaryExpr) error {
    method VisitRenameStmt (line 1505) | func (v *DefaultASTVisitor) VisitRenameStmt(expr *RenameStmt) error {
    method VisitExplainExpr (line 1512) | func (v *DefaultASTVisitor) VisitExplainExpr(expr *ExplainStmt) error {
    method VisitPrivilegeExpr (line 1519) | func (v *DefaultASTVisitor) VisitPrivilegeExpr(expr *PrivilegeClause) ...
    method VisitGrantPrivilegeExpr (line 1526) | func (v *DefaultASTVisitor) VisitGrantPrivilegeExpr(expr *GrantPrivile...
    method VisitShowExpr (line 1533) | func (v *DefaultASTVisitor) VisitShowExpr(expr *ShowStmt) error {
    method VisitDescribeExpr (line 1540) | func (v *DefaultASTVisitor) VisitDescribeExpr(expr *DescribeStmt) error {
    method VisitSelectItem (line 1547) | func (v *DefaultASTVisitor) VisitSelectItem(expr *SelectItem) error {
    method VisitTargetPairExpr (line 1554) | func (v *DefaultASTVisitor) VisitTargetPairExpr(expr *TargetPair) error {
    method VisitDistinctOn (line 1561) | func (v *DefaultASTVisitor) VisitDistinctOn(expr *DistinctOn) error {
    method VisitBoolLiteral (line 1568) | func (v *DefaultASTVisitor) VisitBoolLiteral(expr *BoolLiteral) error {
    method Enter (line 1575) | func (v *DefaultASTVisitor) Enter(expr Expr) {}
    method Leave (line 1577) | func (v *DefaultASTVisitor) Leave(expr Expr) {}

FILE: parser/benchmark_test.go
  function BenchmarkParseSQLFiles (line 10) | func BenchmarkParseSQLFiles(b *testing.B) {
  function BenchmarkParseComplexQueries (line 35) | func BenchmarkParseComplexQueries(b *testing.B) {

FILE: parser/format.go
  constant whitespace (line 6) | whitespace byte = ' '
  constant newline (line 7) | newline    byte = '\n'
  type FormatMode (line 10) | type FormatMode
  constant FormatModeCompact (line 13) | FormatModeCompact FormatMode = iota + 1
  constant FormatModeBeautify (line 14) | FormatModeBeautify
  type Formatter (line 18) | type Formatter struct
    method WithBeautify (line 35) | func (f *Formatter) WithBeautify() *Formatter {
    method WithIndent (line 42) | func (f *Formatter) WithIndent(indent string) *Formatter {
    method writeIndentIfNeeded (line 47) | func (f *Formatter) writeIndentIfNeeded() {
    method WriteString (line 57) | func (f *Formatter) WriteString(s string) {
    method WriteByte (line 63) | func (f *Formatter) WriteByte(b byte) {
    method WriteExpr (line 77) | func (f *Formatter) WriteExpr(expr Expr) {
    method NewLine (line 84) | func (f *Formatter) NewLine() {
    method Break (line 91) | func (f *Formatter) Break() {
    method Indent (line 99) | func (f *Formatter) Indent() {
    method Dedent (line 103) | func (f *Formatter) Dedent() {
    method String (line 109) | func (f *Formatter) String() string {
  function NewFormatter (line 27) | func NewFormatter() *Formatter {
  function Format (line 114) | func Format(expr Expr) string {
  method isLogicalOp (line 120) | func (p *BinaryOperation) isLogicalOp() bool {
  function isLogicalBinaryOp (line 129) | func isLogicalBinaryOp(expr Expr) bool {
  method writeLogicalOperand (line 136) | func (p *BinaryOperation) writeLogicalOperand(formatter *Formatter, expr...
  method FormatSQL (line 146) | func (p *BinaryOperation) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 176) | func (a *AliasExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 188) | func (a *AlterRole) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 214) | func (a *AlterTable) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 230) | func (a *AlterTableAddColumn) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 246) | func (a *AlterTableAddIndex) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 258) | func (a *AlterTableAddProjection) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 270) | func (a *AlterTableAttachPartition) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 279) | func (a *AlterTableClearColumn) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 293) | func (a *AlterTableClearIndex) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 307) | func (a *AlterTableClearProjection) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 321) | func (a *AlterTableDelete) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 328) | func (a *AlterTableDetachPartition) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 337) | func (a *AlterTableDropColumn) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 345) | func (a *AlterTableDropIndex) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 353) | func (a *AlterTableDropPartition) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 365) | func (a *AlterTableDropProjection) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 373) | func (a *AlterTableFreezePartition) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 381) | func (a *AlterTableMaterializeIndex) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 396) | func (a *AlterTableMaterializeProjection) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 411) | func (a *AlterTableModifyColumn) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 422) | func (a *AlterTableModifyQuery) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 430) | func (a *AlterTableModifySetting) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 445) | func (a *AlterTableModifyTTL) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 450) | func (a *AlterTableRemoveTTL) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 454) | func (a *AlterTableRenameColumn) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 464) | func (a *AlterTableReplacePartition) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 471) | func (a *AlterTableResetSetting) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 486) | func (a *AlterTableUpdate) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 509) | func (a *ArrayParamList) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 520) | func (v *AssignmentValues) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 531) | func (a *AuthenticationClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 560) | func (f *BetweenClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 572) | func (b *BoolLiteral) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 576) | func (c *CTEStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 588) | func (c *CaseExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 609) | func (c *CastExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 621) | func (c *CheckStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 630) | func (o *ClusterClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 635) | func (c *ColumnArgList) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 646) | func (c *ColumnDef) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 683) | func (c *ColumnExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 691) | func (c *ColumnExprList) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 703) | func (c *ColumnNamesExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 715) | func (c *ColumnTypeExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 719) | func (c *ComplexType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 731) | func (c *CompressionCodec) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 754) | func (c *ConstraintClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 760) | func (c *CreateDatabase) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 780) | func (c *CreateDictionary) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 819) | func (c *CreateFunction) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 839) | func (c *CreateLiveView) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 873) | func (c *CreateMaterializedView) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 955) | func (c *CreateNamedCollection) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 974) | func (c *CreateRole) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1007) | func (c *CreateTable) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1054) | func (c *CreateUser) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1117) | func (c *CreateView) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1153) | func (d *DeduplicateClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1165) | func (d *DefaultRoleClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1179) | func (d *DeleteClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1192) | func (d *DescribeStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1201) | func (d *DestinationClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1206) | func (d *DictionaryArgExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1212) | func (d *DictionaryAttribute) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1241) | func (d *DictionaryEngineClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1281) | func (d *DictionaryLayoutClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1294) | func (d *DictionaryLifetimeClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1307) | func (d *DictionaryPrimaryKeyClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1312) | func (d *DictionaryRangeClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1325) | func (d *DictionarySchemaClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1342) | func (d *DictionarySourceClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1355) | func (s *DistinctOn) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1366) | func (d *DropDatabase) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1378) | func (d *DropStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1397) | func (d *DropUserOrRole) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1417) | func (e *EngineExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1449) | func (e *EnumType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1462) | func (e *EnumValue) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1468) | func (e *ExplainStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1475) | func (e *ExtractExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1486) | func (f *Fill) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1506) | func (f *FormatClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1511) | func (f *FromClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1519) | func (f *FunctionExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1524) | func (g *GlobalInOperation) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1529) | func (g *GrantPrivilegeStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1556) | func (g *GranteesClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1582) | func (g *GroupByClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1611) | func (h *HavingClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1616) | func (h *HostClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1625) | func (i *Ident) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1644) | func (i *IndexOperation) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1650) | func (i *InsertStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1685) | func (i *InterpolateClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1699) | func (i *InterpolateItem) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1707) | func (i *IntervalExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1716) | func (i *IntervalFrom) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1722) | func (n *IsNotNullExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1727) | func (n *IsNullExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1732) | func (j *JSONPath) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1741) | func (j *JSONOption) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1776) | func (j *JSONOptions) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1818) | func (j *JSONType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1825) | func (j *JoinConstraintClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1835) | func (j *JoinExpr) FormatSQL(formatter *Formatter) {
  function writeJoinSQL (line 1842) | func writeJoinSQL(formatter *Formatter, expr Expr) {
  method FormatSQL (line 1870) | func (j *JoinTableExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1881) | func (l *LimitByClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1891) | func (l *LimitClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1905) | func (m *MapLiteral) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1920) | func (n *NamedCollectionParam) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1931) | func (n *NamedParameterExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1937) | func (n *NegateExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1942) | func (n *NestedIdentifier) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1952) | func (n *NestedType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1966) | func (n *NotExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1972) | func (n *NotNullLiteral) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1976) | func (n *NullLiteral) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1980) | func (n *NumberLiteral) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1984) | func (o *ObjectParams) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1989) | func (o *OnClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1994) | func (o *OperationExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 1998) | func (o *OptimizeStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2017) | func (o *OrderByClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2036) | func (o *OrderExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2052) | func (f *ParamExprList) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2061) | func (p *PartitionByClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2066) | func (p *PartitionClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2077) | func (p *Path) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2086) | func (p *PlaceHolder) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2090) | func (w *PrewhereClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2095) | func (p *PrimaryKeyClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2100) | func (p *PrivilegeClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2112) | func (p *ProjectionOrderByClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2117) | func (p *ProjectionSelectStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2136) | func (c *PropertyType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2140) | func (q *QueryParam) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2148) | func (r *RatioExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2156) | func (r *RefreshExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2169) | func (a *RemovePropertyType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2174) | func (r *RenameStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2190) | func (r *RoleName) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2202) | func (r *RoleRenamePair) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2210) | func (r *RoleSetting) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2225) | func (s *SampleByClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2230) | func (s *SampleClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2239) | func (s *ScalarType) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2243) | func (s *SelectItem) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2255) | func (s *SelectQuery) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2356) | func (s *SetStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2366) | func (s *SettingExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2372) | func (s *SettingPair) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2384) | func (s *SettingsClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2399) | func (s *ShowStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2436) | func (s *StringLiteral) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2442) | func (s *SubQuery) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2452) | func (s *SystemCtrlExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2462) | func (s *SystemDropExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2467) | func (s *SystemFlushExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2476) | func (s *SystemReloadExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2485) | func (s *SystemStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2491) | func (s *SystemSyncExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2496) | func (t *TTLClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2506) | func (t *TTLExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2514) | func (t *TTLPolicy) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2529) | func (t *TTLPolicyRule) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2541) | func (t *TTLPolicyRuleAction) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2549) | func (t *TableArgListExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2560) | func (t *TableExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2571) | func (t *TableFunctionExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2576) | func (t *TableIdentifier) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2584) | func (a *TableIndex) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2604) | func (t *TableProjection) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2613) | func (t *TableSchemaClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2640) | func (t *TargetPair) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2646) | func (t *TernaryOperation) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2654) | func (t *TopClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2662) | func (t *TruncateTable) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2678) | func (s *TypeWithParams) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2690) | func (t *TypedPlaceholder) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2698) | func (u *UUID) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2703) | func (n *UnaryExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2709) | func (u *UpdateAssignment) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2715) | func (u *UseStmt) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2720) | func (u *UsingClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2725) | func (w *WhenClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2736) | func (w *WhereClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2749) | func (w *WindowDefinition) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2755) | func (w *WindowClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2765) | func (w *WindowExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2795) | func (f *WindowFrameClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2801) | func (f *WindowFrameCurrentRow) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2805) | func (f *WindowFrameExtendExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2813) | func (f *WindowFrameNumber) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2819) | func (f *WindowFrameParam) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2825) | func (f *WindowFrameUnbounded) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2830) | func (w *WindowFunctionExpr) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2836) | func (w *WithClause) FormatSQL(formatter *Formatter) {
  method FormatSQL (line 2846) | func (w *WithTimeoutClause) FormatSQL(formatter *Formatter) {

FILE: parser/format_test.go
  function TestFormatter_WithBeautify_Chaining (line 9) | func TestFormatter_WithBeautify_Chaining(t *testing.T) {
  function TestFormatter_WithIndent_Chaining (line 16) | func TestFormatter_WithIndent_Chaining(t *testing.T) {
  function TestFormatter_ChainedMethods (line 23) | func TestFormatter_ChainedMethods(t *testing.T) {
  function TestFormatter_WithIndent_CustomIndentation (line 31) | func TestFormatter_WithIndent_CustomIndentation(t *testing.T) {
  function TestFormatter_DefaultIndent (line 69) | func TestFormatter_DefaultIndent(t *testing.T) {

FILE: parser/helper.go
  function IsDigit (line 3) | func IsDigit(c byte) bool {
  function IsHexDigit (line 7) | func IsHexDigit(c byte) bool {
  function IsIdentStart (line 11) | func IsIdentStart(c byte) bool {
  function IsIdentPart (line 15) | func IsIdentPart(c byte) bool {

FILE: parser/keyword.go
  constant KeywordAdd (line 4) | KeywordAdd          = "ADD"
  constant KeywordAdmin (line 5) | KeywordAdmin        = "ADMIN"
  constant KeywordAfter (line 6) | KeywordAfter        = "AFTER"
  constant KeywordAlias (line 7) | KeywordAlias        = "ALIAS"
  constant KeywordAll (line 8) | KeywordAll          = "ALL"
  constant KeywordAlter (line 9) | KeywordAlter        = "ALTER"
  constant KeywordAnd (line 10) | KeywordAnd          = "AND"
  constant KeywordAnti (line 11) | KeywordAnti         = "ANTI"
  constant KeywordAny (line 12) | KeywordAny          = "ANY"
  constant KeywordAppend (line 13) | KeywordAppend       = "APPEND"
  constant KeywordApply (line 14) | KeywordApply        = "APPLY"
  constant KeywordArray (line 15) | KeywordArray        = "ARRAY"
  constant KeywordAs (line 16) | KeywordAs           = "AS"
  constant KeywordAsc (line 17) | KeywordAsc          = "ASC"
  constant KeywordAscending (line 18) | KeywordAscending    = "ASCENDING"
  constant KeywordAsof (line 19) | KeywordAsof         = "ASOF"
  constant KeywordAst (line 20) | KeywordAst          = "AST"
  constant KeywordAsync (line 21) | KeywordAsync        = "ASYNC"
  constant KeywordAttach (line 22) | KeywordAttach       = "ATTACH"
  constant KeywordBetween (line 23) | KeywordBetween      = "BETWEEN"
  constant KeywordBoth (line 24) | KeywordBoth         = "BOTH"
  constant KeywordBy (line 25) | KeywordBy           = "BY"
  constant KeywordCache (line 26) | KeywordCache        = "CACHE"
  constant KeywordCase (line 27) | KeywordCase         = "CASE"
  constant KeywordCast (line 28) | KeywordCast         = "CAST"
  constant KeywordCheck (line 29) | KeywordCheck        = "CHECK"
  constant KeywordClear (line 30) | KeywordClear        = "CLEAR"
  constant KeywordCluster (line 31) | KeywordCluster      = "CLUSTER"
  constant KeywordCodec (line 32) | KeywordCodec        = "CODEC"
  constant KeywordCollate (line 33) | KeywordCollate      = "COLLATE"
  constant KeywordCollection (line 34) | KeywordCollection   = "COLLECTION"
  constant KeywordColumn (line 35) | KeywordColumn       = "COLUMN"
  constant KeywordColumns (line 36) | KeywordColumns      = "COLUMNS"
  constant KeywordComment (line 37) | KeywordComment      = "COMMENT"
  constant KeywordCompiled (line 38) | KeywordCompiled     = "COMPILED"
  constant KeywordConfig (line 39) | KeywordConfig       = "CONFIG"
  constant KeywordConstraint (line 40) | KeywordConstraint   = "CONSTRAINT"
  constant KeywordCreate (line 41) | KeywordCreate       = "CREATE"
  constant KeywordCross (line 42) | KeywordCross        = "CROSS"
  constant KeywordCube (line 43) | KeywordCube         = "CUBE"
  constant KeywordCurrent (line 44) | KeywordCurrent      = "CURRENT"
  constant KeywordDatabase (line 45) | KeywordDatabase     = "DATABASE"
  constant KeywordDatabases (line 46) | KeywordDatabases    = "DATABASES"
  constant KeywordDate (line 47) | KeywordDate         = "DATE"
  constant KeywordDay (line 48) | KeywordDay          = "DAY"
  constant KeywordDeduplicate (line 49) | KeywordDeduplicate  = "DEDUPLICATE"
  constant KeywordDefault (line 50) | KeywordDefault      = "DEFAULT"
  constant KeywordDelay (line 51) | KeywordDelay        = "DELAY"
  constant KeywordDelete (line 52) | KeywordDelete       = "DELETE"
  constant KeywordDepends (line 53) | KeywordDepends      = "DEPENDS"
  constant KeywordDesc (line 54) | KeywordDesc         = "DESC"
  constant KeywordDescending (line 55) | KeywordDescending   = "DESCENDING"
  constant KeywordDescribe (line 56) | KeywordDescribe     = "DESCRIBE"
  constant KeywordDetach (line 57) | KeywordDetach       = "DETACH"
  constant KeywordDetached (line 58) | KeywordDetached     = "DETACHED"
  constant KeywordDictionaries (line 59) | KeywordDictionaries = "DICTIONARIES"
  constant KeywordDictionary (line 60) | KeywordDictionary   = "DICTIONARY"
  constant KeywordDisk (line 61) | KeywordDisk         = "DISK"
  constant KeywordDistinct (line 62) | KeywordDistinct     = "DISTINCT"
  constant KeywordDistributed (line 63) | KeywordDistributed  = "DISTRIBUTED"
  constant KeywordDrop (line 64) | KeywordDrop         = "DROP"
  constant KeywordDNS (line 65) | KeywordDNS          = "DNS"
  constant KeywordElse (line 66) | KeywordElse         = "ELSE"
  constant KeywordEmbedded (line 67) | KeywordEmbedded     = "EMBEDDED"
  constant KeywordEmpty (line 68) | KeywordEmpty        = "EMPTY"
  constant KeywordEnd (line 69) | KeywordEnd          = "END"
  constant KeywordEngine (line 70) | KeywordEngine       = "ENGINE"
  constant KeywordEstimate (line 71) | KeywordEstimate     = "ESTIMATE"
  constant KeywordEvents (line 72) | KeywordEvents       = "EVENTS"
  constant KeywordEvery (line 73) | KeywordEvery        = "EVERY"
  constant KeywordExcept (line 74) | KeywordExcept       = "EXCEPT"
  constant KeywordExists (line 75) | KeywordExists       = "EXISTS"
  constant KeywordExplain (line 76) | KeywordExplain      = "EXPLAIN"
  constant KeywordExpression (line 77) | KeywordExpression   = "EXPRESSION"
  constant KeywordExtract (line 78) | KeywordExtract      = "EXTRACT"
  constant KeywordFalse (line 79) | KeywordFalse        = "FALSE"
  constant KeywordFetches (line 80) | KeywordFetches      = "FETCHES"
  constant KeywordFileSystem (line 81) | KeywordFileSystem   = "FILESYSTEM"
  constant KeywordFill (line 82) | KeywordFill         = "FILL"
  constant KeywordFinal (line 83) | KeywordFinal        = "FINAL"
  constant KeywordFirst (line 84) | KeywordFirst        = "FIRST"
  constant KeywordFlush (line 85) | KeywordFlush        = "FLUSH"
  constant KeywordFollowing (line 86) | KeywordFollowing    = "FOLLOWING"
  constant KeywordFor (line 87) | KeywordFor          = "FOR"
  constant KeywordFormat (line 88) | KeywordFormat       = "FORMAT"
  constant KeywordFreeze (line 89) | KeywordFreeze       = "FREEZE"
  constant KeywordFrom (line 90) | KeywordFrom         = "FROM"
  constant KeywordFull (line 91) | KeywordFull         = "FULL"
  constant KeywordFunction (line 92) | KeywordFunction     = "FUNCTION"
  constant KeywordFunctions (line 93) | KeywordFunctions    = "FUNCTIONS"
  constant KeywordGlobal (line 94) | KeywordGlobal       = "GLOBAL"
  constant KeywordGrant (line 95) | KeywordGrant        = "GRANT"
  constant KeywordGrantees (line 96) | KeywordGrantees     = "GRANTEES"
  constant KeywordGranularity (line 97) | KeywordGranularity  = "GRANULARITY"
  constant KeywordGroup (line 98) | KeywordGroup        = "GROUP"
  constant KeywordGrouping (line 99) | KeywordGrouping     = "GROUPING"
  constant KeywordHaving (line 100) | KeywordHaving       = "HAVING"
  constant KeywordHierarchical (line 101) | KeywordHierarchical = "HIERARCHICAL"
  constant KeywordHost (line 102) | KeywordHost         = "HOST"
  constant KeywordHour (line 103) | KeywordHour         = "HOUR"
  constant KeywordId (line 104) | KeywordId           = "ID"
  constant KeywordIdentified (line 105) | KeywordIdentified   = "IDENTIFIED"
  constant KeywordIf (line 106) | KeywordIf           = "IF"
  constant KeywordIlike (line 107) | KeywordIlike        = "ILIKE"
  constant KeywordIn (line 108) | KeywordIn           = "IN"
  constant KeywordIndex (line 109) | KeywordIndex        = "INDEX"
  constant KeywordInf (line 110) | KeywordInf          = "INF"
  constant KeywordInjective (line 111) | KeywordInjective    = "INJECTIVE"
  constant KeywordInner (line 112) | KeywordInner        = "INNER"
  constant KeywordInsert (line 113) | KeywordInsert       = "INSERT"
  constant KeywordInterval (line 114) | KeywordInterval     = "INTERVAL"
  constant KeywordInterpolate (line 115) | KeywordInterpolate  = "INTERPOLATE"
  constant KeywordInto (line 116) | KeywordInto         = "INTO"
  constant KeywordIp (line 117) | KeywordIp           = "IP"
  constant KeywordIs (line 118) | KeywordIs           = "IS"
  constant KeywordIs_object_id (line 119) | KeywordIs_object_id = "IS_OBJECT_ID"
  constant KeywordJoin (line 120) | KeywordJoin         = "JOIN"
  constant KeywordJSON (line 121) | KeywordJSON         = "JSON"
  constant KeywordKey (line 122) | KeywordKey          = "KEY"
  constant KeywordKill (line 123) | KeywordKill         = "KILL"
  constant KeywordKerberos (line 124) | KeywordKerberos     = "KERBEROS"
  constant KeywordLast (line 125) | KeywordLast         = "LAST"
  constant KeywordLayout (line 126) | KeywordLayout       = "LAYOUT"
  constant KeywordLdap (line 127) | KeywordLdap         = "LDAP"
  constant KeywordLeading (line 128) | KeywordLeading      = "LEADING"
  constant KeywordLeft (line 129) | KeywordLeft         = "LEFT"
  constant KeywordLifetime (line 130) | KeywordLifetime     = "LIFETIME"
  constant KeywordLike (line 131) | KeywordLike         = "LIKE"
  constant KeywordLimit (line 132) | KeywordLimit        = "LIMIT"
  constant KeywordLive (line 133) | KeywordLive         = "LIVE"
  constant KeywordLocal (line 134) | KeywordLocal        = "LOCAL"
  constant KeywordLogs (line 135) | KeywordLogs         = "LOGS"
  constant KeywordMark (line 136) | KeywordMark         = "MARK"
  constant KeywordMaterialize (line 137) | KeywordMaterialize  = "MATERIALIZE"
  constant KeywordMaterialized (line 138) | KeywordMaterialized = "MATERIALIZED"
  constant KeywordMax (line 139) | KeywordMax          = "MAX"
  constant KeywordMerges (line 140) | KeywordMerges       = "MERGES"
  constant KeywordMin (line 141) | KeywordMin          = "MIN"
  constant KeywordMinute (line 142) | KeywordMinute       = "MINUTE"
  constant KeywordModify (line 143) | KeywordModify       = "MODIFY"
  constant KeywordMonth (line 144) | KeywordMonth        = "MONTH"
  constant KeywordMove (line 145) | KeywordMove         = "MOVE"
  constant KeywordMoves (line 146) | KeywordMoves        = "MOVES"
  constant KeywordMutation (line 147) | KeywordMutation     = "MUTATION"
  constant KeywordName (line 148) | KeywordName         = "NAME"
  constant KeywordNamed (line 149) | KeywordNamed        = "NAMED"
  constant KeywordNan_sql (line 150) | KeywordNan_sql      = "NAN_SQL"
  constant KeywordNo (line 151) | KeywordNo           = "NO"
  constant KeywordNone (line 152) | KeywordNone         = "NONE"
  constant KeywordNot (line 153) | KeywordNot          = "NOT"
  constant KeywordNull (line 154) | KeywordNull         = "NULL"
  constant KeywordNulls (line 155) | KeywordNulls        = "NULLS"
  constant KeywordOffset (line 156) | KeywordOffset       = "OFFSET"
  constant KeywordOn (line 157) | KeywordOn           = "ON"
  constant KeywordOptimize (line 158) | KeywordOptimize     = "OPTIMIZE"
  constant KeywordOption (line 159) | KeywordOption       = "OPTION"
  constant KeywordOr (line 160) | KeywordOr           = "OR"
  constant KeywordOrder (line 161) | KeywordOrder        = "ORDER"
  constant KeywordOverridable (line 162) | KeywordOverridable  = "OVERRIDABLE"
  constant KeywordOuter (line 163) | KeywordOuter        = "OUTER"
  constant KeywordOutfile (line 164) | KeywordOutfile      = "OUTFILE"
  constant KeywordOver (line 165) | KeywordOver         = "OVER"
  constant KeywordPartition (line 166) | KeywordPartition    = "PARTITION"
  constant KeywordPipeline (line 167) | KeywordPipeline     = "PIPELINE"
  constant KeywordPolicy (line 168) | KeywordPolicy       = "POLICY"
  constant KeywordPopulate (line 169) | KeywordPopulate     = "POPULATE"
  constant KeywordPreceding (line 170) | KeywordPreceding    = "PRECEDING"
  constant KeywordPrewhere (line 171) | KeywordPrewhere     = "PREWHERE"
  constant KeywordPrimary (line 172) | KeywordPrimary      = "PRIMARY"
  constant KeywordProjection (line 173) | KeywordProjection   = "PROJECTION"
  constant KeywordQuarter (line 174) | KeywordQuarter      = "QUARTER"
  constant KeywordQuery (line 175) | KeywordQuery        = "QUERY"
  constant KeywordQueues (line 176) | KeywordQueues       = "QUEUES"
  constant KeywordQuota (line 177) | KeywordQuota        = "QUOTA"
  constant KeywordRandomize (line 178) | KeywordRandomize    = "RANDOMIZE"
  constant KeywordRange (line 179) | KeywordRange        = "RANGE"
  constant KeywordRealm (line 180) | KeywordRealm        = "REALM"
  constant KeywordRecompress (line 181) | KeywordRecompress   = "RECOMPRESS"
  constant KeywordRefresh (line 182) | KeywordRefresh      = "REFRESH"
  constant KeywordRegexp (line 183) | KeywordRegexp       = "REGEXP"
  constant KeywordReload (line 184) | KeywordReload       = "RELOAD"
  constant KeywordRemove (line 185) | KeywordRemove       = "REMOVE"
  constant KeywordRename (line 186) | KeywordRename       = "RENAME"
  constant KeywordReplace (line 187) | KeywordReplace      = "REPLACE"
  constant KeywordReset (line 188) | KeywordReset        = "RESET"
  constant KeywordReplica (line 189) | KeywordReplica      = "REPLICA"
  constant KeywordReplicated (line 190) | KeywordReplicated   = "REPLICATED"
  constant KeywordReplication (line 191) | KeywordReplication  = "REPLICATION"
  constant KeywordRestart (line 192) | KeywordRestart      = "RESTART"
  constant KeywordRight (line 193) | KeywordRight        = "RIGHT"
  constant KeywordRole (line 194) | KeywordRole         = "ROLE"
  constant KeywordRollup (line 195) | KeywordRollup       = "ROLLUP"
  constant KeywordRow (line 196) | KeywordRow          = "ROW"
  constant KeywordRows (line 197) | KeywordRows         = "ROWS"
  constant KeywordSample (line 198) | KeywordSample       = "SAMPLE"
  constant KeywordSecond (line 199) | KeywordSecond       = "SECOND"
  constant KeywordSelect (line 200) | KeywordSelect       = "SELECT"
  constant KeywordSemi (line 201) | KeywordSemi         = "SEMI"
  constant KeywordSends (line 202) | KeywordSends        = "SENDS"
  constant KeywordServer (line 203) | KeywordServer       = "SERVER"
  constant KeywordSet (line 204) | KeywordSet          = "SET"
  constant KeywordSets (line 205) | KeywordSets         = "SETS"
  constant KeywordSetting (line 206) | KeywordSetting      = "SETTING"
  constant KeywordSettings (line 207) | KeywordSettings     = "SETTINGS"
  constant KeywordShow (line 208) | KeywordShow         = "SHOW"
  constant KeywordShutdown (line 209) | KeywordShutdown     = "SHUTDOWN"
  constant KeywordSkip (line 210) | KeywordSkip         = "SKIP"
  constant KeywordSource (line 211) | KeywordSource       = "SOURCE"
  constant KeywordStart (line 212) | KeywordStart        = "START"
  constant KeywordStaleness (line 213) | KeywordStaleness    = "STALENESS"
  constant KeywordStep (line 214) | KeywordStep         = "STEP"
  constant KeywordStop (line 215) | KeywordStop         = "STOP"
  constant KeywordSubstring (line 216) | KeywordSubstring    = "SUBSTRING"
  constant KeywordSync (line 217) | KeywordSync         = "SYNC"
  constant KeywordSyntax (line 218) | KeywordSyntax       = "SYNTAX"
  constant KeywordSystem (line 219) | KeywordSystem       = "SYSTEM"
  constant KeywordTable (line 220) | KeywordTable        = "TABLE"
  constant KeywordTables (line 221) | KeywordTables       = "TABLES"
  constant KeywordTemporary (line 222) | KeywordTemporary    = "TEMPORARY"
  constant KeywordTest (line 223) | KeywordTest         = "TEST"
  constant KeywordThen (line 224) | KeywordThen         = "THEN"
  constant KeywordTies (line 225) | KeywordTies         = "TIES"
  constant KeywordTimeout (line 226) | KeywordTimeout      = "TIMEOUT"
  constant KeywordTimestamp (line 227) | KeywordTimestamp    = "TIMESTAMP"
  constant KeywordTo (line 228) | KeywordTo           = "TO"
  constant KeywordTop (line 229) | KeywordTop          = "TOP"
  constant KeywordTotals (line 230) | KeywordTotals       = "TOTALS"
  constant KeywordTrailing (line 231) | KeywordTrailing     = "TRAILING"
  constant KeywordTrim (line 232) | KeywordTrim         = "TRIM"
  constant KeywordTrue (line 233) | KeywordTrue         = "TRUE"
  constant KeywordTruncate (line 234) | KeywordTruncate     = "TRUNCATE"
  constant KeywordTtl (line 235) | KeywordTtl          = "TTL"
  constant KeywordType (line 236) | KeywordType         = "TYPE"
  constant KeywordUnbounded (line 237) | KeywordUnbounded    = "UNBOUNDED"
  constant KeywordUncompressed (line 238) | KeywordUncompressed = "UNCOMPRESSED"
  constant KeywordUnion (line 239) | KeywordUnion        = "UNION"
  constant KeywordUpdate (line 240) | KeywordUpdate       = "UPDATE"
  constant KeywordUse (line 241) | KeywordUse          = "USE"
  constant KeywordUser (line 242) | KeywordUser         = "USER"
  constant KeywordUsing (line 243) | KeywordUsing        = "USING"
  constant KeywordUntil (line 244) | KeywordUntil        = "UNTIL"
  constant KeywordUuid (line 245) | KeywordUuid         = "UUID"
  constant KeywordValid (line 246) | KeywordValid        = "VALID"
  constant KeywordValues (line 247) | KeywordValues       = "VALUES"
  constant KeywordView (line 248) | KeywordView         = "VIEW"
  constant KeywordVolume (line 249) | KeywordVolume       = "VOLUME"
  constant KeywordWatch (line 250) | KeywordWatch        = "WATCH"
  constant KeywordWeek (line 251) | KeywordWeek         = "WEEK"
  constant KeywordWhen (line 252) | KeywordWhen         = "WHEN"
  constant KeywordWhere (line 253) | KeywordWhere        = "WHERE"
  constant KeywordWindow (line 254) | KeywordWindow       = "WINDOW"
  constant KeywordWith (line 255) | KeywordWith         = "WITH"
  constant KeywordYear (line 256) | KeywordYear         = "YEAR"
  constant KeywordDefiner (line 257) | KeywordDefiner      = "DEFINER"
  constant KeywordSQL (line 258) | KeywordSQL          = "SQL"
  constant KeywordSecurity (line 259) | KeywordSecurity     = "SECURITY"

FILE: parser/lexer.go
  constant TokenKindEOF (line 12) | TokenKindEOF          TokenKind = "<eof>"
  constant TokenKindIdent (line 13) | TokenKindIdent        TokenKind = "<ident>"
  constant TokenKindKeyword (line 14) | TokenKindKeyword      TokenKind = "<keyword>"
  constant TokenKindInt (line 15) | TokenKindInt          TokenKind = "<int>"
  constant TokenKindFloat (line 16) | TokenKindFloat        TokenKind = "<float>"
  constant TokenKindString (line 17) | TokenKindString       TokenKind = "<string>"
  constant TokenKindDot (line 18) | TokenKindDot                    = "."
  constant TokenKindSingleEQ (line 19) | TokenKindSingleEQ     TokenKind = "="
  constant TokenKindDoubleEQ (line 20) | TokenKindDoubleEQ     TokenKind = "=="
  constant TokenKindNE (line 21) | TokenKindNE           TokenKind = "!="
  constant TokenKindLT (line 22) | TokenKindLT           TokenKind = "<"
  constant TokenKindLE (line 23) | TokenKindLE           TokenKind = "<="
  constant TokenKindGT (line 24) | TokenKindGT           TokenKind = ">"
  constant TokenKindGE (line 25) | TokenKindGE           TokenKind = ">="
  constant TokenKindQuestionMark (line 26) | TokenKindQuestionMark TokenKind = "?"
  constant TokenKindPlus (line 28) | TokenKindPlus   TokenKind = "+"
  constant TokenKindMinus (line 29) | TokenKindMinus  TokenKind = "-"
  constant TokenKindMul (line 30) | TokenKindMul    TokenKind = "*"
  constant TokenKindDiv (line 31) | TokenKindDiv    TokenKind = "/"
  constant TokenKindMod (line 32) | TokenKindMod    TokenKind = "%"
  constant TokenKindConcat (line 33) | TokenKindConcat TokenKind = "||"
  constant TokenKindArrow (line 35) | TokenKindArrow TokenKind = "->"
  constant TokenKindDash (line 36) | TokenKindDash  TokenKind = "::"
  constant TokenKindLParen (line 38) | TokenKindLParen   TokenKind = "("
  constant TokenKindRParen (line 39) | TokenKindRParen   TokenKind = ")"
  constant TokenKindLBrace (line 40) | TokenKindLBrace   TokenKind = "{"
  constant TokenKindRBrace (line 41) | TokenKindRBrace   TokenKind = "}"
  constant TokenKindLBracket (line 42) | TokenKindLBracket TokenKind = "["
  constant TokenKindRBracket (line 43) | TokenKindRBracket TokenKind = "]"
  constant TokenKindComma (line 45) | TokenKindComma  TokenKind = ","
  constant TokenKindColon (line 46) | TokenKindColon  TokenKind = ":"
  constant TokenKindAtSign (line 47) | TokenKindAtSign TokenKind = "@"
  constant Unquoted (line 51) | Unquoted = iota + 1
  constant DoubleQuote (line 52) | DoubleQuote
  constant BackTicks (line 53) | BackTicks
  constant SingleQuote (line 54) | SingleQuote
  type Pos (line 57) | type Pos
  type TokenKind (line 58) | type TokenKind
  type Token (line 60) | type Token struct
    method ToString (line 70) | func (t *Token) ToString() string {
  type lexerState (line 77) | type lexerState struct
  type Lexer (line 82) | type Lexer struct
    method saveState (line 92) | func (l *Lexer) saveState() lexerState {
    method restoreState (line 96) | func (l *Lexer) restoreState(state lexerState) {
    method skipN (line 100) | func (l *Lexer) skipN(n int) {
    method slice (line 104) | func (l *Lexer) slice(i, j int) string {
    method peekN (line 108) | func (l *Lexer) peekN(n int) byte {
    method peekOk (line 112) | func (l *Lexer) peekOk(n int) bool {
    method isKeyword (line 116) | func (l *Lexer) isKeyword(ident string) bool {
    method consumeNumber (line 120) | func (l *Lexer) consumeNumber() error {
    method consumeIdent (line 179) | func (l *Lexer) consumeIdent(_ Pos) error {
    method consumeSingleLineComment (line 228) | func (l *Lexer) consumeSingleLineComment() {
    method consumeMultiLineComment (line 237) | func (l *Lexer) consumeMultiLineComment() {
    method consumeString (line 250) | func (l *Lexer) consumeString() error {
    method skipComments (line 287) | func (l *Lexer) skipComments() {
    method peekToken (line 315) | func (l *Lexer) peekToken() (*Token, error) {
    method hasPrecedenceToken (line 326) | func (l *Lexer) hasPrecedenceToken(last *Token) bool {
    method consumeToken (line 334) | func (l *Lexer) consumeToken() error {
    method isEOF (line 415) | func (l *Lexer) isEOF() bool {
    method skipSpace (line 419) | func (l *Lexer) skipSpace() {
  function NewLexer (line 88) | func NewLexer(buf string) *Lexer {

FILE: parser/lexer_test.go
  function TestConsumeComment (line 11) | func TestConsumeComment(t *testing.T) {
  function TestConsumeString (line 34) | func TestConsumeString(t *testing.T) {
  function TestConsumeNumber (line 107) | func TestConsumeNumber(t *testing.T) {

FILE: parser/parse_system.go
  method parseSetStmt (line 8) | func (p *Parser) parseSetStmt(pos Pos) (*SetStmt, error) {
  method parseSettingsStmt (line 22) | func (p *Parser) parseSettingsStmt(pos Pos) (*SetStmt, error) {
  method parseSystemFlushExpr (line 36) | func (p *Parser) parseSystemFlushExpr(pos Pos) (*SystemFlushExpr, error) {
  method parseSystemReloadExpr (line 65) | func (p *Parser) parseSystemReloadExpr(pos Pos) (*SystemReloadExpr, erro...
  method parseSystemSyncExpr (line 105) | func (p *Parser) parseSystemSyncExpr(pos Pos) (*SystemSyncExpr, error) {
  method parseSystemCtrlExpr (line 122) | func (p *Parser) parseSystemCtrlExpr(pos Pos) (*SystemCtrlExpr, error) {
  method parseSystemDropExpr (line 175) | func (p *Parser) parseSystemDropExpr(pos Pos) (*SystemDropExpr, error) {
  method tryParseDeduplicateClause (line 215) | func (p *Parser) tryParseDeduplicateClause(pos Pos) (*DeduplicateClause,...
  method parseDeduplicateClause (line 222) | func (p *Parser) parseDeduplicateClause(pos Pos) (*DeduplicateClause, er...
  method parseOptimizeStmt (line 250) | func (p *Parser) parseOptimizeStmt(pos Pos) (*OptimizeStmt, error) {
  method parseSystemStmt (line 306) | func (p *Parser) parseSystemStmt(pos Pos) (*SystemStmt, error) {
  method parseCheckStmt (line 336) | func (p *Parser) parseCheckStmt(pos Pos) (*CheckStmt, error) {
  method parseRoleName (line 358) | func (p *Parser) parseRoleName(_ Pos) (*RoleName, error) {
  method tryParseRoleSettings (line 399) | func (p *Parser) tryParseRoleSettings(pos Pos) ([]*RoleSetting, error) {
  method parseRoleSetting (line 406) | func (p *Parser) parseRoleSetting(_ Pos) (*RoleSetting, error) {
  method parseRoleSettings (line 456) | func (p *Parser) parseRoleSettings(_ Pos) ([]*RoleSetting, error) {
  method parseCreateRole (line 471) | func (p *Parser) parseCreateRole(pos Pos) (*CreateRole, error) {
  method parseAuthenticationClause (line 539) | func (p *Parser) parseAuthenticationClause(pos Pos) (*AuthenticationClau...
  method parseHostClause (line 601) | func (p *Parser) parseHostClause(pos Pos) (*HostClause, error) {
  method parseDefaultRoleClause (line 631) | func (p *Parser) parseDefaultRoleClause(pos Pos) (*DefaultRoleClause, er...
  method parseGranteesClause (line 667) | func (p *Parser) parseGranteesClause(pos Pos) (*GranteesClause, error) {
  method parseCreateUserModifiers (line 725) | func (p *Parser) parseCreateUserModifiers(createUser *CreateUser) error {
  method parseUserNames (line 746) | func (p *Parser) parseUserNames() ([]*RoleName, error) {
  method parseHostClauses (line 764) | func (p *Parser) parseHostClauses() ([]*HostClause, error) {
  method parseDefaultClause (line 782) | func (p *Parser) parseDefaultClause(createUser *CreateUser) (bool, error) {
  method parseOptionalClauses (line 815) | func (p *Parser) parseOptionalClauses(createUser *CreateUser) error {
  method parseCreateUser (line 882) | func (p *Parser) parseCreateUser(pos Pos) (*CreateUser, error) {
  method parserDropUserOrRole (line 910) | func (p *Parser) parserDropUserOrRole(pos Pos) (*DropUserOrRole, error) {
  method parsePrivilegeSelectOrInsert (line 972) | func (p *Parser) parsePrivilegeSelectOrInsert(pos Pos) (*PrivilegeClause...
  method parsePrivilegeAlter (line 991) | func (p *Parser) parsePrivilegeAlter(pos Pos) (*PrivilegeClause, error) {
  method parsePrivilegeCreate (line 1054) | func (p *Parser) parsePrivilegeCreate(pos Pos) (*PrivilegeClause, error) {
  method parsePrivilegeDrop (line 1080) | func (p *Parser) parsePrivilegeDrop(pos Pos) (*PrivilegeClause, error) {
  method parsePrivilegeShow (line 1096) | func (p *Parser) parsePrivilegeShow(pos Pos) (*PrivilegeClause, error) {
  method parsePrivilegeSystem (line 1112) | func (p *Parser) parsePrivilegeSystem(pos Pos) (*PrivilegeClause, error) {
  method parsePrivilegeClause (line 1184) | func (p *Parser) parsePrivilegeClause(pos Pos) (*PrivilegeClause, error) {
  method parsePrivilegeRoles (line 1248) | func (p *Parser) parsePrivilegeRoles(_ Pos) ([]*Ident, error) {
  method parseGrantOptions (line 1265) | func (p *Parser) parseGrantOptions(_ Pos) ([]string, error) {
  method parseGrantOption (line 1277) | func (p *Parser) parseGrantOption(_ Pos) (string, error) {
  method parseGrantSource (line 1291) | func (p *Parser) parseGrantSource(_ Pos) (*TableIdentifier, error) {
  method parseGrantPrivilegeStmt (line 1312) | func (p *Parser) parseGrantPrivilegeStmt(pos Pos) (*GrantPrivilegeStmt, ...
  method parseAlterRole (line 1372) | func (p *Parser) parseAlterRole(pos Pos) (*AlterRole, error) {
  method parseRoleRenamePair (line 1414) | func (p *Parser) parseRoleRenamePair(_ Pos) (*RoleRenamePair, error) {

FILE: parser/parser_alter.go
  method parseAlterTable (line 8) | func (p *Parser) parseAlterTable(pos Pos) (*AlterTable, error) {
  method parseAlterTableAdd (line 79) | func (p *Parser) parseAlterTableAdd(pos Pos) (AlterTableClause, error) {
  method parseAlterTableAddColumn (line 96) | func (p *Parser) parseAlterTableAddColumn(pos Pos) (*AlterTableAddColumn...
  method parseAlterTableAddIndex (line 138) | func (p *Parser) parseAlterTableAddIndex(pos Pos) (*AlterTableAddIndex, ...
  method tryParseProjectionOrderBy (line 169) | func (p *Parser) tryParseProjectionOrderBy(pos Pos) (*ProjectionOrderByC...
  method parseProjectionSelect (line 186) | func (p *Parser) parseProjectionSelect(pos Pos) (*ProjectionSelectStmt, ...
  method parseTableProjection (line 224) | func (p *Parser) parseTableProjection(pos Pos, includeProjectionKeyword ...
  method parseAlterTableAddProjection (line 246) | func (p *Parser) parseAlterTableAddProjection(pos Pos) (*AlterTableAddPr...
  method parseTableIndex (line 276) | func (p *Parser) parseTableIndex(pos Pos) (*TableIndex, error) {
  method parseAlterTableDrop (line 312) | func (p *Parser) parseAlterTableDrop(pos Pos) (AlterTableClause, error) {
  method parseAlterTableDetachPartition (line 328) | func (p *Parser) parseAlterTableDetachPartition(pos Pos) (AlterTableClau...
  method tryParsePartitionClause (line 354) | func (p *Parser) tryParsePartitionClause(pos Pos) (*PartitionClause, err...
  method parsePartitionClause (line 361) | func (p *Parser) parsePartitionClause(pos Pos) (*PartitionClause, error) {
  method parseAlterTableAttachPartition (line 388) | func (p *Parser) parseAlterTableAttachPartition(pos Pos) (AlterTableClau...
  method parseAlterTableDropClause (line 410) | func (p *Parser) parseAlterTableDropClause(pos Pos) (AlterTableClause, e...
  method tryParseAfterClause (line 455) | func (p *Parser) tryParseAfterClause() (*NestedIdentifier, error) {
  method parseAlterTableDropPartition (line 464) | func (p *Parser) parseAlterTableDropPartition(pos Pos) (AlterTableClause...
  method parseAlterTableFreezePartition (line 496) | func (p *Parser) parseAlterTableFreezePartition(pos Pos) (AlterTableClau...
  method parseAlterTableRemoveTTL (line 516) | func (p *Parser) parseAlterTableRemoveTTL(pos Pos) (AlterTableClause, er...
  method parseAlterTableClear (line 531) | func (p *Parser) parseAlterTableClear(pos Pos) (AlterTableClause, error) {
  method parseAlterTableClearClause (line 539) | func (p *Parser) parseAlterTableClearClause(pos Pos) (AlterTableClause, ...
  method parseAlterTableRenameColumn (line 603) | func (p *Parser) parseAlterTableRenameColumn(pos Pos) (AlterTableClause,...
  method parseAlterTableModify (line 639) | func (p *Parser) parseAlterTableModify(pos Pos) (AlterTableClause, error) {
  method parseAlterTableModifyColumn (line 700) | func (p *Parser) parseAlterTableModifyColumn(pos Pos) (AlterTableClause,...
  method tryParseRemovePropertyTypeExpr (line 733) | func (p *Parser) tryParseRemovePropertyTypeExpr(pos Pos) (*RemovePropert...
  method parseAlterTableReplacePartition (line 753) | func (p *Parser) parseAlterTableReplacePartition(pos Pos) (AlterTableCla...
  method parseAlterTableMaterialize (line 779) | func (p *Parser) parseAlterTableMaterialize(pos Pos) (AlterTableClause, ...
  method parseAlterTableReset (line 829) | func (p *Parser) parseAlterTableReset(pos Pos) (AlterTableClause, error) {
  method parseAlterTableDelete (line 864) | func (p *Parser) parseAlterTableDelete(pos Pos) (AlterTableClause, error) {
  method parseAlterTableUpdate (line 886) | func (p *Parser) parseAlterTableUpdate(pos Pos) (AlterTableClause, error) {
  method parseUpdateAssignment (line 934) | func (p *Parser) parseUpdateAssignment(pos Pos) (*UpdateAssignment, erro...

FILE: parser/parser_column.go
  constant PrecedenceUnknown (line 9) | PrecedenceUnknown = iota
  constant PrecedenceOr (line 10) | PrecedenceOr
  constant PrecedenceAnd (line 11) | PrecedenceAnd
  constant PrecedenceQuery (line 12) | PrecedenceQuery
  constant PrecedenceNot (line 13) | PrecedenceNot
  constant PrecedenceGlobal (line 14) | PrecedenceGlobal
  constant PrecedenceIs (line 15) | PrecedenceIs
  constant PrecedenceCompare (line 16) | PrecedenceCompare
  constant PrecedenceBetweenLike (line 17) | PrecedenceBetweenLike
  constant precedenceIn (line 18) | precedenceIn
  constant PrecedenceConcat (line 19) | PrecedenceConcat
  constant PrecedenceAddSub (line 20) | PrecedenceAddSub
  constant PrecedenceMulDivMod (line 21) | PrecedenceMulDivMod
  constant PrecedenceBracket (line 22) | PrecedenceBracket
  constant PrecedenceArrow (line 23) | PrecedenceArrow
  constant PrecedenceDot (line 24) | PrecedenceDot
  constant PrecedenceDoubleColon (line 25) | PrecedenceDoubleColon
  method tryParseColumnComment (line 28) | func (p *Parser) tryParseColumnComment(pos Pos) (*StringLiteral, error) {
  method getNextPrecedence (line 35) | func (p *Parser) getNextPrecedence() int {
  method parseInfix (line 80) | func (p *Parser) parseInfix(expr Expr, precedence int) (Expr, error) {
  method parseExpr (line 222) | func (p *Parser) parseExpr(pos Pos) (Expr, error) {
  method parseSubExpr (line 226) | func (p *Parser) parseSubExpr(pos Pos, precedence int) (Expr, error) {
  method parseTernaryExpr (line 245) | func (p *Parser) parseTernaryExpr(condition Expr) (*TernaryOperation, er...
  method parseExtractFrom (line 267) | func (p *Parser) parseExtractFrom(ident *Ident) (*IntervalFrom, error) {
  method parseColumnExtractExpr (line 284) | func (p *Parser) parseColumnExtractExpr(pos Pos) (*ExtractExpr, error) {
  method parseUnaryExpr (line 334) | func (p *Parser) parseUnaryExpr(pos Pos) (Expr, error) {
  method peekTokenKind (line 358) | func (p *Parser) peekTokenKind(kind TokenKind) bool {
  method peekKeyword (line 369) | func (p *Parser) peekKeyword(keyword string) bool {
  method isSelectItemTerminatorKeyword (line 383) | func (p *Parser) isSelectItemTerminatorKeyword() bool {
  method parseColumnExpr (line 416) | func (p *Parser) parseColumnExpr(pos Pos) (Expr, error) { //nolint:funlen
  method parseColumnCastExpr (line 484) | func (p *Parser) parseColumnCastExpr(pos Pos) (Expr, error) {
  method parseColumnExprListWithLParen (line 533) | func (p *Parser) parseColumnExprListWithLParen(pos Pos) (*ColumnExprList...
  method parseColumnExprListWithSquareBracket (line 537) | func (p *Parser) parseColumnExprListWithSquareBracket(pos Pos) (*ColumnE...
  method parseColumnExprList (line 541) | func (p *Parser) parseColumnExprList(pos Pos) (*ColumnExprList, error) {
  method parseColumnExprListWithTerm (line 545) | func (p *Parser) parseColumnExprListWithTerm(term TokenKind, pos Pos) (*...
  method parseSelectItems (line 575) | func (p *Parser) parseSelectItems() ([]*SelectItem, error) {
  method parseInterval (line 593) | func (p *Parser) parseInterval(requireKeyword bool) (*IntervalExpr, erro...
  method parseFunctionExpr (line 620) | func (p *Parser) parseFunctionExpr(_ Pos) (*FunctionExpr, error) {
  method parseColumnArgList (line 637) | func (p *Parser) parseColumnArgList(pos Pos) (*ColumnArgList, error) {
  method parseFunctionParams (line 666) | func (p *Parser) parseFunctionParams(pos Pos) (*ParamExprList, error) {
  method parseMapLiteral (line 697) | func (p *Parser) parseMapLiteral(pos Pos) (*MapLiteral, error) {
  method parseQueryParam (line 734) | func (p *Parser) parseQueryParam(pos Pos) (*QueryParam, error) {
  method parseArrayParams (line 762) | func (p *Parser) parseArrayParams(pos Pos) (*ArrayParamList, error) {
  method parseColumnsExpr (line 781) | func (p *Parser) parseColumnsExpr(pos Pos) (*ColumnExpr, error) {
  method parseSelectItem (line 800) | func (p *Parser) parseSelectItem() (*SelectItem, error) {
  method parseColumnCaseExpr (line 842) | func (p *Parser) parseColumnCaseExpr(pos Pos) (*CaseExpr, error) {
  method parseColumnType (line 904) | func (p *Parser) parseColumnType(_ Pos) (ColumnType, error) {
  method parseColumnTypeArgs (line 913) | func (p *Parser) parseColumnTypeArgs(ident *Ident) (ColumnType, error) {...
  method parseColumnPropertyType (line 954) | func (p *Parser) parseColumnPropertyType(_ Pos) (Expr, error) {
  method parseComplexType (line 964) | func (p *Parser) parseComplexType(name *Ident, pos Pos) (*ComplexType, e...
  method parseEnumType (line 988) | func (p *Parser) parseEnumType(name *Ident, pos Pos) (*EnumType, error) {
  method parseColumnTypeWithParams (line 1016) | func (p *Parser) parseColumnTypeWithParams(name *Ident, pos Pos) (*TypeW...
  method parseJSONPath (line 1043) | func (p *Parser) parseJSONPath() (*JSONPath, error) {
  method parseJSONMaxDynamicOptions (line 1063) | func (p *Parser) parseJSONMaxDynamicOptions(pos Pos) (*JSONOption, error) {
  method parseJSONOption (line 1091) | func (p *Parser) parseJSONOption() (*JSONOption, error) {
  method parseJSONType (line 1161) | func (p *Parser) parseJSONType(name *Ident, pos Pos) (*JSONType, error) {
  method parseNestedType (line 1192) | func (p *Parser) parseNestedType(name *Ident, pos Pos) (*NestedType, err...
  method parseNestedTypeFields (line 1210) | func (p *Parser) parseNestedTypeFields() ([]Expr, error) {
  method parseNestedTypeFieldsWithNames (line 1233) | func (p *Parser) parseNestedTypeFieldsWithNames(columnName *Ident) ([]Ex...
  method parseNestedTypeFieldsWithoutNames (line 1272) | func (p *Parser) parseNestedTypeFieldsWithoutNames(columnType *Ident) ([...
  method parseNestedTypeFieldWithName (line 1304) | func (p *Parser) parseNestedTypeFieldWithName() (Expr, error) {
  method tryParseCompressionCodecs (line 1325) | func (p *Parser) tryParseCompressionCodecs(pos Pos) (*CompressionCodec, ...
  method parseEnumValueExpr (line 1410) | func (p *Parser) parseEnumValueExpr(pos Pos) (*EnumValue, error) {
  method parseColumnStar (line 1430) | func (p *Parser) parseColumnStar(pos Pos) (*Ident, error) {
  method tryParseCompressionLevel (line 1441) | func (p *Parser) tryParseCompressionLevel(pos Pos) (*NumberLiteral, erro...

FILE: parser/parser_common.go
  type Parser (line 9) | type Parser struct
    method lastTokenKind (line 19) | func (p *Parser) lastTokenKind() TokenKind {
    method last (line 26) | func (p *Parser) last() *Token {
    method End (line 30) | func (p *Parser) End() Pos {
    method Pos (line 37) | func (p *Parser) Pos() Pos {
    method matchTokenKind (line 45) | func (p *Parser) matchTokenKind(kind TokenKind) bool {
    method expectTokenKind (line 51) | func (p *Parser) expectTokenKind(kind TokenKind) error {
    method tryConsumeTokenKind (line 58) | func (p *Parser) tryConsumeTokenKind(kind TokenKind) *Token {
    method matchKeyword (line 67) | func (p *Parser) matchKeyword(keyword string) bool {
    method matchOneOfKeywords (line 71) | func (p *Parser) matchOneOfKeywords(keywords ...string) bool {
    method expectKeyword (line 80) | func (p *Parser) expectKeyword(keyword string) error {
    method tryConsumeKeywords (line 88) | func (p *Parser) tryConsumeKeywords(keywords ...string) bool {
    method tryParseIdent (line 100) | func (p *Parser) tryParseIdent() *Ident {
    method parseIdent (line 114) | func (p *Parser) parseIdent() (*Ident, error) {
    method parseIdentOrStar (line 128) | func (p *Parser) parseIdentOrStar() (*Ident, error) {
    method parseIdentOrString (line 145) | func (p *Parser) parseIdentOrString() (*Ident, error) {
    method tryParseDotIdent (line 163) | func (p *Parser) tryParseDotIdent(_ Pos) (*Ident, error) {
    method tryParseDotIdentOrString (line 170) | func (p *Parser) tryParseDotIdentOrString(_ Pos) (*Ident, error) {
    method parseUUID (line 177) | func (p *Parser) parseUUID() (*UUID, error) {
    method tryParseUUID (line 191) | func (p *Parser) tryParseUUID() (*UUID, error) {
    method tryParseComment (line 198) | func (p *Parser) tryParseComment() (*StringLiteral, error) {
    method tryParseIfExists (line 205) | func (p *Parser) tryParseIfExists() (bool, error) {
    method tryParseIfNotExists (line 216) | func (p *Parser) tryParseIfNotExists() (bool, error) {
    method tryParseNull (line 231) | func (p *Parser) tryParseNull(pos Pos) *NullLiteral {
    method tryParseNotNull (line 238) | func (p *Parser) tryParseNotNull(pos Pos) (*NotNullLiteral, error) {
    method parseDecimal (line 252) | func (p *Parser) parseDecimal(pos Pos) (*NumberLiteral, error) {
    method parseNumber (line 263) | func (p *Parser) parseNumber(pos Pos) (*NumberLiteral, error) {
    method parseString (line 298) | func (p *Parser) parseString(pos Pos) (*StringLiteral, error) {
    method parseLiteral (line 312) | func (p *Parser) parseLiteral(pos Pos) (Literal, error) {
    method ParseNestedIdentifier (line 328) | func (p *Parser) ParseNestedIdentifier(pos Pos) (*NestedIdentifier, er...
    method tryParseFormat (line 348) | func (p *Parser) tryParseFormat(pos Pos) (*FormatClause, error) {
    method parseFormat (line 355) | func (p *Parser) parseFormat(pos Pos) (*FormatClause, error) {
    method wrapError (line 369) | func (p *Parser) wrapError(err error) error {
    method parseRatioExpr (line 407) | func (p *Parser) parseRatioExpr(pos Pos) (*RatioExpr, error) {
  function NewParser (line 13) | func NewParser(buffer string) *Parser {

FILE: parser/parser_drop.go
  method parseDropDatabase (line 3) | func (p *Parser) parseDropDatabase(pos Pos) (*DropDatabase, error) {
  method parseDropStmt (line 37) | func (p *Parser) parseDropStmt(pos Pos) (*DropStmt, error) {
  method tryParseModifier (line 84) | func (p *Parser) tryParseModifier() (string, error) {

FILE: parser/parser_query.go
  method tryParseWithClause (line 10) | func (p *Parser) tryParseWithClause(pos Pos) (*WithClause, error) {
  method parseWithClause (line 17) | func (p *Parser) parseWithClause(pos Pos) (*WithClause, error) {
  method tryParseTopClause (line 42) | func (p *Parser) tryParseTopClause(pos Pos) (*TopClause, error) {
  method parseTopClause (line 49) | func (p *Parser) parseTopClause(pos Pos) (*TopClause, error) {
  method tryParseDistinctOn (line 76) | func (p *Parser) tryParseDistinctOn(pos Pos) (*DistinctOn, error) {
  method parseDistinctOn (line 83) | func (p *Parser) parseDistinctOn(pos Pos) (*DistinctOn, error) {
  method tryParseFromClause (line 119) | func (p *Parser) tryParseFromClause(pos Pos) (*FromClause, error) {
  method parseFromClause (line 126) | func (p *Parser) parseFromClause(pos Pos) (*FromClause, error) {
  method tryParseJoinConstraints (line 141) | func (p *Parser) tryParseJoinConstraints(pos Pos) (Expr, error) {
  method parseJoinOp (line 171) | func (p *Parser) parseJoinOp(_ Pos) []string {
  method parseJoinTableExpr (line 249) | func (p *Parser) parseJoinTableExpr(_ Pos) (Expr, error) {
  method parseJoinRightExpr (line 282) | func (p *Parser) parseJoinRightExpr(pos Pos) (expr Expr, err error) {
  method parseJoinExpr (line 349) | func (p *Parser) parseJoinExpr(pos Pos) (expr Expr, err error) {
  method parseTableExpr (line 367) | func (p *Parser) parseTableExpr(pos Pos) (*TableExpr, error) {
  method tryParsePrewhereClause (line 445) | func (p *Parser) tryParsePrewhereClause(pos Pos) (*PrewhereClause, error) {
  method parsePrewhereClause (line 451) | func (p *Parser) parsePrewhereClause(pos Pos) (*PrewhereClause, error) {
  method tryParseWhereClause (line 466) | func (p *Parser) tryParseWhereClause(pos Pos) (*WhereClause, error) {
  method parseWhereClause (line 473) | func (p *Parser) parseWhereClause(pos Pos) (*WhereClause, error) {
  method tryParseGroupByClause (line 488) | func (p *Parser) tryParseGroupByClause(pos Pos) (*GroupByClause, error) {
  method parseGroupByClause (line 496) | func (p *Parser) parseGroupByClause(pos Pos) (*GroupByClause, error) {
  method tryParseLimitAfterLimitByClause (line 547) | func (p *Parser) tryParseLimitAfterLimitByClause(pos Pos) (*LimitClause,...
  method tryParseLimitClause (line 555) | func (p *Parser) tryParseLimitClause(pos Pos) (*LimitClause, error) {
  method parseLimitClause (line 563) | func (p *Parser) parseLimitClause(pos Pos) (*LimitClause, error) {
  method tryParseLimitByClause (line 594) | func (p *Parser) tryParseLimitByClause(pos Pos) (Expr, error) {
  method parseBetweenClause (line 601) | func (p *Parser) parseBetweenClause(expr Expr) (*BetweenClause, error) {
  method parseLimitByClause (line 629) | func (p *Parser) parseLimitByClause(pos Pos) (Expr, error) {
  method tryParseWindowFrameClause (line 648) | func (p *Parser) tryParseWindowFrameClause(pos Pos) (*WindowFrameClause,...
  method parseWindowFrameClause (line 655) | func (p *Parser) parseWindowFrameClause(pos Pos) (*WindowFrameClause, er...
  method parseFrameExtent (line 700) | func (p *Parser) parseFrameExtent() (Expr, error) {
  method parseFrameCurrentRow (line 717) | func (p *Parser) parseFrameCurrentRow() (Expr, error) {
  method parseFrameUnbounded (line 730) | func (p *Parser) parseFrameUnbounded() (Expr, error) {
  method parseFrameNumber (line 744) | func (p *Parser) parseFrameNumber() (Expr, error) {
  method parseFrameParam (line 761) | func (p *Parser) parseFrameParam() (Expr, error) {
  method parseFrameInterval (line 778) | func (p *Parser) parseFrameInterval() (Expr, error) {
  method parseFrameDirection (line 795) | func (p *Parser) parseFrameDirection() (string, error) {
  method parseFrameDirectionWithEnd (line 806) | func (p *Parser) parseFrameDirectionWithEnd() (string, Pos, error) {
  method tryParseWindowClause (line 816) | func (p *Parser) tryParseWindowClause(pos Pos) (*WindowClause, error) {
  method parseWindowCondition (line 823) | func (p *Parser) parseWindowCondition(pos Pos) (*WindowExpr, error) {
  method canParseWindowNameInParens (line 861) | func (p *Parser) canParseWindowNameInParens() bool {
  method parseWindowClause (line 889) | func (p *Parser) parseWindowClause(pos Pos) (*WindowClause, error) {
  method tryParseHavingClause (line 934) | func (p *Parser) tryParseHavingClause(pos Pos) (*HavingClause, error) {
  method parseHavingClause (line 941) | func (p *Parser) parseHavingClause(pos Pos) (*HavingClause, error) {
  method parseSubQuery (line 957) | func (p *Parser) parseSubQuery(_ Pos) (*SubQuery, error) {
  method parseSelectQuery (line 977) | func (p *Parser) parseSelectQuery(_ Pos) (*SelectQuery, error) {
  method parseSelectStmt (line 1020) | func (p *Parser) parseSelectStmt(pos Pos) (*SelectQuery, error) { // nol...
  method parseCTEStmt (line 1178) | func (p *Parser) parseCTEStmt(pos Pos) (*CTEStmt, error) {
  method tryParseSampleClause (line 1209) | func (p *Parser) tryParseSampleClause(pos Pos) (*SampleClause, error) {
  method parseSampleClause (line 1216) | func (p *Parser) parseSampleClause(pos Pos) (*SampleClause, error) {
  method parseExplainStmt (line 1241) | func (p *Parser) parseExplainStmt(pos Pos) (*ExplainStmt, error) {

FILE: parser/parser_table.go
  method parseDDL (line 8) | func (p *Parser) parseDDL(pos Pos) (DDL, error) {
  method parseCreateDatabase (line 78) | func (p *Parser) parseCreateDatabase(pos Pos) (*CreateDatabase, error) {
  method parseCreateDictionary (line 123) | func (p *Parser) parseCreateDictionary(pos Pos, orReplace bool) (*Create...
  method parseCreateNamedCollection (line 189) | func (p *Parser) parseCreateNamedCollection(pos Pos) (*CreateNamedCollec...
  method parseNamedCollectionParam (line 255) | func (p *Parser) parseNamedCollectionParam(pos Pos) (*NamedCollectionPar...
  method parseCreateTable (line 309) | func (p *Parser) parseCreateTable(pos Pos, orReplace bool) (*CreateTable...
  method parseIdentOrFunction (line 402) | func (p *Parser) parseIdentOrFunction(_ Pos) (Expr, error) {
  method parseTableIdentifier (line 493) | func (p *Parser) parseTableIdentifier(_ Pos) (*TableIdentifier, error) {
  method parseTableSchemaClause (line 513) | func (p *Parser) parseTableSchemaClause(pos Pos) (*TableSchemaClause, er...
  method parseTableColumns (line 588) | func (p *Parser) parseTableColumns() ([]Expr, error) {
  method tryParseTableColumnExpr (line 643) | func (p *Parser) tryParseTableColumnExpr(pos Pos) (*ColumnDef, error) {
  method parseTableColumnExpr (line 650) | func (p *Parser) parseTableColumnExpr(pos Pos) (*ColumnDef, error) {
  method parseTableArgExpr (line 729) | func (p *Parser) parseTableArgExpr(pos Pos) (Expr, error) {
  method parseTableArgList (line 768) | func (p *Parser) parseTableArgList(pos Pos) (*TableArgListExpr, error) {
  method tryParseClusterClause (line 842) | func (p *Parser) tryParseClusterClause(pos Pos) (*ClusterClause, error) {
  method tryParsePartitionByClause (line 869) | func (p *Parser) tryParsePartitionByClause(pos Pos) (*PartitionByClause,...
  method tryParsePrimaryKeyClause (line 889) | func (p *Parser) tryParsePrimaryKeyClause(pos Pos) (*PrimaryKeyClause, e...
  method tryParseOrderByClause (line 909) | func (p *Parser) tryParseOrderByClause(pos Pos) (*OrderByClause, error) {
  method parseOrderByClause (line 920) | func (p *Parser) parseOrderByClause(pos Pos) (*OrderByClause, error) {
  method parseOrderExpr (line 957) | func (p *Parser) parseOrderExpr(pos Pos) (*OrderExpr, error) {
  method parseFillClause (line 1015) | func (p *Parser) parseFillClause(fillPos Pos) (*Fill, error) {
  method parseInterpolateClause (line 1057) | func (p *Parser) parseInterpolateClause(interpolatePos Pos) (*Interpolat...
  method tryParseTTLClause (line 1103) | func (p *Parser) tryParseTTLClause(pos Pos, allowMultiValues bool) (*TTL...
  method parseTTLClause (line 1122) | func (p *Parser) parseTTLClause(pos Pos, allowMultiValues bool) ([]*TTLE...
  method tryParseTTLPolicy (line 1139) | func (p *Parser) tryParseTTLPolicy(pos Pos) (*TTLPolicy, error) {
  method parseTTLExpr (line 1191) | func (p *Parser) parseTTLExpr(pos Pos) (*TTLExpr, error) {
  method tryParseSampleByClause (line 1207) | func (p *Parser) tryParseSampleByClause(pos Pos) (*SampleByClause, error) {
  method tryParseSettingsClause (line 1227) | func (p *Parser) tryParseSettingsClause(pos Pos) (*SettingsClause, error) {
  method parseSettingsClause (line 1234) | func (p *Parser) parseSettingsClause(pos Pos) (*SettingsClause, error) {
  method parseSettingsList (line 1249) | func (p *Parser) parseSettingsList(pos Pos) ([]*SettingExpr, error) {
  method parseSettingsExpr (line 1266) | func (p *Parser) parseSettingsExpr(pos Pos) (*SettingExpr, error) {
  method parseDestinationClause (line 1316) | func (p *Parser) parseDestinationClause(pos Pos) (*DestinationClause, er...
  method tryParseEngineExpr (line 1331) | func (p *Parser) tryParseEngineExpr(pos Pos) (*EngineExpr, error) {
  method parseEngineExpr (line 1338) | func (p *Parser) parseEngineExpr(pos Pos) (*EngineExpr, error) {
  method parseStmt (line 1419) | func (p *Parser) parseStmt(pos Pos) (Expr, error) {
  method ParseStmts (line 1478) | func (p *Parser) ParseStmts() ([]Expr, error) {
  method parseUseStmt (line 1499) | func (p *Parser) parseUseStmt(pos Pos) (*UseStmt, error) {
  method parseShowStmt (line 1516) | func (p *Parser) parseShowStmt(pos Pos) (*ShowStmt, error) {
  method parseDescribeStmt (line 1643) | func (p *Parser) parseDescribeStmt(pos Pos) (*DescribeStmt, error) {
  method parseTruncateTable (line 1671) | func (p *Parser) parseTruncateTable(pos Pos) (*TruncateTable, error) {
  method parseDeleteClause (line 1713) | func (p *Parser) parseDeleteClause(pos Pos) (*DeleteClause, error) {
  method parseColumnNamesExpr (line 1745) | func (p *Parser) parseColumnNamesExpr(pos Pos) (*ColumnNamesExpr, error) {
  method parseTypedPlaceholder (line 1773) | func (p *Parser) parseTypedPlaceholder(pos Pos) (Expr, error) {
  method parseAssignmentValues (line 1801) | func (p *Parser) parseAssignmentValues(pos Pos) (*AssignmentValues, erro...
  method parseInsertStmt (line 1839) | func (p *Parser) parseInsertStmt(pos Pos) (*InsertStmt, error) {
  method parseRenameStmt (line 1900) | func (p *Parser) parseRenameStmt(pos Pos) (*RenameStmt, error) {
  method parseTargetPair (line 1950) | func (p *Parser) parseTargetPair(_ Pos) (*TargetPair, error) {
  method parseCreateFunction (line 1969) | func (p *Parser) parseCreateFunction(pos Pos, orReplace bool) (*CreateFu...
  method parseDictionarySchemaClause (line 2012) | func (p *Parser) parseDictionarySchemaClause(pos Pos) (*DictionarySchema...
  method parseDictionaryAttribute (line 2046) | func (p *Parser) parseDictionaryAttribute(pos Pos) (*DictionaryAttribute...
  method parseDictionaryEngineClause (line 2106) | func (p *Parser) parseDictionaryEngineClause(pos Pos) (*DictionaryEngine...
  method parseDictionaryPrimaryKeyClause (line 2178) | func (p *Parser) parseDictionaryPrimaryKeyClause(pos Pos) (*DictionaryPr...
  method parseDictionarySourceClause (line 2198) | func (p *Parser) parseDictionarySourceClause(pos Pos) (*DictionarySource...
  method parseDictionaryArgExpr (line 2248) | func (p *Parser) parseDictionaryArgExpr(pos Pos) (*DictionaryArgExpr, er...
  method parseDictionaryLifetimeClause (line 2297) | func (p *Parser) parseDictionaryLifetimeClause(pos Pos) (*DictionaryLife...
  method parseDictionaryLayoutClause (line 2361) | func (p *Parser) parseDictionaryLayoutClause(pos Pos) (*DictionaryLayout...
  method parseDictionaryRangeClause (line 2411) | func (p *Parser) parseDictionaryRangeClause(pos Pos) (*DictionaryRangeCl...
  method parseDictionarySettingsClause (line 2472) | func (p *Parser) parseDictionarySettingsClause(pos Pos) (*SettingsClause...

FILE: parser/parser_test.go
  function TestParser_Compatible (line 17) | func TestParser_Compatible(t *testing.T) {
  function TestParser_ParseStatements (line 44) | func TestParser_ParseStatements(t *testing.T) {
  function TestParser_Format (line 74) | func TestParser_Format(t *testing.T) {
  function TestParser_FormatBeautify (line 117) | func TestParser_FormatBeautify(t *testing.T) {
  function validFormatSQL (line 160) | func validFormatSQL(t *testing.T, sql string) {
  function TestParser_InvalidSyntax (line 173) | func TestParser_InvalidSyntax(t *testing.T) {

FILE: parser/parser_view.go
  method parseCreateMaterializedView (line 19) | func (p *Parser) parseCreateMaterializedView(pos Pos) (*CreateMaterializ...
  method tryParseRefreshExpr (line 173) | func (p *Parser) tryParseRefreshExpr(pos Pos) (*RefreshExpr, error) {
  method parseCreateView (line 205) | func (p *Parser) parseCreateView(pos Pos, orReplace bool) (*CreateView, ...
  method parseCreateLiveView (line 265) | func (p *Parser) parseCreateLiveView(pos Pos) (*CreateLiveView, error) {
  method tryParseWithTimeout (line 335) | func (p *Parser) tryParseWithTimeout(pos Pos) (*WithTimeoutClause, error) {

FILE: parser/set.go
  type Set (line 3) | type Set struct
  function NewSet (line 7) | func NewSet[T comparable](members ...T) *Set[T] {
  method Add (line 15) | func (s *Set[T]) Add(member T) {
  method Remove (line 19) | func (s *Set[T]) Remove(member T) {
  method Contains (line 23) | func (s *Set[T]) Contains(member T) bool {
  method Members (line 28) | func (s *Set[T]) Members() []T {

FILE: parser/set_test.go
  function TestSet (line 9) | func TestSet(t *testing.T) {

FILE: parser/testdata/ddl/create_dictionary_basic.sql
  type LIFETIME (line 1) | CREATE DICTIONARY test.my_dict (

FILE: parser/testdata/ddl/create_dictionary_with_comment.sql
  type LIFETIME (line 1) | CREATE DICTIONARY test.my_dict (

FILE: parser/testdata/ddl/create_distributed_table.sql
  type test (line 1) | create table test.event_all

FILE: parser/testdata/ddl/create_live_view_basic.sql
  type my_live_view (line 1) | CREATE LIVE VIEW my_live_view

FILE: parser/testdata/ddl/create_or_replace.sql
  type my_view (line 17) | CREATE OR REPLACE VIEW IF NOT EXISTS my_view(col1 String, col2 String)

FILE: parser/testdata/ddl/create_table_as_remote_function.sql
  type test_remote (line 2) | CREATE TABLE test_remote
  type test_table (line 11) | CREATE TABLE test_table (id UInt64, name String)

FILE: parser/testdata/ddl/create_table_basic.sql
  type test (line 6) | CREATE TABLE IF NOT EXISTS test.events_local (

FILE: parser/testdata/ddl/create_table_codec_no_args.sql
  type shark_attacks (line 1) | CREATE TABLE shark_attacks (

FILE: parser/testdata/ddl/create_table_json_typehints.sql
  type t (line 1) | CREATE TABLE t (

FILE: parser/testdata/ddl/create_table_with_codec_delta.sql
  type test_local (line 1) | CREATE TABLE IF NOT EXISTS test_local

FILE: parser/testdata/ddl/create_table_with_enum_fields.sql
  type t0 (line 1) | CREATE TABLE t0 on cluster default_cluster

FILE: parser/testdata/ddl/create_table_with_index.sql
  type test_local (line 1) | CREATE TABLE IF NOT EXISTS test_local

FILE: parser/testdata/ddl/create_table_with_keyword_partition_by.sql
  type test (line 1) | CREATE TABLE test.events_local UUID 'dad17568-b070-49d0-9ad1-7568b07029d...

FILE: parser/testdata/ddl/create_table_with_nullable.sql
  type test (line 1) | CREATE TABLE test.`.inner.752391fb-44cc-4dd5-b523-91fb44cc9dd5`

FILE: parser/testdata/ddl/create_table_with_on_clsuter.sql
  type test (line 1) | CREATE TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster' (

FILE: parser/testdata/ddl/create_table_with_projection.sql
  type events (line 1) | CREATE TABLE events

FILE: parser/testdata/ddl/create_table_with_projection_group_by_only.sql
  type events (line 1) | CREATE TABLE events

FILE: parser/testdata/ddl/create_table_with_qbit.sql
  type test (line 1) | CREATE TABLE test.qbit_example (

FILE: parser/testdata/ddl/create_table_with_sample_by.sql
  type default (line 1) | CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e'

FILE: parser/testdata/ddl/create_table_with_ttl_policy.sql
  type tab (line 1) | CREATE TABLE tab
  type table_with_where (line 14) | CREATE TABLE table_with_where
  type table_for_recompression (line 24) | CREATE TABLE table_for_recompression

FILE: parser/testdata/ddl/create_table_with_tuple_fields.sql
  type t0 (line 1) | CREATE TABLE t0 on cluster default_cluster

FILE: parser/testdata/ddl/create_table_with_uuid.sql
  type test (line 1) | CREATE TABLE IF NOT EXISTS test.events_local UUID '1234' ON CLUSTER 'def...

FILE: parser/testdata/ddl/create_view_basic.sql
  type my_view (line 1) | CREATE VIEW IF NOT EXISTS my_view(col1 String, col2 String)

FILE: parser/testdata/ddl/create_view_on_cluster_with_uuid.sql
  type cluster_name (line 1) | CREATE VIEW IF NOT EXISTS cluster_name.my_view

FILE: parser/testdata/ddl/create_view_with_comment.sql
  type db (line 1) | CREATE VIEW IF NOT EXISTS db.my_view

FILE: parser/testdata/ddl/create_with_time_zone.sql
  type test (line 1) | CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster

FILE: parser/testdata/ddl/format/beautify/attach_table_basic.sql
  type test (line 17) | CREATE TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster'

FILE: parser/testdata/ddl/format/beautify/create_dictionary_basic.sql
  type LIFETIME (line 2) | CREATE DICTIONARY test.my_dict (

FILE: parser/testdata/ddl/format/beautify/create_dictionary_with_comment.sql
  type LIFETIME (line 2) | CREATE DICTIONARY test.my_dict (

FILE: parser/testdata/ddl/format/beautify/create_distributed_table.sql
  type test (line 2) | create table test.event_all
  type test (line 14) | CREATE TABLE test.event_all ON CLUSTER 'default_cluster'

FILE: parser/testdata/ddl/format/beautify/create_live_view_basic.sql
  type my_live_view (line 2) | CREATE LIVE VIEW my_live_view
  type my_live_view (line 8) | CREATE LIVE VIEW my_live_view

FILE: parser/testdata/ddl/format/beautify/create_or_replace.sql
  type my_view (line 18) | CREATE OR REPLACE VIEW IF NOT EXISTS my_view(col1 String, col2 String)
  type test (line 26) | CREATE OR REPLACE FUNCTION IF NOT EXISTS my_function AS (x, y) -> x + y;
  type my_view (line 42) | CREATE OR REPLACE VIEW IF NOT EXISTS my_view (

FILE: parser/testdata/ddl/format/beautify/create_table_as_remote_function.sql
  type test_remote (line 3) | CREATE TABLE test_remote
  type test_table (line 12) | CREATE TABLE test_table (id UInt64, name String)
  type test_remote (line 16) | CREATE TABLE test_remote
  type test_table (line 23) | CREATE TABLE test_table

FILE: parser/testdata/ddl/format/beautify/create_table_basic.sql
  type test (line 7) | CREATE TABLE IF NOT EXISTS test.events_local (
  type test (line 35) | CREATE TABLE IF NOT EXISTS test.events_local

FILE: parser/testdata/ddl/format/beautify/create_table_codec_no_args.sql
  type shark_attacks (line 2) | CREATE TABLE shark_attacks (
  type shark_attacks (line 7) | CREATE TABLE shark_attacks

FILE: parser/testdata/ddl/format/beautify/create_table_json_typehints.sql
  type t (line 2) | CREATE TABLE t (
  type t (line 11) | CREATE TABLE t

FILE: parser/testdata/ddl/format/beautify/create_table_with_codec_delta.sql
  type test_local (line 2) | CREATE TABLE IF NOT EXISTS test_local
  type test_local (line 21) | CREATE TABLE IF NOT EXISTS test_local

FILE: parser/testdata/ddl/format/beautify/create_table_with_enum_fields.sql
  type t0 (line 2) | CREATE TABLE t0 on cluster default_cluster
  type t0 (line 14) | CREATE TABLE t0 ON CLUSTER default_cluster

FILE: parser/testdata/ddl/format/beautify/create_table_with_index.sql
  type test_local (line 2) | CREATE TABLE IF NOT EXISTS test_local
  type test_local (line 27) | CREATE TABLE IF NOT EXISTS test_local

FILE: parser/testdata/ddl/format/beautify/create_table_with_keyword_partition_by.sql
  type test (line 2) | CREATE TABLE test.events_local UUID 'dad17568-b070-49d0-9ad1-7568b07029d...
  type test (line 13) | CREATE TABLE test.events_local UUID 'dad17568-b070-49d0-9ad1-7568b07029d0'

FILE: parser/testdata/ddl/format/beautify/create_table_with_nullable.sql
  type test (line 2) | CREATE TABLE test.`.inner.752391fb-44cc-4dd5-b523-91fb44cc9dd5`
  type test (line 18) | CREATE TABLE test.`.inner.752391fb-44cc-4dd5-b523-91fb44cc9dd5` UUID '27...

FILE: parser/testdata/ddl/format/beautify/create_table_with_on_clsuter.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster' (
  type test (line 17) | CREATE TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster'

FILE: parser/testdata/ddl/format/beautify/create_table_with_projection.sql
  type events (line 2) | CREATE TABLE events
  type events (line 19) | CREATE TABLE events

FILE: parser/testdata/ddl/format/beautify/create_table_with_projection_group_by_only.sql
  type events (line 2) | CREATE TABLE events
  type events (line 23) | CREATE TABLE events

FILE: parser/testdata/ddl/format/beautify/create_table_with_qbit.sql
  type test (line 2) | CREATE TABLE test.qbit_example (
  type test (line 9) | CREATE TABLE test.qbit_example

FILE: parser/testdata/ddl/format/beautify/create_table_with_sample_by.sql
  type default (line 2) | CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e'
  type default (line 15) | CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e'

FILE: parser/testdata/ddl/format/beautify/create_table_with_ttl_policy.sql
  type tab (line 2) | CREATE TABLE tab
  type table_with_where (line 15) | CREATE TABLE table_with_where
  type table_for_recompression (line 25) | CREATE TABLE table_for_recompression
  type tab (line 38) | CREATE TABLE tab
  type table_with_where (line 48) | CREATE TABLE table_with_where
  type table_for_recompression (line 59) | CREATE TABLE table_for_recompression

FILE: parser/testdata/ddl/format/beautify/create_table_with_tuple_fields.sql
  type t0 (line 2) | CREATE TABLE t0 on cluster default_cluster
  type t0 (line 15) | CREATE TABLE t0 ON CLUSTER default_cluster

FILE: parser/testdata/ddl/format/beautify/create_table_with_uuid.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.events_local UUID '1234' ON CLUSTER 'def...
  type test (line 17) | CREATE TABLE IF NOT EXISTS test.events_local UUID '1234' ON CLUSTER 'def...

FILE: parser/testdata/ddl/format/beautify/create_view_basic.sql
  type my_view (line 2) | CREATE VIEW IF NOT EXISTS my_view(col1 String, col2 String)
  type my_view (line 11) | CREATE VIEW IF NOT EXISTS my_view (

FILE: parser/testdata/ddl/format/beautify/create_view_on_cluster_with_uuid.sql
  type cluster_name (line 2) | CREATE VIEW IF NOT EXISTS cluster_name.my_view
  type cluster_name (line 14) | CREATE VIEW IF NOT EXISTS cluster_name.my_view UUID '3493e374-e2bb-481b-...

FILE: parser/testdata/ddl/format/beautify/create_view_with_comment.sql
  type db (line 2) | CREATE VIEW IF NOT EXISTS db.my_view
  type db (line 15) | CREATE VIEW IF NOT EXISTS db.my_view (

FILE: parser/testdata/ddl/format/beautify/create_with_time_zone.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster

FILE: parser/testdata/ddl/format/create_dictionary_basic.sql
  type LIFETIME (line 2) | CREATE DICTIONARY test.my_dict (
  type LIFETIME (line 24) | CREATE DICTIONARY test.my_dict (id UInt64, name String DEFAULT '', value...

FILE: parser/testdata/ddl/format/create_dictionary_with_comment.sql
  type LIFETIME (line 2) | CREATE DICTIONARY test.my_dict (
  type LIFETIME (line 26) | CREATE DICTIONARY test.my_dict (id UInt64, name String DEFAULT '', value...

FILE: parser/testdata/ddl/format/create_distributed_table.sql
  type test (line 2) | create table test.event_all
  type test (line 14) | CREATE TABLE test.event_all ON CLUSTER 'default_cluster'  AS test.evnets...

FILE: parser/testdata/ddl/format/create_live_view_basic.sql
  type my_live_view (line 2) | CREATE LIVE VIEW my_live_view
  type my_live_view (line 8) | CREATE LIVE VIEW my_live_view WITH TIMEOUT 10 TO my_destination (id Stri...

FILE: parser/testdata/ddl/format/create_or_replace.sql
  type my_view (line 18) | CREATE OR REPLACE VIEW IF NOT EXISTS my_view(col1 String, col2 String)
  type test (line 26) | CREATE OR REPLACE FUNCTION IF NOT EXISTS my_function AS (x, y) -> x + y;
  type my_view (line 30) | CREATE OR REPLACE VIEW IF NOT EXISTS my_view (col1 String, col2 String) ...

FILE: parser/testdata/ddl/format/create_table_as_remote_function.sql
  type test_remote (line 3) | CREATE TABLE test_remote
  type test_table (line 12) | CREATE TABLE test_table (id UInt64, name String)
  type test_remote (line 16) | CREATE TABLE test_remote (id UInt64, name String, value Int32)
  type test_table (line 17) | CREATE TABLE test_table (id UInt64, name String)

FILE: parser/testdata/ddl/format/create_table_basic.sql
  type test (line 7) | CREATE TABLE IF NOT EXISTS test.events_local (
  type test (line 35) | CREATE TABLE IF NOT EXISTS test.events_local (f0 String, f1 String CODEC...

FILE: parser/testdata/ddl/format/create_table_codec_no_args.sql
  type shark_attacks (line 2) | CREATE TABLE shark_attacks (
  type shark_attacks (line 7) | CREATE TABLE shark_attacks (timestamp DateTime CODEC(DoubleDelta)

FILE: parser/testdata/ddl/format/create_table_json_typehints.sql
  type t (line 2) | CREATE TABLE t (
  type t (line 11) | CREATE TABLE t (j JSON(max_dynamic_paths=0, message String, a.b UInt64, ...

FILE: parser/testdata/ddl/format/create_table_with_codec_delta.sql
  type test_local (line 2) | CREATE TABLE IF NOT EXISTS test_local
  type test_local (line 21) | CREATE TABLE IF NOT EXISTS test_local (`id` UInt64 CODEC(Delta, ZSTD(1))...

FILE: parser/testdata/ddl/format/create_table_with_enum_fields.sql
  type t0 (line 2) | CREATE TABLE t0 on cluster default_cluster
  type t0 (line 14) | CREATE TABLE t0 ON CLUSTER default_cluster (`method` Enum8('GET'=1, 'POS...

FILE: parser/testdata/ddl/format/create_table_with_index.sql
  type test_local (line 2) | CREATE TABLE IF NOT EXISTS test_local
  type test_local (line 27) | CREATE TABLE IF NOT EXISTS test_local (`common.id` String CODEC(ZSTD(1))...

FILE: parser/testdata/ddl/format/create_table_with_keyword_partition_by.sql
  type test (line 2) | CREATE TABLE test.events_local UUID 'dad17568-b070-49d0-9ad1-7568b07029d...
  type test (line 13) | CREATE TABLE test.events_local UUID 'dad17568-b070-49d0-9ad1-7568b07029d...

FILE: parser/testdata/ddl/format/create_table_with_nullable.sql
  type test (line 2) | CREATE TABLE test.`.inner.752391fb-44cc-4dd5-b523-91fb44cc9dd5`
  type test (line 18) | CREATE TABLE test.`.inner.752391fb-44cc-4dd5-b523-91fb44cc9dd5` UUID '27...

FILE: parser/testdata/ddl/format/create_table_with_on_clsuter.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster' (

FILE: parser/testdata/ddl/format/create_table_with_projection.sql
  type events (line 2) | CREATE TABLE events
  type events (line 19) | CREATE TABLE events (`event_time` DateTime, `event_id` UInt64, `user_id`...

FILE: parser/testdata/ddl/format/create_table_with_projection_group_by_only.sql
  type events (line 2) | CREATE TABLE events
  type events (line 23) | CREATE TABLE events (`event_time` DateTime, `event_type` String, `user_i...

FILE: parser/testdata/ddl/format/create_table_with_qbit.sql
  type test (line 2) | CREATE TABLE test.qbit_example (
  type test (line 9) | CREATE TABLE test.qbit_example (id UInt32, vec QBit(Float32, 8)) ENGINE ...

FILE: parser/testdata/ddl/format/create_table_with_sample_by.sql
  type default (line 2) | CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e'
  type default (line 15) | CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e' (`...

FILE: parser/testdata/ddl/format/create_table_with_ttl_policy.sql
  type tab (line 2) | CREATE TABLE tab
  type table_with_where (line 15) | CREATE TABLE table_with_where
  type table_for_recompression (line 25) | CREATE TABLE table_for_recompression
  type tab (line 38) | CREATE TABLE tab (d DateTime, a Int) ENGINE = MergeTree ORDER BY d PARTI...
  type table_with_where (line 39) | CREATE TABLE table_with_where (d DateTime, a Int) ENGINE = MergeTree ORD...
  type table_for_recompression (line 40) | CREATE TABLE table_for_recompression (d DateTime, key UInt64, value Stri...

FILE: parser/testdata/ddl/format/create_table_with_tuple_fields.sql
  type t0 (line 2) | CREATE TABLE t0 on cluster default_cluster
  type t0 (line 15) | CREATE TABLE t0 ON CLUSTER default_cluster (`tup0` Tuple(), `tup1` Tuple...

FILE: parser/testdata/ddl/format/create_table_with_uuid.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.events_local UUID '1234' ON CLUSTER 'def...

FILE: parser/testdata/ddl/format/create_view_basic.sql
  type my_view (line 2) | CREATE VIEW IF NOT EXISTS my_view(col1 String, col2 String)
  type my_view (line 11) | CREATE VIEW IF NOT EXISTS my_view (col1 String, col2 String) AS SELECT i...

FILE: parser/testdata/ddl/format/create_view_on_cluster_with_uuid.sql
  type cluster_name (line 2) | CREATE VIEW IF NOT EXISTS cluster_name.my_view
  type cluster_name (line 14) | CREATE VIEW IF NOT EXISTS cluster_name.my_view UUID '3493e374-e2bb-481b-...

FILE: parser/testdata/ddl/format/create_view_with_comment.sql
  type db (line 2) | CREATE VIEW IF NOT EXISTS db.my_view
  type db (line 15) | CREATE VIEW IF NOT EXISTS db.my_view (`id` Int64, `name` String) COMMENT...

FILE: parser/testdata/ddl/format/create_with_time_zone.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster

FILE: parser/testdata/dml/create_column_with_ttl.sql
  type example1 (line 1) | CREATE TABLE example1 (

FILE: parser/testdata/dml/format/beautify/create_column_with_ttl.sql
  type example1 (line 2) | CREATE TABLE example1 (

FILE: parser/testdata/dml/format/create_column_with_ttl.sql
  type example1 (line 2) | CREATE TABLE example1 (

FILE: parser/testdata/query/compatible/1_stateful/00022_merge_prewhere.sql
  type test (line 2) | CREATE TABLE IF NOT EXISTS test.merge_hits AS test.hits ENGINE = Merge(t...

FILE: parser/testdata/query/compatible/1_stateful/00041_aggregating_materialized_view.sql
  type test (line 4) | CREATE TABLE test.visits_null

FILE: parser/testdata/query/compatible/1_stateful/00054_merge_tree_partitions.sql
  type test (line 3) | CREATE TABLE test.partitions (EventDate Date, CounterID UInt32) ENGINE =...

FILE: parser/testdata/query/compatible/1_stateful/00056_view.sql
  type test (line 2) | CREATE VIEW test.view AS SELECT CounterID, count() AS c FROM test.hits G...

FILE: parser/testdata/query/compatible/1_stateful/00061_storage_buffer.sql
  type test (line 5) | CREATE TABLE test.hits_buffer AS test.hits_dst ENGINE = Buffer(test, hit...

FILE: parser/testdata/query/compatible/1_stateful/00065_loyalty_with_storage_join.sql
  type join (line 4) | CREATE TABLE join (UserID UInt64, loyalty Int8) ENGINE = Join

FILE: parser/testdata/query/compatible/1_stateful/00071_merge_tree_optimize_aio.sql
  type test (line 4) | CREATE TABLE test.hits_snippet(EventTime DateTime('Asia/Dubai'),  EventD...

FILE: parser/testdata/query/compatible/1_stateful/00072_compare_date_and_string_index.sql
  type test (line 18) | CREATE TABLE test.hits_indexed_by_time (EventDate Date, EventTime DateTi...

FILE: parser/testdata/query/compatible/1_stateful/00077_log_tinylog_stripelog.sql
  type test (line 7) | CREATE TABLE test.hits_log (CounterID UInt32, AdvEngineID UInt8, RegionI...
  type test (line 8) | CREATE TABLE test.hits_tinylog (CounterID UInt32, AdvEngineID UInt8, Reg...
  type test (line 9) | CREATE TABLE test.hits_stripelog (CounterID UInt32, AdvEngineID UInt8, R...

FILE: parser/testdata/query/compatible/1_stateful/00152_insert_different_granularity.sql
  type fixed_granularity_table (line 6) | CREATE TABLE fixed_granularity_table (`WatchID` UInt64, `JavaEnable` UIn...
  type hits_copy (line 35) | CREATE TABLE hits_copy (`WatchID` UInt64, `JavaEnable` UInt8, `Title` St...

FILE: parser/testdata/query/compatible/1_stateful/00153_aggregate_arena_race.sql
  type dest00153 (line 3) | create temporary table dest00153 (`s` AggregateFunction(groupUniqArray, ...

FILE: parser/testdata/query/compatible/1_stateful/00154_avro.sql
  type test (line 7) | CREATE TABLE test.avro AS test.hits ENGINE = File(Avro)

FILE: parser/testdata/query/compatible/1_stateful/00156_max_execution_speed_sample_merge.sql
  type times (line 3) | CREATE TEMPORARY TABLE times (t DateTime)

FILE: parser/testdata/query/compatible/1_stateful/00157_cache_dictionary.sql
  type test (line 4) | CREATE TABLE test.hits_1m as test.hits;

FILE: parser/testdata/query/compatible/1_stateful/00162_mmap_compression_none.sql
  type hits_none (line 2) | CREATE TABLE hits_none (Title String CODEC(NONE)) ENGINE = MergeTree

FILE: parser/testdata/query/compatible/1_stateful/00174_distinct_in_order.sql
  type distinct_in_order (line 7) | create table distinct_in_order (CounterID UInt32, EventDate Date) engine...
  type ordinary_distinct (line 9) | create table ordinary_distinct (CounterID UInt32, EventDate Date) engine...
  type distinct_in_order (line 17) | create table distinct_in_order (CounterID UInt32, EventDate Date) engine...
  type ordinary_distinct (line 19) | create table ordinary_distinct (CounterID UInt32, EventDate Date) engine...

FILE: parser/testdata/query/create_window_view.sql
  type asdf (line 1) | CREATE OR REPLACE VIEW asdf AS

FILE: parser/testdata/query/format/beautify/create_window_view.sql
  type asdf (line 2) | CREATE OR REPLACE VIEW asdf AS
  type asdf (line 15) | CREATE OR REPLACE VIEW asdf AS SELECT

FILE: parser/testdata/query/format/create_window_view.sql
  type asdf (line 2) | CREATE OR REPLACE VIEW asdf AS
  type asdf (line 15) | CREATE OR REPLACE VIEW asdf AS SELECT id, price * 1.5 AS computed_value,...

FILE: parser/visitor_test.go
  function TestVisitor_Identical (line 14) | func TestVisitor_Identical(t *testing.T) {
  function TestVisitor_SimpleRewrite (line 60) | func TestVisitor_SimpleRewrite(t *testing.T) {
  function TestVisitor_NestRewrite (line 89) | func TestVisitor_NestRewrite(t *testing.T) {
  function TestWalk_NodeCounting (line 124) | func TestWalk_NodeCounting(t *testing.T) {

FILE: parser/walk.go
  type WalkFunc (line 8) | type WalkFunc
  function Walk (line 12) | func Walk(node Expr, fn WalkFunc) bool {
  function WalkWithBreak (line 1527) | func WalkWithBreak(node Expr, fn WalkFunc) bool {
  function Find (line 1558) | func Find(root Expr, predicate func(Expr) bool) (Expr, bool) {
  function FindAll (line 1571) | func FindAll(root Expr, predicate func(Expr) bool) []Expr {
  function Transform (line 1585) | func Transform(root Expr, transformer func(Expr) Expr) Expr {

FILE: parser/walk_test.go
  function TestWalk_BasicTraversal (line 9) | func TestWalk_BasicTraversal(t *testing.T) {
  function TestWalk_JoinExpr (line 26) | func TestWalk_JoinExpr(t *testing.T) {
  function TestWalkWithBreak_EarlyTermination (line 44) | func TestWalkWithBreak_EarlyTermination(t *testing.T) {
  function TestFind_FirstMatch (line 62) | func TestFind_FirstMatch(t *testing.T) {
  function TestFindAll_MultipleMatches (line 83) | func TestFindAll_MultipleMatches(t *testing.T) {
  function TestWalk_TableIdentifierRewriting (line 108) | func TestWalk_TableIdentifierRewriting(t *testing.T) {
  function TestWalk_OrderByDirectionRewriting (line 130) | func TestWalk_OrderByDirectionRewriting(t *testing.T) {
  function TestWalk_NestedQueryDepthTracking (line 149) | func TestWalk_NestedQueryDepthTracking(t *testing.T) {
  function TestWalk_SimpleNodeCounting (line 170) | func TestWalk_SimpleNodeCounting(t *testing.T) {
  function TestFind_NoMatch (line 186) | func TestFind_NoMatch(t *testing.T) {
  function TestFindAll_EmptyResult (line 203) | func TestFindAll_EmptyResult(t *testing.T) {
  function TestWalk_ShowStmtNewFields (line 219) | func TestWalk_ShowStmtNewFields(t *testing.T) {
Condensed preview — 918 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,433K chars).
[
  {
    "path": ".github/workflows/ci.yaml",
    "chars": 1368,
    "preview": "\nname: CI Actions\npermissions:\n  contents: read\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n "
  },
  {
    "path": ".gitignore",
    "chars": 292,
    "preview": "\n# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n*.test\n\n# Output of the go coverage tool, specific"
  },
  {
    "path": ".golangci.yml",
    "chars": 20380,
    "preview": "\n# This file contains all available configuration options\n# with their default values.\n\n# options for analysis running\nr"
  },
  {
    "path": "AGENTS.md",
    "chars": 3521,
    "preview": "# AI Agents Guidline\n\nThis document outlines guidance for AI coding agent including project structure, coding style, tes"
  },
  {
    "path": "LICENSE",
    "chars": 1066,
    "preview": "MIT License\n\nCopyright (c) 2023 AfterShip\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n"
  },
  {
    "path": "Makefile",
    "chars": 499,
    "preview": "\nPROGRAM=clickhouse-sql-parser\nPKG_FILES=`go list ./... | sed -e 's=github.com/AfterShip/clickhouse-sql-parser/=./='`\n\nC"
  },
  {
    "path": "README.md",
    "chars": 11813,
    "preview": "# ClickHouse SQL Parser \n![GitHub CI](https://github.com/AfterShip/clickhouse-sql-parser/actions/workflows/ci.yaml/badge"
  },
  {
    "path": "go.mod",
    "chars": 338,
    "preview": "module github.com/AfterShip/clickhouse-sql-parser\n\ngo 1.21.0\n\nrequire (\n\tgithub.com/sebdah/goldie/v2 v2.5.3\n\tgithub.com/"
  },
  {
    "path": "go.sum",
    "chars": 1571,
    "preview": "github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1"
  },
  {
    "path": "main.go",
    "chars": 1893,
    "preview": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\tclickhouse \"github.com/AfterShip/clickhouse-sq"
  },
  {
    "path": "parser/ast.go",
    "chars": 119988,
    "preview": "package parser\n\ntype OrderDirection string\n\nconst (\n\tOrderDirectionNone OrderDirection = \"\"\n\tOrderDirectionAsc  OrderDir"
  },
  {
    "path": "parser/ast_visitor.go",
    "chars": 37222,
    "preview": "package parser\n\ntype ASTVisitor interface {\n\tVisitOperationExpr(expr *OperationExpr) error\n\tVisitTernaryExpr(expr *Terna"
  },
  {
    "path": "parser/benchmark_test.go",
    "chars": 1615,
    "preview": "package parser\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n)\n\n// BenchmarkParseSQLFiles benchmarks parsing all SQL files"
  },
  {
    "path": "parser/format.go",
    "chars": 64908,
    "preview": "package parser\n\nimport \"strings\"\n\nconst (\n\twhitespace byte = ' '\n\tnewline    byte = '\\n'\n)\n\ntype FormatMode int\n\nconst ("
  },
  {
    "path": "parser/format_test.go",
    "chars": 2246,
    "preview": "package parser\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestFormatter_WithBeautify_Chaining("
  },
  {
    "path": "parser/helper.go",
    "chars": 423,
    "preview": "package parser\n\nfunc IsDigit(c byte) bool {\n\treturn '0' <= c && c <= '9'\n}\n\nfunc IsHexDigit(c byte) bool {\n\treturn '0' <"
  },
  {
    "path": "parser/keyword.go",
    "chars": 12242,
    "preview": "package parser\n\nconst (\n\tKeywordAdd          = \"ADD\"\n\tKeywordAdmin        = \"ADMIN\"\n\tKeywordAfter        = \"AFTER\"\n\tKeyw"
  },
  {
    "path": "parser/lexer.go",
    "chars": 8774,
    "preview": "package parser\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\nconst (\n\tTokenKindEOF          TokenK"
  },
  {
    "path": "parser/lexer_test.go",
    "chars": 5891,
    "preview": "package parser\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requ"
  },
  {
    "path": "parser/parse_system.go",
    "chars": 36933,
    "preview": "package parser\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nfunc (p *Parser) parseSetStmt(pos Pos) (*SetStmt, error) {\n\tif err := p.ex"
  },
  {
    "path": "parser/parser_alter.go",
    "chars": 23395,
    "preview": "package parser\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nfunc (p *Parser) parseAlterTable(pos Pos) (*AlterTable, error) {\n\talterTabl"
  },
  {
    "path": "parser/parser_column.go",
    "chars": 36679,
    "preview": "package parser\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nconst (\n\tPrecedenceUnknown = iota\n\tPrecedenceOr\n\tPrecedenceAnd\n\tPrecedence"
  },
  {
    "path": "parser/parser_common.go",
    "chars": 9479,
    "preview": "package parser\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype Parser struct {\n\tlexer *Lexer\n}\n\nfunc NewParser(buffer stri"
  },
  {
    "path": "parser/parser_drop.go",
    "chars": 1922,
    "preview": "package parser\n\nfunc (p *Parser) parseDropDatabase(pos Pos) (*DropDatabase, error) {\n\tif err := p.expectKeyword(KeywordD"
  },
  {
    "path": "parser/parser_query.go",
    "chars": 29466,
    "preview": "package parser\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"slices\"\n)\n\nfunc (p *Parser) tryParseWithClause(pos Pos) (*WithClause, error"
  },
  {
    "path": "parser/parser_table.go",
    "chars": 60070,
    "preview": "package parser\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nfunc (p *Parser) parseDDL(pos Pos) (DDL, error) {\n\tswitch {\n\tcase p.matchKe"
  },
  {
    "path": "parser/parser_test.go",
    "chars": 6197,
    "preview": "package parser\n\nimport (\n\t\"encoding/json\"\n\t\"flag\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/sebdah/gold"
  },
  {
    "path": "parser/parser_view.go",
    "chars": 9550,
    "preview": "package parser\n\nimport \"fmt\"\n\n// parseCreateMaterializedView parses a CREATE MATERIALIZED VIEW statement.\n//\n// The synt"
  },
  {
    "path": "parser/set.go",
    "chars": 586,
    "preview": "package parser\n\ntype Set[T comparable] struct {\n\tm map[T]struct{}\n}\n\nfunc NewSet[T comparable](members ...T) *Set[T] {\n\t"
  },
  {
    "path": "parser/set_test.go",
    "chars": 448,
    "preview": "package parser\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSet(t *testing.T) {\n\ts := NewSet"
  },
  {
    "path": "parser/testdata/basic/format/beautify/quantile_functions.sql",
    "chars": 136,
    "preview": "-- Origin SQL:\nSELECT quantile(0.9)(x), quantiles(0.5, 0.9)(x);\n\n\n-- Beautify SQL:\nSELECT\n  quantile(0.9)(x),\n  quantile"
  },
  {
    "path": "parser/testdata/basic/format/beautify/set_statement.sql",
    "chars": 568,
    "preview": "-- Origin SQL:\nSET allow_suspicious_low_cardinality_types = true;\n\nSET max_block_size = 65536;\n\nSET output_format_json_q"
  },
  {
    "path": "parser/testdata/basic/format/beautify/settings_statement.sql",
    "chars": 593,
    "preview": "-- Origin SQL:\nSETTINGS allow_suspicious_low_cardinality_types = true;\n\nSETTINGS max_block_size = 65536;\n\nSETTINGS outpu"
  },
  {
    "path": "parser/testdata/basic/format/beautify/use_database.sql",
    "chars": 53,
    "preview": "-- Origin SQL:\nUSE test;\n\n-- Beautify SQL:\nUSE test;\n"
  },
  {
    "path": "parser/testdata/basic/format/quantile_functions.sql",
    "chars": 130,
    "preview": "-- Origin SQL:\nSELECT quantile(0.9)(x), quantiles(0.5, 0.9)(x);\n\n\n-- Format SQL:\nSELECT quantile(0.9)(x), quantiles(0.5,"
  },
  {
    "path": "parser/testdata/basic/format/set_statement.sql",
    "chars": 566,
    "preview": "-- Origin SQL:\nSET allow_suspicious_low_cardinality_types = true;\n\nSET max_block_size = 65536;\n\nSET output_format_json_q"
  },
  {
    "path": "parser/testdata/basic/format/settings_statement.sql",
    "chars": 591,
    "preview": "-- Origin SQL:\nSETTINGS allow_suspicious_low_cardinality_types = true;\n\nSETTINGS max_block_size = 65536;\n\nSETTINGS outpu"
  },
  {
    "path": "parser/testdata/basic/format/use_database.sql",
    "chars": 51,
    "preview": "-- Origin SQL:\nUSE test;\n\n-- Format SQL:\nUSE test;\n"
  },
  {
    "path": "parser/testdata/basic/output/quantile_functions.sql.golden.json",
    "chars": 2975,
    "preview": "[\n  {\n    \"SelectPos\": 0,\n    \"StatementEnd\": 43,\n    \"With\": null,\n    \"Top\": null,\n    \"HasDistinct\": false,\n    \"Dist"
  },
  {
    "path": "parser/testdata/basic/output/set_statement.sql.golden.json",
    "chars": 3038,
    "preview": "[\n  {\n    \"SetPos\": 0,\n    \"Settings\": {\n      \"SettingsPos\": 4,\n      \"ListEnd\": 49,\n      \"Items\": [\n        {\n       "
  },
  {
    "path": "parser/testdata/basic/output/settings_statement.sql.golden.json",
    "chars": 3041,
    "preview": "[\n  {\n    \"SetPos\": 0,\n    \"Settings\": {\n      \"SettingsPos\": 9,\n      \"ListEnd\": 54,\n      \"Items\": [\n        {\n       "
  },
  {
    "path": "parser/testdata/basic/output/use_database.sql.golden.json",
    "chars": 158,
    "preview": "[\n  {\n    \"UsePos\": 0,\n    \"StatementEnd\": 8,\n    \"Database\": {\n      \"Name\": \"test\",\n      \"QuoteType\": 1,\n      \"NameP"
  },
  {
    "path": "parser/testdata/basic/quantile_functions.sql",
    "chars": 49,
    "preview": "SELECT quantile(0.9)(x), quantiles(0.5, 0.9)(x);\n"
  },
  {
    "path": "parser/testdata/basic/set_statement.sql",
    "chars": 276,
    "preview": "SET allow_suspicious_low_cardinality_types = true;\n\nSET max_block_size = 65536;\n\nSET output_format_json_quote_64bit_inte"
  },
  {
    "path": "parser/testdata/basic/settings_statement.sql",
    "chars": 301,
    "preview": "SETTINGS allow_suspicious_low_cardinality_types = true;\n\nSETTINGS max_block_size = 65536;\n\nSETTINGS output_format_json_q"
  },
  {
    "path": "parser/testdata/basic/use_database.sql",
    "chars": 9,
    "preview": "USE test;"
  },
  {
    "path": "parser/testdata/benchdata/posthog_huge_0.sql",
    "chars": 76337,
    "preview": "  /* user_id:0 request:_snapshot_ */\n  SELECT fill.bin_from_seconds AS bin_from_seconds,\n         results.person_count A"
  },
  {
    "path": "parser/testdata/benchdata/posthog_huge_1.sql",
    "chars": 62926,
    "preview": "  /* user_id:0 request:_snapshot_ */\n  SELECT fill.bin_from_seconds AS bin_from_seconds,\n         results.person_count A"
  },
  {
    "path": "parser/testdata/ddl/alter_role.sql",
    "chars": 1095,
    "preview": "-- Tags: no-parallel\n\nALTER ROLE r1_01293;\nALTER ROLE r1_01293 ON CLUSTER cluster_1 RENAME TO r2_01293;\nALTER ROLE r1_01"
  },
  {
    "path": "parser/testdata/ddl/alter_table_add_column.sql",
    "chars": 114,
    "preview": "ALTER TABLE test.events_local ON CLUSTER 'default_cluster' ADD COLUMN f1 String AFTER f0 SETTINGS alter_sync = 2;\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_add_index.sql",
    "chars": 615,
    "preview": "ALTER TABLE test.events_local ON CLUSTER 'default_cluster' ADD INDEX my_index(f0) TYPE minmax GRANULARITY 1024;\nALTER TA"
  },
  {
    "path": "parser/testdata/ddl/alter_table_add_projection.sql",
    "chars": 142,
    "preview": "ALTER TABLE visits_order\nADD PROJECTION  IF NOT EXISTS user_name_projection\n(SELECT * GROUP BY user_name ORDER BY user_n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_add_projection_group_by_only.sql",
    "chars": 185,
    "preview": "ALTER TABLE events\nADD PROJECTION IF NOT EXISTS hourly_stats\n(SELECT toStartOfHour(event_time) AS hour, event_type, coun"
  },
  {
    "path": "parser/testdata/ddl/alter_table_attach_partition.sql",
    "chars": 153,
    "preview": "ALTER TABLE test ATTACH PARTITION '20210114';\nALTER TABLE test ATTACH PARTITION '20210114' FROM test1;\nALTER TABLE test "
  },
  {
    "path": "parser/testdata/ddl/alter_table_clear_column.sql",
    "chars": 77,
    "preview": "ALTER TABLE my_table CLEAR COLUMN my_column_name IN PARTITION partition_name;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_clear_index.sql",
    "chars": 75,
    "preview": "ALTER TABLE my_table CLEAR INDEX my_index_name IN PARTITION partition_name;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_clear_projection.sql",
    "chars": 72,
    "preview": "ALTER TABLE my_table CLEAR PROJECTION hello IN PARTITION partition_name;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_delete.sql",
    "chars": 64,
    "preview": "ALTER TABLE test.events DELETE WHERE created_at < '2023-01-01';\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_delete_with_cluster.sql",
    "chars": 99,
    "preview": "ALTER TABLE test.events ON CLUSTER 'default_cluster' DELETE WHERE id = 123 AND status = 'deleted';\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_detach_partition.sql",
    "chars": 50,
    "preview": "ALTER TABLE db.test DETACH PARTITION '2021-10-01';"
  },
  {
    "path": "parser/testdata/ddl/alter_table_drop_column.sql",
    "chars": 84,
    "preview": "ALTER TABLE test.events_local ON CLUSTER 'default_cluster' DROP COLUMN IF EXISTS f1;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_drop_detach_partition.sql",
    "chars": 155,
    "preview": "ALTER TABLE app_utc_00.app_message_as_notification_organization_sent_stats_i_d_local DROP DETACHED PARTITION '2022-05-24"
  },
  {
    "path": "parser/testdata/ddl/alter_table_drop_index.sql",
    "chars": 72,
    "preview": "ALTER TABLE test.event_local ON CLUSTER 'default_cluster' DROP INDEX f1;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_drop_partition.sql",
    "chars": 81,
    "preview": "ALTER TABLE test.events ON CLUSTER 'default_cluster' drop partition '2023-07-18';"
  },
  {
    "path": "parser/testdata/ddl/alter_table_drop_projection.sql",
    "chars": 77,
    "preview": "ALTER TABLE test.event_local ON CLUSTER 'default_cluster' DROP PROJECTION f1;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_freeze_no_specify_partition.sql",
    "chars": 60,
    "preview": "ALTER TABLE test.events ON CLUSTER 'default_cluster' freeze;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_freeze_partition.sql",
    "chars": 84,
    "preview": "ALTER TABLE test.events ON CLUSTER 'default_cluster' freeze partition '2023-07-18';;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_materialize_index.sql",
    "chars": 95,
    "preview": "ALTER TABLE visits_order MATERIALIZE INDEX IF EXISTS user_name_index IN PARTITION '20240403';\n\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_materialize_projection.sql",
    "chars": 105,
    "preview": "ALTER TABLE visits_order MATERIALIZE PROJECTION IF EXISTS user_name_projection IN PARTITION '20240403';\n\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_modify_column.sql",
    "chars": 54,
    "preview": "ALTER TABLE t1 MODIFY COLUMN f1 String COMMENT 'test';"
  },
  {
    "path": "parser/testdata/ddl/alter_table_modify_column_remove.sql",
    "chars": 47,
    "preview": "ALTER TABLE t1 MODIFY COLUMN f1 REMOVE COMMENT;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_modify_setting.sql",
    "chars": 94,
    "preview": "ALTER TABLE example_table MODIFY SETTING max_part_loading_threads=8, max_parts_in_total=50000;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_remove_ttl.sql",
    "chars": 64,
    "preview": "ALTER TABLE test.events ON CLUSTER 'default_cluster' REMOVE TTL;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_rename_column.sql",
    "chars": 72,
    "preview": "ALTER TABLE my_table RENAME COLUMN old_column_name TO new_column_name;\n\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_replace_partition.sql",
    "chars": 53,
    "preview": "ALTER TABLE t2 REPLACE PARTITION 'partition' FROM t1;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_reset_multiple_settings.sql",
    "chars": 102,
    "preview": "ALTER TABLE example_table RESET SETTING max_part_loading_threads, max_parts_in_total, another_setting;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_reset_setting.sql",
    "chars": 65,
    "preview": "ALTER TABLE example_table RESET SETTING max_part_loading_threads;"
  },
  {
    "path": "parser/testdata/ddl/alter_table_update.sql",
    "chars": 94,
    "preview": "ALTER TABLE test.users UPDATE status = 'active', updated_at = now() WHERE status = 'pending';\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_update_in_partition.sql",
    "chars": 101,
    "preview": "ALTER TABLE test.users UPDATE status = 'inactive' IN PARTITION '2024-01-01' WHERE status = 'active';\n"
  },
  {
    "path": "parser/testdata/ddl/alter_table_update_with_cluster.sql",
    "chars": 86,
    "preview": "ALTER TABLE db.table ON CLUSTER cluster1 UPDATE column1 = column1 + 1 WHERE id > 100;\n"
  },
  {
    "path": "parser/testdata/ddl/attach_table_basic.sql",
    "chars": 401,
    "preview": "ATTACH TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster' (\n    f0 String,\n    f1 String,\n    f2 String,"
  },
  {
    "path": "parser/testdata/ddl/bug_001.sql",
    "chars": 637,
    "preview": "CREATE MATERIALIZED VIEW IF NOT EXISTS db.table\n            ON CLUSTER 'default_cluster' TO db.table_mv\nAS\nSELECT\n    ev"
  },
  {
    "path": "parser/testdata/ddl/check.sql",
    "chars": 64,
    "preview": "CHECK TABLE test_table;\nCHECK TABLE test_table PARTITION 'col';\n"
  },
  {
    "path": "parser/testdata/ddl/create_database.sql",
    "chars": 36,
    "preview": "CREATE DATABASE IF NOT EXISTS `test`"
  },
  {
    "path": "parser/testdata/ddl/create_database_replicated.sql",
    "chars": 96,
    "preview": "CREATE DATABASE IF NOT EXISTS `test` ENGINE=Replicated('/root/test_local', 'shard', 'replica');\n"
  },
  {
    "path": "parser/testdata/ddl/create_dictionary_basic.sql",
    "chars": 446,
    "preview": "CREATE DICTIONARY test.my_dict (\n    id UInt64,\n    name String DEFAULT '',\n    value Float64 EXPRESSION toFloat64OrZero"
  },
  {
    "path": "parser/testdata/ddl/create_dictionary_comprehensive.sql",
    "chars": 588,
    "preview": "CREATE OR REPLACE DICTIONARY test.comprehensive_dict \nUUID '12345678-1234-1234-1234-123456789012'\nON CLUSTER production_"
  },
  {
    "path": "parser/testdata/ddl/create_dictionary_with_comment.sql",
    "chars": 496,
    "preview": "CREATE DICTIONARY test.my_dict (\n    id UInt64,\n    name String DEFAULT '',\n    value Float64 EXPRESSION toFloat64OrZero"
  },
  {
    "path": "parser/testdata/ddl/create_distributed_table.sql",
    "chars": 193,
    "preview": "create table test.event_all\nON CLUSTER 'default_cluster'\nAS test.evnets_local\nENGINE = Distributed(\n    default_cluster,"
  },
  {
    "path": "parser/testdata/ddl/create_function_simple.sql",
    "chars": 56,
    "preview": "CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b;"
  },
  {
    "path": "parser/testdata/ddl/create_live_view_basic.sql",
    "chars": 103,
    "preview": "CREATE LIVE VIEW my_live_view\nWITH TIMEOUT 10 TO my_destination(id String)\nAS SELECT id FROM my_table;\n"
  },
  {
    "path": "parser/testdata/ddl/create_materialized_view_basic.sql",
    "chars": 567,
    "preview": "CREATE\nMATERIALIZED VIEW infra_bm.view_name \n    ON CLUSTER 'default_cluster' TO infra_bm.table_name\n(\n  `f1` DateTime64"
  },
  {
    "path": "parser/testdata/ddl/create_materialized_view_with_comment_before_as.sql",
    "chars": 304,
    "preview": "CREATE MATERIALIZED VIEW db.mv_with_comment TO db.dst_table\n(\n    `shop_id` UInt64,\n    `event_type` LowCardinality(Stri"
  },
  {
    "path": "parser/testdata/ddl/create_materialized_view_with_definer.sql",
    "chars": 381,
    "preview": "CREATE MATERIALIZED VIEW fresh_mv\nREFRESH EVERY 1 HOUR OFFSET 10 MINUTE APPEND TO events_export\n(\n    `timestamp` DateTi"
  },
  {
    "path": "parser/testdata/ddl/create_materialized_view_with_empty_table_schema.sql",
    "chars": 461,
    "preview": "CREATE MATERIALIZED VIEW test.t0 on cluster default_cluster\nENGINE = ReplicatedAggregatingMergeTree('/clickhouse/{layer}"
  },
  {
    "path": "parser/testdata/ddl/create_materialized_view_with_gcs.sql",
    "chars": 208,
    "preview": "CREATE MATERIALIZED VIEW database_name.view_name\n        REFRESH EVERY 5 MINUTE TO database_name.table_name AS\n        S"
  },
  {
    "path": "parser/testdata/ddl/create_materialized_view_with_refresh.sql",
    "chars": 302,
    "preview": "CREATE MATERIALIZED VIEW fresh_mv\nREFRESH EVERY 1 HOUR OFFSET 10 MINUTE\nRANDOMIZE FOR 1 SECOND\nDEPENDS ON  table_v5\nSETT"
  },
  {
    "path": "parser/testdata/ddl/create_mv_with_not_op.sql",
    "chars": 559,
    "preview": "CREATE MATERIALIZED VIEW infra_bm.view_name\n    ON CLUSTER 'default_cluster' TO infra_bm.table_name\n(\n  `f1` DateTime64("
  },
  {
    "path": "parser/testdata/ddl/create_mv_with_order_by.sql",
    "chars": 260,
    "preview": "CREATE MATERIALIZED VIEW IF NOT EXISTS test_mv\nENGINE = ReplacingMergeTree()\nPRIMARY KEY (id)\nORDER BY (id)\nAS\nSELECT * "
  },
  {
    "path": "parser/testdata/ddl/create_named_collection_basic.sql",
    "chars": 161,
    "preview": "CREATE NAMED COLLECTION IF NOT EXISTS servercore_s3_config\nAS url = 'http://local-minio:9000/*',\naccess_key_id = 'minioa"
  },
  {
    "path": "parser/testdata/ddl/create_named_collection_simple.sql",
    "chars": 75,
    "preview": "CREATE NAMED COLLECTION my_collection\nAS key1 = 'value1',\nkey2 = 'value2';\n"
  },
  {
    "path": "parser/testdata/ddl/create_named_collection_with_cluster.sql",
    "chars": 156,
    "preview": "CREATE NAMED COLLECTION IF NOT EXISTS my_collection ON CLUSTER my_cluster\nAS key1 = 'value1' OVERRIDABLE,\nkey2 = 'value2"
  },
  {
    "path": "parser/testdata/ddl/create_named_collection_with_overridable.sql",
    "chars": 148,
    "preview": "CREATE NAMED COLLECTION test_collection\nAS url = 'http://example.com' OVERRIDABLE,\naccess_key = 'key123' NOT OVERRIDABLE"
  },
  {
    "path": "parser/testdata/ddl/create_or_replace.sql",
    "chars": 583,
    "preview": "-- It's a short link events table\n/**\n    * @name Short link events\n    * @description It's a short link events table\n *"
  },
  {
    "path": "parser/testdata/ddl/create_role.sql",
    "chars": 1185,
    "preview": "-- Tags: no-parallel\n\nCREATE ROLE r1_01293;\nCREATE ROLE r1_01293 ON CLUSTER cluster_1;\nCREATE ROLE r1_01293, r2_01293;\nC"
  },
  {
    "path": "parser/testdata/ddl/create_table_as_remote_function.sql",
    "chars": 356,
    "preview": "-- CREATE TABLE with columns AS table function (remoteSecure)\nCREATE TABLE test_remote\n(\n    id UInt64,\n    name String,"
  },
  {
    "path": "parser/testdata/ddl/create_table_basic.sql",
    "chars": 804,
    "preview": "-- It's a short link events table\n/**\n    * @name Short link events\n    * @description It's a short link events table\n *"
  },
  {
    "path": "parser/testdata/ddl/create_table_codec_no_args.sql",
    "chars": 74,
    "preview": "CREATE TABLE shark_attacks (\n    timestamp DateTime CODEC(DoubleDelta),\n);"
  },
  {
    "path": "parser/testdata/ddl/create_table_json_typehints.sql",
    "chars": 144,
    "preview": "CREATE TABLE t (\n    j JSON(message String, a.b UInt64, max_dynamic_paths=0, SKIP x, SKIP REGEXP 're')\n) ENGINE = MergeT"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_codec_delta.sql",
    "chars": 814,
    "preview": "CREATE TABLE IF NOT EXISTS test_local\n(\n `id` UInt64 CODEC(Delta, ZSTD(1)),\n `api_id` UInt64 CODEC(ZSTD(1)),\n `app_id` U"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_enum_fields.sql",
    "chars": 449,
    "preview": "CREATE TABLE t0 on cluster default_cluster\n(\n    `method` Enum8('GET'=1 , 'POST'=2, 'HEAD'=3, 'PUT'=4,'PATCH'=5, 'DELETE"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_index.sql",
    "chars": 1129,
    "preview": "CREATE TABLE IF NOT EXISTS test_local\n(\n `common.id` String CODEC(ZSTD(1)),\n `id` UInt64 CODEC(Delta, ZSTD(1)),\n `idx` U"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_keyword_partition_by.sql",
    "chars": 260,
    "preview": "CREATE TABLE test.events_local UUID 'dad17568-b070-49d0-9ad1-7568b07029d0' (\n    `date` Date,\n    `f1` String,\n    `f2` "
  },
  {
    "path": "parser/testdata/ddl/create_table_with_null_engine.sql",
    "chars": 175,
    "preview": "CREATE TABLE logs.t0 on cluster default\n(\n    `trace_id` String CODEC(ZSTD(1)),\n    INDEX trace_id_bloom_idx trace_id TY"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_nullable.sql",
    "chars": 422,
    "preview": "CREATE TABLE test.`.inner.752391fb-44cc-4dd5-b523-91fb44cc9dd5`\n    UUID '27673372-7973-44f5-a767-33727973c4f5' (\n    `f"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_on_clsuter.sql",
    "chars": 401,
    "preview": "CREATE TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster' (\n    f0 String,\n    f1 String,\n    f2 String,"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_projection.sql",
    "chars": 273,
    "preview": "CREATE TABLE events\n(\n    `event_time` DateTime,\n    `event_id` UInt64,\n    `user_id` UInt64,\n    `huge_string` String,\n"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_projection_group_by_only.sql",
    "chars": 414,
    "preview": "CREATE TABLE events\n(\n    `event_time` DateTime,\n    `event_type` String,\n    `user_id` UInt64,\n    `value` Float64,\n   "
  },
  {
    "path": "parser/testdata/ddl/create_table_with_qbit.sql",
    "chars": 92,
    "preview": "CREATE TABLE test.qbit_example (\n    id UInt32,\n    vec QBit(Float32, 8)\n) ENGINE = Memory;\n"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_sample_by.sql",
    "chars": 352,
    "preview": "CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e'\n(\n    `f0` DateTime,\n    `f1` UInt32,\n    `f3` UIn"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_ttl_policy.sql",
    "chars": 765,
    "preview": "CREATE TABLE tab\n(\n    d DateTime,\n    a Int\n)\n    ENGINE = MergeTree\nPARTITION BY toYYYYMM(d)\nORDER BY d\nTTL d + INTERV"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_tuple_fields.sql",
    "chars": 349,
    "preview": "CREATE TABLE t0 on cluster default_cluster\n(\n    `tup0` Tuple(),\n    `tup1` Tuple(String, Int64),\n    `tup2` Tuple(Strin"
  },
  {
    "path": "parser/testdata/ddl/create_table_with_uuid.sql",
    "chars": 413,
    "preview": "CREATE TABLE IF NOT EXISTS test.events_local UUID '1234' ON CLUSTER 'default_cluster' (\n    f0 String,\n    f1 String,\n  "
  },
  {
    "path": "parser/testdata/ddl/create_user.sql",
    "chars": 2071,
    "preview": "-- Basic CREATE USER tests\n\nCREATE USER user1;\nCREATE USER IF NOT EXISTS user2;\nCREATE USER OR REPLACE user3;\nCREATE USE"
  },
  {
    "path": "parser/testdata/ddl/create_view_basic.sql",
    "chars": 105,
    "preview": "CREATE VIEW IF NOT EXISTS my_view(col1 String, col2 String)\nAS\nSELECT\n    id,\n    name\nFROM\n    my_table;"
  },
  {
    "path": "parser/testdata/ddl/create_view_on_cluster_with_uuid.sql",
    "chars": 202,
    "preview": "CREATE VIEW IF NOT EXISTS cluster_name.my_view\n        UUID '3493e374-e2bb-481b-b493-e374e2bb981b'\n        ON CLUSTER 'm"
  },
  {
    "path": "parser/testdata/ddl/create_view_with_comment.sql",
    "chars": 158,
    "preview": "CREATE VIEW IF NOT EXISTS db.my_view\n(\n    `id` Int64,\n    `name` String\n)\nCOMMENT '{\"blueprint_hash\":\"abc123\"}'\nAS SELE"
  },
  {
    "path": "parser/testdata/ddl/create_with_time_zone.sql",
    "chars": 2003,
    "preview": "CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster\n(\n    `f0` Array(Tuple(\n        f00 DateTime64(9, 'UTC'),\n"
  },
  {
    "path": "parser/testdata/ddl/desc_table_with_table_keyword.sql",
    "chars": 18,
    "preview": "DESC TABLE mytable"
  },
  {
    "path": "parser/testdata/ddl/desc_table_without_table_keyword.sql",
    "chars": 12,
    "preview": "DESC mytable"
  },
  {
    "path": "parser/testdata/ddl/describe_table_with_table_keyword.sql",
    "chars": 22,
    "preview": "DESCRIBE TABLE mytable"
  },
  {
    "path": "parser/testdata/ddl/describe_table_without_table_keyword.sql",
    "chars": 16,
    "preview": "DESCRIBE mytable"
  },
  {
    "path": "parser/testdata/ddl/drop_database.sql",
    "chars": 38,
    "preview": "DROP DATABASE IF EXISTS datbase_name;\n"
  },
  {
    "path": "parser/testdata/ddl/drop_role.sql",
    "chars": 207,
    "preview": "DROP ROLE IF EXISTS r1_01293, r2_01293, r3_01293, r4_01293, r5_01293, r6_01293, r7_01293, r8_01293, r9_01293;\nDROP ROLE "
  },
  {
    "path": "parser/testdata/ddl/drop_table_basic.sql",
    "chars": 38,
    "preview": "DROP TABLE IF EXISTS test.table_name;\n"
  },
  {
    "path": "parser/testdata/ddl/drop_table_with_no_delay.sql",
    "chars": 76,
    "preview": "DROP TABLE IF EXISTS test.table_name ON CLUSTER 'default_cluster' NO DELAY;\n"
  },
  {
    "path": "parser/testdata/ddl/drop_table_with_on_clsuter.sql",
    "chars": 67,
    "preview": "DROP TABLE IF EXISTS test.table_name ON CLUSTER 'default_cluster';\n"
  },
  {
    "path": "parser/testdata/ddl/format/alter_role.sql",
    "chars": 2201,
    "preview": "-- Origin SQL:\n-- Tags: no-parallel\n\nALTER ROLE r1_01293;\nALTER ROLE r1_01293 ON CLUSTER cluster_1 RENAME TO r2_01293;\nA"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_add_column.sql",
    "chars": 258,
    "preview": "-- Origin SQL:\nALTER TABLE test.events_local ON CLUSTER 'default_cluster' ADD COLUMN f1 String AFTER f0 SETTINGS alter_s"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_add_index.sql",
    "chars": 1262,
    "preview": "-- Origin SQL:\nALTER TABLE test.events_local ON CLUSTER 'default_cluster' ADD INDEX my_index(f0) TYPE minmax GRANULARITY"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_add_projection.sql",
    "chars": 315,
    "preview": "-- Origin SQL:\nALTER TABLE visits_order\nADD PROJECTION  IF NOT EXISTS user_name_projection\n(SELECT * GROUP BY user_name "
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_add_projection_group_by_only.sql",
    "chars": 402,
    "preview": "-- Origin SQL:\nALTER TABLE events\nADD PROJECTION IF NOT EXISTS hourly_stats\n(SELECT toStartOfHour(event_time) AS hour, e"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_attach_partition.sql",
    "chars": 334,
    "preview": "-- Origin SQL:\nALTER TABLE test ATTACH PARTITION '20210114';\nALTER TABLE test ATTACH PARTITION '20210114' FROM test1;\nAL"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_clear_column.sql",
    "chars": 187,
    "preview": "-- Origin SQL:\nALTER TABLE my_table CLEAR COLUMN my_column_name IN PARTITION partition_name;\n\n-- Format SQL:\nALTER TABLE"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_clear_index.sql",
    "chars": 183,
    "preview": "-- Origin SQL:\nALTER TABLE my_table CLEAR INDEX my_index_name IN PARTITION partition_name;\n\n-- Format SQL:\nALTER TABLE m"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_clear_projection.sql",
    "chars": 177,
    "preview": "-- Origin SQL:\nALTER TABLE my_table CLEAR PROJECTION hello IN PARTITION partition_name;\n\n-- Format SQL:\nALTER TABLE my_t"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_delete.sql",
    "chars": 160,
    "preview": "-- Origin SQL:\nALTER TABLE test.events DELETE WHERE created_at < '2023-01-01';\n\n\n-- Format SQL:\nALTER TABLE test.events "
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_delete_with_cluster.sql",
    "chars": 230,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' DELETE WHERE id = 123 AND status = 'deleted';\n\n\n-- F"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_detach_partition.sql",
    "chars": 133,
    "preview": "-- Origin SQL:\nALTER TABLE db.test DETACH PARTITION '2021-10-01';\n\n-- Format SQL:\nALTER TABLE db.test DETACH PARTITION '"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_drop_column.sql",
    "chars": 201,
    "preview": "-- Origin SQL:\nALTER TABLE test.events_local ON CLUSTER 'default_cluster' DROP COLUMN IF EXISTS f1;\n\n-- Format SQL:\nALTE"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_drop_detach_partition.sql",
    "chars": 341,
    "preview": "-- Origin SQL:\nALTER TABLE app_utc_00.app_message_as_notification_organization_sent_stats_i_d_local DROP DETACHED PARTIT"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_drop_index.sql",
    "chars": 177,
    "preview": "-- Origin SQL:\nALTER TABLE test.event_local ON CLUSTER 'default_cluster' DROP INDEX f1;\n\n-- Format SQL:\nALTER TABLE test"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_drop_partition.sql",
    "chars": 195,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' drop partition '2023-07-18';\n\n-- Format SQL:\nALTER T"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_drop_projection.sql",
    "chars": 187,
    "preview": "-- Origin SQL:\nALTER TABLE test.event_local ON CLUSTER 'default_cluster' DROP PROJECTION f1;\n\n-- Format SQL:\nALTER TABLE"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_freeze_no_specify_partition.sql",
    "chars": 153,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' freeze;\n\n-- Format SQL:\nALTER TABLE test.events ON C"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_freeze_partition.sql",
    "chars": 200,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' freeze partition '2023-07-18';;\n\n-- Format SQL:\nALTE"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_materialize_index.sql",
    "chars": 221,
    "preview": "-- Origin SQL:\nALTER TABLE visits_order MATERIALIZE INDEX IF EXISTS user_name_index IN PARTITION '20240403';\n\n\n\n-- Forma"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_materialize_projection.sql",
    "chars": 241,
    "preview": "-- Origin SQL:\nALTER TABLE visits_order MATERIALIZE PROJECTION IF EXISTS user_name_projection IN PARTITION '20240403';\n\n"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_modify_column.sql",
    "chars": 141,
    "preview": "-- Origin SQL:\nALTER TABLE t1 MODIFY COLUMN f1 String COMMENT 'test';\n\n-- Format SQL:\nALTER TABLE t1 MODIFY COLUMN f1 St"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_modify_column_remove.sql",
    "chars": 127,
    "preview": "-- Origin SQL:\nALTER TABLE t1 MODIFY COLUMN f1 REMOVE COMMENT;\n\n-- Format SQL:\nALTER TABLE t1 MODIFY COLUMN f1 REMOVE CO"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_modify_setting.sql",
    "chars": 221,
    "preview": "-- Origin SQL:\nALTER TABLE example_table MODIFY SETTING max_part_loading_threads=8, max_parts_in_total=50000;\n\n-- Format"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_remove_ttl.sql",
    "chars": 161,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' REMOVE TTL;\n\n-- Format SQL:\nALTER TABLE test.events "
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_rename_column.sql",
    "chars": 175,
    "preview": "-- Origin SQL:\nALTER TABLE my_table RENAME COLUMN old_column_name TO new_column_name;\n\n\n\n-- Format SQL:\nALTER TABLE my_t"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_replace_partition.sql",
    "chars": 139,
    "preview": "-- Origin SQL:\nALTER TABLE t2 REPLACE PARTITION 'partition' FROM t1;\n\n-- Format SQL:\nALTER TABLE t2 REPLACE PARTITION 'p"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_reset_multiple_settings.sql",
    "chars": 237,
    "preview": "-- Origin SQL:\nALTER TABLE example_table RESET SETTING max_part_loading_threads, max_parts_in_total, another_setting;\n\n-"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_reset_setting.sql",
    "chars": 163,
    "preview": "-- Origin SQL:\nALTER TABLE example_table RESET SETTING max_part_loading_threads;\n\n-- Format SQL:\nALTER TABLE example_tab"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_update.sql",
    "chars": 220,
    "preview": "-- Origin SQL:\nALTER TABLE test.users UPDATE status = 'active', updated_at = now() WHERE status = 'pending';\n\n\n-- Format"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_update_in_partition.sql",
    "chars": 234,
    "preview": "-- Origin SQL:\nALTER TABLE test.users UPDATE status = 'inactive' IN PARTITION '2024-01-01' WHERE status = 'active';\n\n\n--"
  },
  {
    "path": "parser/testdata/ddl/format/alter_table_update_with_cluster.sql",
    "chars": 204,
    "preview": "-- Origin SQL:\nALTER TABLE db.table ON CLUSTER cluster1 UPDATE column1 = column1 + 1 WHERE id > 100;\n\n\n-- Format SQL:\nAL"
  },
  {
    "path": "parser/testdata/ddl/format/attach_table_basic.sql",
    "chars": 804,
    "preview": "-- Origin SQL:\nATTACH TABLE IF NOT EXISTS test.events_local ON CLUSTER 'default_cluster' (\n    f0 String,\n    f1 String,"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_role.sql",
    "chars": 2259,
    "preview": "-- Origin SQL:\n-- Tags: no-parallel\n\nALTER ROLE r1_01293;\nALTER ROLE r1_01293 ON CLUSTER cluster_1 RENAME TO r2_01293;\nA"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_add_column.sql",
    "chars": 262,
    "preview": "-- Origin SQL:\nALTER TABLE test.events_local ON CLUSTER 'default_cluster' ADD COLUMN f1 String AFTER f0 SETTINGS alter_s"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_add_index.sql",
    "chars": 1264,
    "preview": "-- Origin SQL:\nALTER TABLE test.events_local ON CLUSTER 'default_cluster' ADD INDEX my_index(f0) TYPE minmax GRANULARITY"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_add_projection.sql",
    "chars": 319,
    "preview": "-- Origin SQL:\nALTER TABLE visits_order\nADD PROJECTION  IF NOT EXISTS user_name_projection\n(SELECT * GROUP BY user_name "
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_add_projection_group_by_only.sql",
    "chars": 406,
    "preview": "-- Origin SQL:\nALTER TABLE events\nADD PROJECTION IF NOT EXISTS hourly_stats\n(SELECT toStartOfHour(event_time) AS hour, e"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_attach_partition.sql",
    "chars": 336,
    "preview": "-- Origin SQL:\nALTER TABLE test ATTACH PARTITION '20210114';\nALTER TABLE test ATTACH PARTITION '20210114' FROM test1;\nAL"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_clear_column.sql",
    "chars": 189,
    "preview": "-- Origin SQL:\nALTER TABLE my_table CLEAR COLUMN my_column_name IN PARTITION partition_name;\n\n-- Beautify SQL:\nALTER TAB"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_clear_index.sql",
    "chars": 185,
    "preview": "-- Origin SQL:\nALTER TABLE my_table CLEAR INDEX my_index_name IN PARTITION partition_name;\n\n-- Beautify SQL:\nALTER TABLE"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_clear_projection.sql",
    "chars": 179,
    "preview": "-- Origin SQL:\nALTER TABLE my_table CLEAR PROJECTION hello IN PARTITION partition_name;\n\n-- Beautify SQL:\nALTER TABLE my"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_delete.sql",
    "chars": 162,
    "preview": "-- Origin SQL:\nALTER TABLE test.events DELETE WHERE created_at < '2023-01-01';\n\n\n-- Beautify SQL:\nALTER TABLE test.event"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_delete_with_cluster.sql",
    "chars": 234,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' DELETE WHERE id = 123 AND status = 'deleted';\n\n\n-- B"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_detach_partition.sql",
    "chars": 135,
    "preview": "-- Origin SQL:\nALTER TABLE db.test DETACH PARTITION '2021-10-01';\n\n-- Beautify SQL:\nALTER TABLE db.test\nDETACH PARTITION"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_drop_column.sql",
    "chars": 203,
    "preview": "-- Origin SQL:\nALTER TABLE test.events_local ON CLUSTER 'default_cluster' DROP COLUMN IF EXISTS f1;\n\n-- Beautify SQL:\nAL"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_drop_detach_partition.sql",
    "chars": 345,
    "preview": "-- Origin SQL:\nALTER TABLE app_utc_00.app_message_as_notification_organization_sent_stats_i_d_local DROP DETACHED PARTIT"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_drop_index.sql",
    "chars": 179,
    "preview": "-- Origin SQL:\nALTER TABLE test.event_local ON CLUSTER 'default_cluster' DROP INDEX f1;\n\n-- Beautify SQL:\nALTER TABLE te"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_drop_partition.sql",
    "chars": 197,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' drop partition '2023-07-18';\n\n-- Beautify SQL:\nALTER"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_drop_projection.sql",
    "chars": 189,
    "preview": "-- Origin SQL:\nALTER TABLE test.event_local ON CLUSTER 'default_cluster' DROP PROJECTION f1;\n\n-- Beautify SQL:\nALTER TAB"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_freeze_no_specify_partition.sql",
    "chars": 155,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' freeze;\n\n-- Beautify SQL:\nALTER TABLE test.events\nON"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_freeze_partition.sql",
    "chars": 202,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' freeze partition '2023-07-18';;\n\n-- Beautify SQL:\nAL"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_materialize_index.sql",
    "chars": 223,
    "preview": "-- Origin SQL:\nALTER TABLE visits_order MATERIALIZE INDEX IF EXISTS user_name_index IN PARTITION '20240403';\n\n\n\n-- Beaut"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_materialize_projection.sql",
    "chars": 243,
    "preview": "-- Origin SQL:\nALTER TABLE visits_order MATERIALIZE PROJECTION IF EXISTS user_name_projection IN PARTITION '20240403';\n\n"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_modify_column.sql",
    "chars": 143,
    "preview": "-- Origin SQL:\nALTER TABLE t1 MODIFY COLUMN f1 String COMMENT 'test';\n\n-- Beautify SQL:\nALTER TABLE t1\nMODIFY COLUMN f1 "
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_modify_column_remove.sql",
    "chars": 129,
    "preview": "-- Origin SQL:\nALTER TABLE t1 MODIFY COLUMN f1 REMOVE COMMENT;\n\n-- Beautify SQL:\nALTER TABLE t1\nMODIFY COLUMN f1 REMOVE "
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_modify_setting.sql",
    "chars": 227,
    "preview": "-- Origin SQL:\nALTER TABLE example_table MODIFY SETTING max_part_loading_threads=8, max_parts_in_total=50000;\n\n-- Beauti"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_remove_ttl.sql",
    "chars": 163,
    "preview": "-- Origin SQL:\nALTER TABLE test.events ON CLUSTER 'default_cluster' REMOVE TTL;\n\n-- Beautify SQL:\nALTER TABLE test.event"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_rename_column.sql",
    "chars": 177,
    "preview": "-- Origin SQL:\nALTER TABLE my_table RENAME COLUMN old_column_name TO new_column_name;\n\n\n\n-- Beautify SQL:\nALTER TABLE my"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_replace_partition.sql",
    "chars": 141,
    "preview": "-- Origin SQL:\nALTER TABLE t2 REPLACE PARTITION 'partition' FROM t1;\n\n-- Beautify SQL:\nALTER TABLE t2\nREPLACE PARTITION "
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_reset_multiple_settings.sql",
    "chars": 245,
    "preview": "-- Origin SQL:\nALTER TABLE example_table RESET SETTING max_part_loading_threads, max_parts_in_total, another_setting;\n\n-"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_reset_setting.sql",
    "chars": 167,
    "preview": "-- Origin SQL:\nALTER TABLE example_table RESET SETTING max_part_loading_threads;\n\n-- Beautify SQL:\nALTER TABLE example_t"
  },
  {
    "path": "parser/testdata/ddl/format/beautify/alter_table_update.sql",
    "chars": 226,
    "preview": "-- Origin SQL:\nALTER TABLE test.users UPDATE status = 'active', updated_at = now() WHERE status = 'pending';\n\n\n-- Beauti"
  }
]

// ... and 718 more files (download for full content)

About this extraction

This page contains the full source code of the AfterShip/clickhouse-sql-parser GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 918 files (2.1 MB), approximately 595.5k tokens, and a symbol index with 2101 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!