Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Add a lexer and parser that can parse the OptimizerHintsTests110 test case:

  • SELECT * FROM t1 OPTION (IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX)

This implements:

  • Lexer with support for keywords, identifiers, operators, and comments
  • Parser for SELECT statements with FROM clause and OPTION hints
  • OptimizerHint AST type and JSON marshaling
  • Enable the OptimizerHintsTests110 test case

Add a lexer and parser that can parse the OptimizerHintsTests110 test case:
- SELECT * FROM t1 OPTION (IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX)

This implements:
- Lexer with support for keywords, identifiers, operators, and comments
- Parser for SELECT statements with FROM clause and OPTION hints
- OptimizerHint AST type and JSON marshaling
- Enable the OptimizerHintsTests110 test case
Refactor the ast package to have each AST node type in its own file:
- node.go: Node interface
- script.go, batch.go: Root types
- statement.go, select_statement.go: Statement types
- query_expression.go, query_specification.go: Query types
- select_element.go, select_scalar_expression.go, select_star_expression.go
- scalar_expression.go, column_reference_expression.go
- integer_literal.go, string_literal.go, function_call.go
- identifier.go, multi_part_identifier.go, identifier_or_value_expression.go
- from_clause.go, table_reference.go, named_table_reference.go, qualified_join.go
- schema_object_name.go
- where_clause.go, boolean_expression.go, boolean_comparison_expression.go
- boolean_binary_expression.go
- group_by_clause.go, grouping_specification.go, expression_grouping_specification.go
- having_clause.go, order_by_clause.go, expression_with_sort_order.go
- optimizer_hint.go

Also update metadata.json to use empty object instead of skip: false.
@kyleconroy kyleconroy merged commit 857bcb9 into main Dec 14, 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