julianhyde commented on code in PR #3037:
URL: https://github.com/apache/calcite/pull/3037#discussion_r1088520936
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlTimestampAddFunction.java:
##########
@@ -109,6 +106,16 @@ public static RelDataType deduceType(RelDataTypeFactory
typeFactory,
|| operandType2.isNullable());
}
+ private static SqlTypeName sanitize(SqlTypeName typeName) {
+ switch (typeName) {
+ case TIME:
+ case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
+ return typeName;
+ default: // usually DATE or TIMESTAMP
Review Comment:
i don't understand the comment
##########
babel/src/test/java/org/apache/calcite/test/BabelQuidemTest.java:
##########
@@ -112,6 +113,12 @@ public static void main(String[] args) throws Exception {
.with(CalciteConnectionProperty.CONFORMANCE,
SqlConformanceEnum.BABEL)
.with(CalciteConnectionProperty.LENIENT_OPERATOR_LOOKUP, true)
+ .with(
+ ConnectionFactories.addType("DATETIME", typeFactory ->
+ typeFactory.createSqlType(SqlTypeName.TIMESTAMP)))
Review Comment:
indent line. It an argument to the function on the previous line
##########
testkit/src/main/java/org/apache/calcite/test/ConnectionFactories.java:
##########
@@ -162,6 +169,25 @@ private static class MapConnectionFactory implements
ConnectionFactory {
}
}
+ /** Post-processor that adds a {@link Schema} and sets it as default. */
Review Comment:
i don't understand the comment
--
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]