databrickslabs / remorph

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

TSQL: Remove the SIGN fragment from numerical tokens #547

Closed vil1 closed 1 month ago

vil1 commented 1 month ago

Fixes #546

The proposed solution isn't completely satisfying though, as it makes it impossible to parse negative literals out of TSQL input: the input string -2 is now parsed as UMinus(Literal(2)) (instead of simply Literal(-2)). While being a mere inconvenience (it just delegates the handling of UPlus and UMinus to downstream processes), the fact that Snowflake grammar is able to parse -2 as Literal(-2) indicates that there might be a better solution to this problem. So I suggest we keep #546 open even if we merge this PR, so that @jimidle can later come back to it and find a better solution.

github-actions[bot] commented 1 month ago

Coverage tests results

394 tests  ±0   378 :white_check_mark: ±0   5s :stopwatch: -1s   2 suites ±0     0 :zzz: ±0    2 files   ±0    16 :x: ±0 

For more details on these failures, see this check.

Results for commit e9405784. ± Comparison against base commit 52ed84c3.