databrickslabs / remorph

Cross-compiler and Data Reconciler into Databricks Lakehouse
Other
21 stars 13 forks source link

[BUG]: TSQL arithmetic operators clash with numeric signs #546

Closed vil1 closed 1 month ago

vil1 commented 1 month ago

Is there an existing issue for this?

Category of Bug / Issue

TranspileParserError

Current Behavior

The following input x +1 fails to be parsed as an expression whereas x + 1 succeeds.

This is due to the fact that the SIGN fragment is embedded in numerical tokens (INT, REAL, FLOAT, etc). Therefore, x +1 results in two tokens (x and +1), which doesn't match any expression rule, while x + 1 results in three tokens (x, + and 1).

Expected Behavior

Both x +1 and x + 1 should be parsable as expressions.

Steps To Reproduce

No response

Relevant log output or Exception details

No response

Sample Query

No response

Operating System

macOS

Version

latest via Databricks CLI