Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

This change adds support for parsing and explaining JSON and OBJECT type
parameters with the ObjectTypeArgument wrapper that ClickHouse uses.

Changes:

  • Add ObjectTypeArgument AST type to wrap expressions inside JSON/OBJECT types
  • Modify parser to wrap JSON/OBJECT type parameters in ObjectTypeArgument
  • Fix named parameter detection to not trigger when peek token is '='
    (e.g., JSON(max_dynamic_paths=8) was incorrectly being parsed as a name+type pair)
  • Add explain output support for ObjectTypeArgument (renders as ASTObjectTypeArgument)
  • Update FormatDataType to unwrap ObjectTypeArgument when formatting type strings

This change adds support for parsing and explaining JSON and OBJECT type
parameters with the ObjectTypeArgument wrapper that ClickHouse uses.

Changes:
- Add ObjectTypeArgument AST type to wrap expressions inside JSON/OBJECT types
- Modify parser to wrap JSON/OBJECT type parameters in ObjectTypeArgument
- Fix named parameter detection to not trigger when peek token is '='
  (e.g., JSON(max_dynamic_paths=8) was incorrectly being parsed as a name+type pair)
- Add explain output support for ObjectTypeArgument (renders as ASTObjectTypeArgument)
- Update FormatDataType to unwrap ObjectTypeArgument when formatting type strings
@kyleconroy kyleconroy merged commit f5f6652 into main Dec 30, 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