trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.49k stars 3.02k forks source link

Make exception message more descriptive #24119

Closed losipiuk closed 1 week ago

losipiuk commented 1 week ago

Release notes

(x) This is not user-visible or is docs only, and no release notes are required. ( ) Release notes are required. Please propose a release note for me. ( ) Release notes are required, with the following suggested text:

losipiuk commented 1 week ago

Related to exceptions like this:

Caused by: io.trino.spi.TrinoException: Value 7388468618 exceeds MAX_INT            code: 65536, name: GENERIC_INTERNAL_ERROR
        at io.trino.spi.type.AbstractIntType.checkValueValid(AbstractIntType.java:109)
        at io.trino.spi.type.AbstractIntType.writeLong(AbstractIntType.java:97)
        at io.trino.$gen.PageProjectionWork_20241108_192350_37.evaluate(Unknown Source)
        at io.trino.$gen.PageProjectionWork_20241108_192350_37.process(Unknown Source)
        at io.trino.operator.project.DictionaryAwarePageProjection$DictionaryAwarePageProjectionWork.processInternal(DictionaryAwarePageProjection.java:182)
        at io.trino.operator.project.DictionaryAwarePageProjection$DictionaryAwarePageProjectionWork.process(DictionaryAwarePageProjection.java:120)
        at io.trino.operator.project.PageProcessor$ProjectSelectedPositions.processBatch(PageProcessor.java:315)
        at io.trino.operator.project.PageProcessor$ProjectSelectedPositions.process(PageProcessor.java:199)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils.lambda$flatten$6(WorkProcessorUtils.java:317)
        at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:359)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:346)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils.getNextState(WorkProcessorUtils.java:261)
        at io.trino.operator.WorkProcessorUtils$BlockingProcess.process(WorkProcessorUtils.java:207)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils.lambda$flatten$6(WorkProcessorUtils.java:317)
        at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:359)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils$3.process(WorkProcessorUtils.java:346)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils.getNextState(WorkProcessorUtils.java:261)
        at io.trino.operator.WorkProcessorUtils.lambda$processStateMonitor$2(WorkProcessorUtils.java:240)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorUtils.getNextState(WorkProcessorUtils.java:261)
        at io.trino.operator.WorkProcessorUtils.lambda$finishWhen$3(WorkProcessorUtils.java:255)
        at io.trino.operator.WorkProcessorUtils$ProcessWorkProcessor.process(WorkProcessorUtils.java:423)
        at io.trino.operator.WorkProcessorSourceOperatorAdapter.getOutput(WorkProcessorSourceOperatorAdapter.java:133)
        at io.trino.operator.Driver.processInternal(Driver.java:400)
        at io.trino.operator.Driver.lambda$process$8(Driver.java:303)
        at io.trino.operator.Driver.tryWithLock(Driver.java:706)
        at io.trino.operator.Driver.process(Driver.java:295)
        at io.trino.operator.Driver.processForDuration(Driver.java:266)
        at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:891)
        at io.trino.execution.executor.timesharing.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:189)
        at io.trino.execution.executor.timesharing.TimeSharingTaskExecutor$TaskRunner.run(TimeSharingTaskExecutor.java:651)

we sometimes observe