xiangfu0 commented on code in PR #11332:
URL: https://github.com/apache/pinot/pull/11332#discussion_r1292896667
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -238,6 +240,11 @@ public List<String> getTableNamesForQuery(String sqlQuery)
{
Set<String> tableNames =
RelToPlanNodeConverter.getTableNamesFromRelRoot(relRoot.rel);
return new ArrayList<>(tableNames);
} catch (Throwable t) {
+ String errorMessage = t.getMessage();
+ if (errorMessage.contains("Could not find schema for table: ")) {
Review Comment:
In that case, the query parser will return below message, it's more
confusion about this `Object 'airlineStats1' not found`
```
ProcessingException(errorCode:150, message:SQLParsingError:
java.lang.RuntimeException: Error composing query plan for: select * from
airlineStats1 limit 10
at
org.apache.pinot.query.QueryEnvironment.getTableNamesForQuery(QueryEnvironment.java:248)
at
org.apache.pinot.controller.api.resources.PinotQueryResource.getMultiStageQueryResponse(PinotQueryResource.java:210)
at
org.apache.pinot.controller.api.resources.PinotQueryResource.executeSqlQuery(PinotQueryResource.java:173)
at
org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java:121)
...
Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1,
column 15 to line 1, column 27: Object 'airlineStats1' not found
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
...
Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Object
'airlineStats1' not found
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490))`
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]