Skip to content

Fix the tokenization of < edge cases#2280

Merged
iffyio merged 2 commits intoapache:mainfrom
ayman-sigma:ayman/fixLtTokenizer
Mar 26, 2026
Merged

Fix the tokenization of < edge cases#2280
iffyio merged 2 commits intoapache:mainfrom
ayman-sigma:ayman/fixLtTokenizer

Conversation

@ayman-sigma
Copy link
Contributor

This change fixes tokenizer behavior for < prefixed sequences so subtraction and comparison are parsed correctly instead of being treated as an operator start. The issue mainly happens when there is no space between < and other tokens like -, or =.

This PR address:

  1. The use of + or - after < (Lt) to identify the sign of the following number/identifier
  2. Similarly, the use of + or - after <= (LtEq)
  3. Keeps the Two way arrow token <-> the same for dialects that supports geometric types.

@ayman-sigma ayman-sigma requested a review from iffyio March 20, 2026 17:17
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @ayman-sigma!

@iffyio iffyio added this pull request to the merge queue Mar 26, 2026
Merged via the queue into apache:main with commit df0d56c Mar 26, 2026
10 checks 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.

2 participants