Emulate null ordering for CockroachDB

This commit is contained in:
Christian Beikov 2021-04-29 12:16:05 +02:00
parent 9872fd9f0f
commit 33b0087f2a
1 changed files with 12 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import org.hibernate.dialect.sequence.PostgreSQLSequenceSupport;
import org.hibernate.dialect.sequence.SequenceSupport;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.query.NullOrdering;
import org.hibernate.query.TemporalUnit;
import org.hibernate.query.spi.QueryEngine;
import org.hibernate.sql.ast.SqlAstTranslator;
@ -190,6 +191,17 @@ public class CockroachDialect extends Dialect {
return true;
}
@Override
public boolean supportsNullPrecedence() {
// Not yet implemented: https://www.cockroachlabs.com/docs/v20.2/null-handling.html#nulls-and-sorting
return false;
}
@Override
public NullOrdering getNullOrdering() {
return NullOrdering.SMALLEST;
}
@Override
public boolean requiresParensForTupleDistinctCounts() {
return true;