Skip to content

Commit c29deab

Browse files
committed
Informix has native least() and greatest() functions
1 parent 137e853 commit c29deab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/InformixDialect.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,12 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
371371

372372
//coalesce() and nullif() both supported since Informix 12
373373

374-
functionRegistry.register( "least", new CaseLeastGreatestEmulation( true ) );
375-
functionRegistry.register( "greatest", new CaseLeastGreatestEmulation( false ) );
374+
// least() and greatest() supported since 12.10
375+
if ( getVersion().isBefore( 12, 10 ) ) {
376+
functionRegistry.register( "least", new CaseLeastGreatestEmulation( true ) );
377+
functionRegistry.register( "greatest", new CaseLeastGreatestEmulation( false ) );
378+
}
379+
376380
functionRegistry.namedDescriptorBuilder( "matches" )
377381
.setInvariantType( stringBasicType )
378382
.setExactArgumentCount( 2 )

0 commit comments

Comments
 (0)