pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Support exact decimal value to preserve precision

Open Akanksha-kedia opened this issue 3 months ago • 2 comments

Core Fix in RequestUtils.java

File: pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java Line 238: Replaced the precision-losing code with:

// Store exact decimal value to preserve precision
literal.setBigDecimalValue(BigDecimalUtils.serialize(bigDecimalValue));

Akanksha-kedia avatar Dec 13 '25 14:12 Akanksha-kedia

@xiangfu0 @Jackie-Jiang please review and help to merge.

Akanksha-kedia avatar Dec 13 '25 14:12 Akanksha-kedia

:x: 13 Tests Failed:

Tests completed Failed Passed Skipped
13306 13 13293 49
View the top 3 failed test(s) by shortest run time
org.apache.pinot.sql.parsers.rewriter.AggregationOptimizerTest::testMinMultiplicationWithNegativeConstant
Stack Traces | 0.002s run time
expected [mult] but found [min]
org.apache.pinot.sql.parsers.rewriter.AggregationOptimizerTest::testSumWithFloatConstant
Stack Traces | 0.002s run time
expected [add] but found [sum]
org.apache.pinot.integration.tests.custom.ArrayTest::testGenerateFloatArrayWithoutStepValue
Stack Traces | 0.005s run time
No failure message available
org.apache.pinot.integration.tests.custom.ArrayTest::testGenerateFloatArrayWithoutStepValue[false](1)
Stack Traces | 0.007s run time
No failure message available
org.apache.pinot.integration.tests.custom.ArrayTest::testGenerateFloatArray
Stack Traces | 0.008s run time
No failure message available
org.apache.pinot.sql.parsers.rewriter.AggregationOptimizerTest::testAvgColumnTimesConstant
Stack Traces | 0.009s run time
expected [mult] but found [avg]
org.apache.pinot.integration.tests.custom.ArrayTest::testFloatArrayLiteral
Stack Traces | 0.01s run time
expected [3] but found [0]
org.apache.pinot.integration.tests.custom.ArrayTest::testFloatArrayLiteral[false](1)
Stack Traces | 0.015s run time
expected [3] but found [0]
org.apache.pinot.integration.tests.custom.ArrayTest::testGenerateFloatArray[false](1)
Stack Traces | 0.015s run time
No failure message available
org.apache.pinot.integration.tests.custom.VectorTest::testVectorSimilarity
Stack Traces | 0.038s run time
No failure message available
org.apache.pinot.integration.tests.custom.VectorTest::testVectorSimilarity[false](1)
Stack Traces | 0.039s run time
No failure message available
org.apache.pinot.integration.tests.custom.VectorTest::testQueriesWithLiterals
Stack Traces | 0.084s run time
No failure message available
org.apache.pinot.integration.tests.custom.VectorTest::testQueriesWithLiterals[false](1)
Stack Traces | 0.085s run time
No failure message available
View the full list of 1 :snowflake: flaky test(s)
org.apache.pinot.sql.parsers.CalciteSqlCompilerTest::testFilterClauses

Flake rate in main: 85.92% (Passed 10 times, Failed 61 times)

Stack Traces | 0.006s run time
Cannot get field 'doubleValue' because union is currently set to bigDecimalValue

To view more test analytics, go to the Test Analytics Dashboard 📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

codecov-commenter avatar Dec 13 '25 15:12 codecov-commenter

This problem is more complicated than just changing the literal representation. We need to ensure server side can handle big decimal properly, then change the broker side literal representation in the next release

Jackie-Jiang avatar Dec 19 '25 22:12 Jackie-Jiang