You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/07/20 09:33:39 UTC

[GitHub] [pinot] gortiz opened a new issue, #9075: Support extract syntax

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: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] tanmesh commented on issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
tanmesh commented on issue #9075:
URL: https://github.com/apache/pinot/issues/9075#issuecomment-1254424754

   I have added the documentation in the PR above ^. Please review it. 


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #9075:
URL: https://github.com/apache/pinot/issues/9075#issuecomment-1249670483

   @tanmesh Can you help also update this document page: https://docs.pinot.apache.org/users/user-guide-query/supported-transformations#transform-functions
   The source code can be found here: https://github.com/pinot-contrib/pinot-docs


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang closed issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang closed issue #9075: Support extract syntax
URL: https://github.com/apache/pinot/issues/9075


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] tanmesh commented on issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
tanmesh commented on issue #9075:
URL: https://github.com/apache/pinot/issues/9075#issuecomment-1248731920

   @npawar Update -- PR is merged. 


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #9075:
URL: https://github.com/apache/pinot/issues/9075#issuecomment-1254438354

   Merged. Thank you so much for your contribution!


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] tanmesh commented on issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
tanmesh commented on issue #9075:
URL: https://github.com/apache/pinot/issues/9075#issuecomment-1200645865

   I am planning to pick this up.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] tanmesh commented on issue #9075: Support extract syntax

Posted by GitBox <gi...@apache.org>.
tanmesh commented on issue #9075:
URL: https://github.com/apache/pinot/issues/9075#issuecomment-1209600382

   I have added the progress so far in the above PR. May I get some eyes on this, to ensure that I am on the right track?### 


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org