Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

  • Add support for # style line comments in lexer (ClickHouse supports both -- and # comments)
  • Update parser_test.go to skip lines starting with # when building query
  • Add parameterized identifier support ({name:Type} syntax) in parseIdentifierName()
  • Remove todo flag from 31 tests that now pass

The parser changes enable:

  1. Hash-style single-line comments (# comment text)
  2. Parameterized identifiers in table/database names like {CLICKHOUSE_DATABASE:Identifier}

Tests now passing:

  • 03524_sign_argument, 03546_leftover_dependencies
  • 03310_create_database_with_settings, 03321_create_table_as_replicated_engine_args
  • 03442_detach_view, 03267_materialized_view_keeps_security_context
  • 03222_ignore_nulls_query_tree_elimination, 03362_create_table_after_truncate_replicated_database
  • 03512_join_using_parent_scope_matcher, 02891_rename_table_without_keyword
  • And 21 more...

Remaining: 381 todo tests (down from 412)

- Add support for # style line comments in lexer (ClickHouse supports both -- and # comments)
- Update parser_test.go to skip lines starting with # when building query
- Add parameterized identifier support ({name:Type} syntax) in parseIdentifierName()
- Remove todo flag from 31 tests that now pass

The parser changes enable:
1. Hash-style single-line comments (# comment text)
2. Parameterized identifiers in table/database names like {CLICKHOUSE_DATABASE:Identifier}

Tests now passing:
- 03524_sign_argument, 03546_leftover_dependencies
- 03310_create_database_with_settings, 03321_create_table_as_replicated_engine_args
- 03442_detach_view, 03267_materialized_view_keeps_security_context
- 03222_ignore_nulls_query_tree_elimination, 03362_create_table_after_truncate_replicated_database
- 03512_join_using_parent_scope_matcher, 02891_rename_table_without_keyword
- And 21 more...

Remaining: 381 todo tests (down from 412)
- Default to ClickHouse v24.8.4.13 stable release
- Allow version override via CLICKHOUSE_VERSION environment variable
- Add force-download command to re-download with new version
- Add version command to show configured and installed versions
- Update help text with examples

This enables regenerating test expectations consistently by pinning
to a specific ClickHouse version.

Usage:
  ./scripts/clickhouse.sh download                    # Use default version
  CLICKHOUSE_VERSION=24.3.1.5 ./scripts/clickhouse.sh force-download
@kyleconroy kyleconroy merged commit 40df19b into main Dec 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants