mirror of
https://github.com/hanzo-ds/sqlparser.git
synced 2026-10-30 20:53:50 +00:00
A tuple column is declared either way — Tuple(String, Array(String)) or Tuple(label String, path Array(String)) — and SHOW CREATE TABLE returns whichever the column carries. Only the unnamed form parsed, so a schema the server printed itself could not be read back: the parse stopped at the first element's TYPE with "expected the last token kind is: )" under `label String`. The named form is a column list, which parseNestedType already reads for Nested, so this routes to it on one token of lookahead rather than teaching a second grammar: inside the parens a NAME is followed by its type (an identifier), while an unnamed element is followed by a comma, the closing paren, or its own parameters. Measured on the estate: event.log and event.span each carry a named tuple, and every logs query against them answered 500 "failed to get logs keys" because the metadata step reads the table back through this parser.