Skip to content

Commit

Permalink
fix for null values in rexliteral
Browse files Browse the repository at this point in the history
  • Loading branch information
datomo committed Apr 7, 2024
1 parent 80648a3 commit 94b7dc4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/polypheny/db/rex/RexLiteral.java
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ public int compareTo( RexLiteral o ) {
* @return the value of this literal
*/
public PolyValue getValue( AlgDataType type ) {
if ( value == null ) {
return null;
}
if ( PolyType.EXACT_TYPES.contains( type.getPolyType() ) && (PolyType.APPROX_TYPES.contains( value.type ) || PolyType.DECIMAL == value.type) ) {
return PolyValue.convert( value, type.getPolyType() );
}
Expand Down

0 comments on commit 94b7dc4

Please sign in to comment.