HHH-15266 Fix NPE during function logging due to wrong character_length alternative key registration

This commit is contained in:
Christian Beikov 2022-05-13 13:05:21 +02:00
parent 967ede47c0
commit 9351bcf30d
2 changed files with 2 additions and 1 deletions

View File

@ -1361,7 +1361,7 @@ public class CommonFunctionFactory {
"character_length",
new LengthFunction( "character_length", "character_length(?1)", clobPattern, typeConfiguration )
);
functionRegistry.registerAlternateKey( "character_length", "length" );
functionRegistry.registerAlternateKey( "length", "character_length" );
}
/**

View File

@ -292,6 +292,7 @@ public class SqmFunctionRegistry {
}
public void registerAlternateKey(String alternateKey, String mappedKey) {
assert functionMap.containsKey( mappedKey );
log.debugf( "Registering alternate key : %s -> %s", alternateKey, mappedKey );
alternateKeyMap.put( alternateKey, mappedKey );
}