You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/11/16 11:59:34 UTC

[GitHub] [druid] clintropolis opened a new pull request #11928: sql skip reduce of complex literal expressions

clintropolis opened a new pull request #11928:
URL: https://github.com/apache/druid/pull/11928


   ### Description
   Druid literal expressions which produce complex constants should not be fully reduced by `DruidRexExecutor`, because they use a custom `SqlType`, `RowSignatures.ComplexSqlType`, which the underlying type factory of the rex builder doesn't know how to cope with, resulting in a stack overflow exception.
   
   Reducing these expressions to a constant likely doesn't make sense anyway, since in many cases complex types are binaries, so `DruidRexExecutor` now ignores them.
   
   Added a test for `DruidRexExecutor` that covers a case where the expression is expected to be reduced, and a case where it is not (since no complex literal expression are actually wired up to SQL yet, this fakes an operator for the hyperunique constructor expression).
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `DruidRexExecutor`
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [x] been tested in a test Druid cluster.
   


-- 
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@druid.apache.org

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



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


[GitHub] [druid] gianm merged pull request #11928: sql skip reduce of complex literal expressions

Posted by GitBox <gi...@apache.org>.
gianm merged pull request #11928:
URL: https://github.com/apache/druid/pull/11928


   


-- 
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@druid.apache.org

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



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