You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing a query which uses the roundDecimal function, the query will fail if the column being rounded is a FLOAT data type and any value for that column is null.
The roundDecimal function works as expected if operating on a DOUBLE column. The function also works correctly for FLOAT columns if all values queried are non-null.
SET enableNullHandling=TRUE;
SELECT roundDecimal(field, 1) FROM example_table
Expected behavior
Returns: [1.4, null]
Observed behavior:
Error Code: 200
QueryExecutionError:
java.lang.RuntimeException: Caught exception while doing operator: class org.apache.pinot.core.operator.AcquireReleaseColumnsSegmentOperator on segment: example_table__6__156__20250121T1349Z
at org.apache.pinot.core.operator.combine.BaseCombineOperator.wrapOperatorException(BaseCombineOperator.java:197)
at org.apache.pinot.core.operator.combine.BaseSingleBlockCombineOperator.processSegments(BaseSingleBlockCombineOperator.java:96)
at org.apache.pinot.core.operator.combine.BaseCombineOperator$1.runJob(BaseCombineOperator.java:118)
at org.apache.pinot.core.util.trace.TraceRunnable.run(TraceRunnable.java:40)
...
Caused by: java.lang.NumberFormatException: Character I is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:608)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:497)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:903)
at java.base/java.math.BigDecimal.valueOf(BigDecimal.java:1371)
Workarounds
Coalesce null values to null:
SET enableNullHandling=TRUE;
SELECT roundDecimal(COALESCE(field, null), 1) FROM example_table
Filter out null values (not applicable to all use cases):
SET enableNullHandling=TRUE;
SELECT roundDecimal(field, 1) FROM example_table WHERE field IS NOT NULL
Affected versions
This bug exists in Pinot v1.3.0
The text was updated successfully, but these errors were encountered:
Description
When executing a query which uses the
roundDecimal
function, the query will fail if the column being rounded is a FLOAT data type and any value for that column is null.The
roundDecimal
function works as expected if operating on a DOUBLE column. The function also works correctly for FLOAT columns if all values queried are non-null.Example
Schema
Table Contents
Query
Expected behavior
Returns:
[1.4, null]
Observed behavior:
Workarounds
Coalesce null values to null:
Filter out null values (not applicable to all use cases):
Affected versions
This bug exists in Pinot v1.3.0
The text was updated successfully, but these errors were encountered: