danny0405 commented on a change in pull request #1990:
URL: https://github.com/apache/calcite/pull/1990#discussion_r431061963
##########
File path:
cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraFilter.java
##########
@@ -174,14 +174,13 @@ private String translateMatch(RexNode condition) {
}
}
- /** Convert the value of a literal to a string.
+ /** Returns the value of the literal.
*
* @param literal Literal to translate
- * @return String representation of the literal
+ * @return The value of the literal in the form of the actual type.
*/
- private static String literalValue(RexLiteral literal) {
- Object value = literal.getValue2();
- return String.valueOf(value);
+ private static Object literalValue(RexLiteral literal) {
+ return literal.getValue2();
}
Review comment:
For `Integral` and `string` it is correct, but i'm not sure if it is for
other data types literal, such as `TIMESTAMP(3)`, can you make sure that ?
##########
File path:
cassandra/src/test/java/org/apache/calcite/test/CassandraAdapterDataTypesTest.java
##########
@@ -79,6 +79,18 @@ static void load(Session session) {
+ ", f_varint INTEGER]");
}
+ @Test void testSimpleQuery() {
+ CalciteAssert.that()
Review comment:
`testSimpleQuery()` -> `testFilterWithNonStringLiteral` ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]