jackjlli commented on a change in pull request #6361:
URL: https://github.com/apache/incubator-pinot/pull/6361#discussion_r562132809
##########
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)) {
+ columnNamesFromQuery.removeAll(columnNamesFromSchema);
Review comment:
Aliasing case has been covered in integration tests. We should be good
here. :)
----------------------------------------------------------------
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]