gortiz opened a new issue, #9075:
URL: https://github.com/apache/pinot/issues/9075

   SQL defines the [extract expression](https://modern-sql.com/feature/extract) 
that can be used to access components of temporal datatypes. Calcite already 
supports it, so when an expression includes an extract function it parses. But 
once Pinot tries to convert it to its own expression AST, it fails with:
   ```
   ProcessingException(errorCode:150, message:PQLParsingError:
   java.lang.ClassCastException: class 
org.apache.calcite.sql.SqlIntervalQualifier cannot be cast to class 
org.apache.calcite.sql.SqlBasicCall 
(org.apache.calcite.sql.SqlIntervalQualifier and 
org.apache.calcite.sql.SqlBasicCall are in unnamed module of loader 'app')
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.toExpression(CalciteSqlParser.java:682)
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.compileFunctionExpression(CalciteSqlParser.java:737)
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.toExpression(CalciteSqlParser.java:682)
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.toExpression(CalciteSqlParser.java:619))
   ```
   
   Pinot already have functions like `minute`, `year`, etc so this seems to be 
a matter of syntax.
   
   


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

Reply via email to