databrickslabs / remorph

Cross-compiler and Data Reconciler into Databricks Lakehouse
Other
37 stars 23 forks source link

Implement error strategy for Snowflake parsing and use error strategy for all parser instances #760

Closed jimidle closed 2 months ago

jimidle commented 2 months ago

Here we implement the equivalent of TSqlErrorStrategy.scala for Snowflake.

An implementation of SqlErrorStrategy influences how error messages are reported to users of the transpiler and other parsing tools. It translates raw token names and parser rules into something that makes more sense for SQL authors.

In addition we ensure that the relevant error strategy is used everywhere that an instance of a dialect parser is instantiated.

github-actions[bot] commented 2 months ago

Coverage tests results

401 tests  ±0   109 :white_check_mark: ±0   4s :stopwatch: ±0s   2 suites ±0     0 :zzz: ±0    2 files   ±0   292 :x: ±0 

For more details on these failures, see this check.

Results for commit 7252fab2. ± Comparison against base commit 1663d473.

:recycle: This comment has been updated with latest results.

jimidle commented 2 months ago

I proposed some changes in the implementation of this PR to make more "scala-idiomatic". It would be nice to add some unit tests as well.

There are in fact tests for the TSQL one, I would essentially just duplicate them. I will do it.