presto抛出java.lang.ArithmeticException:Rounding necessary异常

com.facebook.presto.spi.PrestoException: Rounding necessary
	at com.facebook.presto.plugin.greenplum.GreenPlumRecordCursor.handleSqlException(GreenPlumRecordCursor.java:239)
	at com.facebook.presto.plugin.greenplum.GreenPlumRecordCursor.getSlice(GreenPlumRecordCursor.java:179)
	at com.facebook.presto.spi.RecordPageSource.getNextPage(RecordPageSource.java:128)
	at com.facebook.presto.operator.TableScanOperator.getOutput(TableScanOperator.java:255)
	at com.facebook.presto.operator.Driver.processInternal(Driver.java:424)
	at com.facebook.presto.operator.Driver.lambda$processFor$9(Driver.java:307)
	at com.facebook.presto.operator.Driver.tryWithLock(Driver.java:728)
	at com.facebook.presto.operator.Driver.processFor(Driver.java:300)
	at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1079)
	at com.facebook.presto.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:162)
	at com.facebook.presto.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:599)
	at com.facebook.presto.$gen.Presto_0_272_ad0c271____20241211_130014_1.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArithmeticException: Rounding necessary
	at java.math.BigDecimal.commonNeedIncrement(BigDecimal.java:4151)
	at java.math.BigDecimal.needIncrement(BigDecimal.java:4207)
	at java.math.BigDecimal.divideAndRound(BigDecimal.java:4115)
	at java.math.BigDecimal.setScale(BigDecimal.java:2455)
	at java.math.BigDecimal.setScale(BigDecimal.java:2389)
	at com.facebook.presto.common.type.Decimals.encodeScaledValue(Decimals.java:158)
	at com.facebook.presto.plugin.greenplum.StandardReadMappings.lambda$decimalReadMapping$2(StandardReadMappings.java:108)
	at com.facebook.presto.plugin.greenplum.GreenPlumRecordCursor.getSlice(GreenPlumRecordCursor.java:176)
	... 13 more

这个异常,是presto处理数据发生了精度问题,通常是数据源的精度太高presto读不出来,极少情况是舍位运算的时候发生了精读丢失

精度太高上一般是浮点数小数点后的位数太长
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值