linkedin / coral

Coral is a translation, analysis, and query rewrite engine for SQL and other relational languages.
BSD 2-Clause "Simplified" License
783 stars 184 forks source link

[Coral-Trino] Change NullCollation.LAST to NullCollation.HIGH in TrinoSqlDialect #450

Closed KevinGe00 closed 1 year ago

KevinGe00 commented 1 year ago

What changes are proposed in this pull request, and why are they necessary?

We're changing the null collation of TrinoSqlDialect to from NullCollation.LAST to NullCollation.HIGH since CoralRelToSqlNodeConverter use NullCollation.HIGH. This is an incremental piece that works towards the goal of eventually getting rid of TrinoSqlDialect and using CoralRelToSqlNodeConverter as the common coral dialect.

How was this patch tested?

New unit test: testAliasOrderByASC Testing that the translated Trino sql explicitly says NULLS FIRST since we're translating from Hive and that is the default null ordering for ASC in Hive

./gradlew clean build

waiting on i-tests