xuzifu666 commented on code in PR #4679:
URL: https://github.com/apache/calcite/pull/4679#discussion_r2613663290
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java:
##########
@@ -430,6 +430,9 @@ private Expression getConvertExpression(
return Expressions.call(BuiltInMethod.STRING_TO_BOOLEAN.method,
operand);
default:
+ if (sourceType.getFamily() == SqlTypeFamily.NUMERIC) {
+ return Expressions.call(BuiltInMethod.STRING_TO_BOOLEAN.method,
operand);
Review Comment:
I added some test cases related to ```NULL``` and ```Double```, and the
results should be as expected.
I added the variable type to ```RelToSqlConverterTest``` (which will convert
it to var <>0), but I don't seem to fully understand the test way for -0e0.
@mihaibudiu
--
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]