xiedeyantu commented on code in PR #4719:
URL: https://github.com/apache/calcite/pull/4719#discussion_r2659275915
##########
core/src/main/java/org/apache/calcite/sql/dialect/MssqlSqlDialect.java:
##########
@@ -200,6 +200,20 @@ public MssqlSqlDialect(Context context) {
unparseBoolLiteralToCondition(writer, value);
}
+ @Override public SqlNode rewriteBooleanLiteral(SqlNode node) {
+ if (node instanceof SqlLiteral) {
+ SqlLiteral literal = (SqlLiteral) node;
+ if (literal.getTypeName() == SqlTypeName.BOOLEAN) {
+ Boolean value = (Boolean) literal.getValue();
+ if (value == null) {
+ return SqlLiteral.createNull(SqlParserPos.ZERO);
Review Comment:
Yes, that's a good question. MSSQL does not support the boolean type, so
this method cannot be used for testing. I haven't thought of a good way to test
this.
```
select * from (values(cast(NULL as boolean)));
```
--
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]