prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.99k stars 5.36k forks source link

[native] Decimal not getting wrapped in java type #19999

Open vermapratyush opened 1 year ago

vermapratyush commented 1 year ago

For native workload, decimal values are not getting wrapped in a java type. Following tests fail with the exception: Test:

TestPrestoSparkExpressionCompiler.smokedTest
TestPrestoSparkExpressionCompiler.testSimpleCase
TestPrestoSparkExpressionCompiler.testUnaryOperators
TestPrestoSparkExpressionCompiler.testBinaryOperatorsDecimalBigint
TestPrestoSparkExpressionCompiler.testBinaryOperatorsDecimalInteger
TestPrestoSparkExpressionCompiler.testBinaryOperatorsDecimalDouble
Caused by: java.lang.IllegalArgumentException: Object '9.0' does not match type long
    at com.facebook.presto.common.Utils.nativeValueToBlock(Utils.java:33)
    at com.facebook.presto.operator.scalar.FunctionAssertions.interpret(FunctionAssertions.java:947)
    at com.facebook.presto.operator.scalar.FunctionAssertions.executeProjectionWithAll(FunctionAssertions.java:637)
    at com.facebook.presto.operator.scalar.FunctionAssertions.selectUniqueValue(FunctionAssertions.java:335)
    at com.facebook.presto.operator.scalar.FunctionAssertions.selectSingleValue(FunctionAssertions.java:330)
    at com.facebook.presto.operator.scalar.FunctionAssertions.assertFunction(FunctionAssertions.java:258)
    at com.facebook.presto.sql.gen.TestExpressionCompiler$AssertExecuteTask.run(TestExpressionCompiler.java:1950)
    ... 31 more
majetideepak commented 1 year ago

@karteekmurthys Do you want to take a look at this issue?