Hi!
We have an error in this SQL query which seems very straightforward.
The source is PostgreSQL 9.6.
Dremio 3.1.6-201903070042400578-fdcd3a8
It works well with psql or metabase for instance.
Any idea of what could be wrong ? Many thanks
select
bookings.deal_id,
(select loggables.created_at from loggables where loggables.loggable_id = bookings.id) as confirmation_date
from bookings limit 5
The following error raises:
While invoking method 'public org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$Result org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit(org.apache.calcite.rel.core.Sort)'
Verbose:
PLAN ERROR: While invoking method 'public org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$Result org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit(org.apache.calcite.rel.core.Sort)'
SQL Query select
bookings.deal_id,
(select loggables.created_at from loggables where loggables.loggable_id = bookings.id) as confirmation_date
from bookings
limit 5
(java.lang.RuntimeException) While invoking method 'public org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$Result org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit(org.apache.calcite.rel.core.Sort)'
org.apache.calcite.util.ReflectUtil$2.invoke():527
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.reflect.InvocationTargetException) null
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.RuntimeException) While invoking method 'public org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$Result org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit(org.apache.calcite.rel.core.Project)'
org.apache.calcite.util.ReflectUtil$2.invoke():527
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.reflect.InvocationTargetException) null
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.RuntimeException) While invoking method 'public org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$Result org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit(org.apache.calcite.rel.core.Project)'
org.apache.calcite.util.ReflectUtil$2.invoke():527
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():698
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.processProjectChild():238
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():250
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.reflect.InvocationTargetException) null
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():698
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.processProjectChild():238
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():250
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
<truncated>
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.RuntimeException) While invoking method 'public org.apache.calcite.rel.rel2sql.SqlImplementor$Result org.apache.calcite.rel.rel2sql.RelToSqlConverter.visit(org.apache.calcite.rel.core.Filter)'
org.apache.calcite.util.ReflectUtil$2.invoke():527
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():249
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():698
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.processProjectChild():238
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():250
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.reflect.InvocationTargetException) null
sun.reflect.GeneratedMethodAccessor601.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():249
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():698
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.processProjectChild():238
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():250
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748
Caused By (java.lang.ArrayIndexOutOfBoundsException) -1
com.google.common.collect.RegularImmutableList.get():58
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioAliasContext.field():877
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():645
org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql():711
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():742
org.apache.calcite.rel.rel2sql.SqlImplementor$Context.toSql():592
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.lambda$toSql$0():723
com.dremio.exec.store.jdbc.dialect.arp.ArpDialect.decorateSqlNode():508
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():724
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visit():179
sun.reflect.GeneratedMethodAccessor601.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():249
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter$DremioContext.toSql():698
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.processProjectChild():238
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():250
sun.reflect.GeneratedMethodAccessor506.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
org.apache.calcite.rel.rel2sql.DremioRelToSqlConverter.visit():351
sun.reflect.GeneratedMethodAccessor504.invoke():-1
sun.reflect.DelegatingMethodAccessorImpl.invoke():43
java.lang.reflect.Method.invoke():498
org.apache.calcite.util.ReflectUtil$2.invoke():524
org.apache.calcite.rel.rel2sql.RelToSqlConverter.dispatch():106
org.apache.calcite.rel.rel2sql.RelToSqlConverter.visitChild():112
com.dremio.exec.store.jdbc.rel.JdbcPrel.<init>():122
com.dremio.exec.store.jdbc.rel.JdbcIntermediatePrel.finalizeRel():60
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():30
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.StatelessRelShuttleImpl.visitChild():37
org.apache.calcite.rel.RelShuttleImpl.visitChildren():61
org.apache.calcite.rel.RelShuttleImpl.visit():123
com.dremio.exec.planner.sql.handlers.PrelFinalizer.visit():32
org.apache.calcite.rel.AbstractRelNode.accept():279
com.dremio.exec.planner.sql.handlers.PrelTransformer.convertToPrel():503
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():49
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():69
com.dremio.exec.work.foreman.AttemptManager.run():288
java.util.concurrent.ThreadPoolExecutor.runWorker():1149
java.util.concurrent.ThreadPoolExecutor$Worker.run():624
java.lang.Thread.run():748