macroguo-ghy commented on code in PR #3416:
URL: https://github.com/apache/calcite/pull/3416#discussion_r1334093135
##########
geode/src/test/java/org/apache/calcite/adapter/geode/rel/GeodeAllDataTypesTest.java:
##########
@@ -161,7 +161,7 @@ private CalciteAssert.AssertThat calciteAssert() {
GeodeAssertions.query("SELECT stringValue AS stringValue "
+ "FROM /allDataTypesRegion WHERE "
+ "stringValue IN SET('abc', 'def') OR floatValue = 1.5678 "
- + "OR booleanValue <> null"));
+ + "OR booleanValue = true OR booleanValue = false"));
Review Comment:
In Geodo adapter, all types are represented as JavaType, so all refs will be
wrapped with `CAST`.
However, `CAST` is not a safe expression as we cannot guarantee the success
or failure of the cast in some cases.
For example:
```sql
cast('2023-03-23' as date) -- success
cast('aaaa' as date) -- fail
```
Both of these statements attempt to cast a varchar as a date, but the first
one is legal while the second one will fail.
But I am not familiar with geodo adapters, so I am not very clear why all
types are using Java types, I only discovered this during debugging.
--
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]