amrishlal commented on a change in pull request #8029:
URL: https://github.com/apache/pinot/pull/8029#discussion_r820149183
##########
File path:
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -369,6 +369,9 @@ private static PinotQuery
compileCalciteSqlToPinotQuery(String sql) {
DataSource dataSource = new DataSource();
dataSource.setTableName(fromNode.toString());
pinotQuery.setDataSource(dataSource);
+ if (fromNode instanceof SqlSelect || fromNode instanceof SqlOrderBy) {
Review comment:
Not sure if I understand. If there is no table name in the FROM clause,
then what is the use of setting the tableName and that too to a string that is
actually represents another query? Note that the definition of datasource in
query.thrift file allows for tableName being null
```
struct DataSource {
1: optional string tableName;
2: optional PinotQuery subquery;
}
```
Also Pinot supports queries without from clause, so even in current code
table name (and also subquery) can be null at the same time.
--
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]