gortiz commented on PR #3635:
URL: https://github.com/apache/calcite/pull/3635#issuecomment-1938501532

   I have a couple of questions about this PR.
   
   ## does it actually fix the issue?
   
   The issue was the assertion error when casting STRING to VARBINARY. I'm not 
an expert on Apache Calcite, so I may be wrong, but it looks to me that this is 
only fixing the issue in the Enumerable convention.
   
   What about other cases? For example in Apache Pinot we found this issue when 
executing `SqlToRelConverted.trimUnusedFields`. Specifically, when the 
expression is a literal like `CAST('sometext' as VARBINARY)`.
   
   As said, I'm a noob here, but I don't see a call to 
`RexToLixTranslator.translateCast` in our stacktrace.
   
   ## how can we change the implementation used?
   
   Specifically, this PR defines an arbitrary way to transform from String to 
Binary, but other systems may want to apply different logic to do so. In Pinot 
case we apply this cast by interpreting the String as hex codified. I guess we 
could override the implementation of `stringToBinary`, but I'm not sure.


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

Reply via email to