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: [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