jackjlli commented on a change in pull request #6361:
URL: https://github.com/apache/incubator-pinot/pull/6361#discussion_r545991126
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/executor/ServerQueryExecutorV1Impl.java
##########
@@ -259,6 +260,18 @@ private DataTable processQuery(List<IndexSegment>
indexSegments, QueryContext qu
ExecutorService executorService, @Nullable
StreamObserver<Server.ServerResponse> responseObserver, long endTimeMs,
boolean enableStreaming)
throws Exception {
+
+ // Validate whether column names in the query are valid
+ Set<String> columnNamesFromSchema =
_instanceDataManager.getColumnNamesByTable(queryContext.getTableName());
+ Set<String> columnNamesFromQuery = queryContext.getColumns();
+ if (!columnNamesFromSchema.isEmpty() &&
!columnNamesFromSchema.containsAll(columnNamesFromQuery)) {
Review comment:
The empty check is warranted. E.g. in local pinot cluster, there is no
need to upload table schema before creating offline table config. Thus, ZK may
not store any table schema for the table that is about to be queried.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]