Roman Churganov created CALCITE-6647: ----------------------------------------
Summary: union with params and limit looping Key: CALCITE-6647 URL: https://issues.apache.org/jira/browse/CALCITE-6647 Project: Calcite Issue Type: Bug Components: core Affects Versions: 1.34.0 Reporter: Roman Churganov If query has a sub-query in EXIXST function and full column names used in sub-query , like {code:sql} SELECT sch1.foo.c11 FROM sch1.foo WHERE exists ( SELECT sch2.tab.c41 FROM sch2.tab where sch2.tab.c41 = 1 ) {code} it fails with exception: {noformat} ..... at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:787) at org.apache.calcite.prepare.PlannerImpl.validate(PlannerImpl.java:226) ... 73 more Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Table 'SCH2.TAB' not found at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:505) at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:599) ... 98 more {noformat} also need to have a different table in the outer query to reproduce -- This message was sent by Atlassian Jira (v8.20.10#820010)