mayankshriv commented on a change in pull request #4535: Implement DISTINCT 
clause
URL: https://github.com/apache/incubator-pinot/pull/4535#discussion_r318269591
 
 

 ##########
 File path: 
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
 ##########
 @@ -145,12 +148,12 @@ private static PinotQuery 
compileCalciteSqlToPinotQuery(String sql) {
         DataSource dataSource = new DataSource();
         dataSource.setTableName(selectSqlNode.getFrom().toString());
         pinotQuery.setDataSource(dataSource);
-        
pinotQuery.setSelectList(convertSelectList(selectSqlNode.getSelectList()));
+        
pinotQuery.setSelectList(convertSelectList(selectSqlNode.getSelectList(), 
selectSqlNode.getModifierNode(SqlSelectKeyword.DISTINCT)));
 
 Review comment:
   Seems like we are still special casing DISTINCT, is there a way to avoid 
that? If this is to work around the fact that distinct could have multiple 
arguments, then one option could be to create a single comma separated string 
as argument for distinct (that the distinct operator can split). Neither 
approach is clean, but to me it seems lesser of the two evils right now.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to