Skip to content

Keep a space between a decimal integer literal and a following dot - #423

Open
makenowjust wants to merge 1 commit into
cloudspannerecosystem:mainfrom
makenowjust:MakeNowJust/fix-selector-number-space
Open

Keep a space between a decimal integer literal and a following dot#423
makenowjust wants to merge 1 commit into
cloudspannerecosystem:mainfrom
makenowjust:MakeNowJust/fix-selector-number-space

Conversation

@makenowjust

Copy link
Copy Markdown
Collaborator

Fixes #419.

@apstndb

apstndb commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

FYI: the official GoogleSQL parenthesize IntLiteral of LHS of DotIdentifier expression when unparsing.

$ execute_query --mode=parse,unparse --sql_mode expression '1 .A'
DotIdentifier [0-4]
  IntLiteral(1) [0-1]
  Identifier(A) [3-4]

(1).A

@makenowjust

Copy link
Copy Markdown
Collaborator Author

@apstndb I know it, and my fix is intentional because memefish has ParenExpr so the GoogleSQL solution modifies the AST structure.

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.

bug: Unparse of field access on an integer literal drops a required space: SELECT 0 .A0000SELECT 0.A0000

2 participants