mihaibudiu commented on code in PR #4060:
URL: https://github.com/apache/calcite/pull/4060#discussion_r1854520638
##########
core/src/test/java/org/apache/calcite/plan/RelWriterTest.java:
##########
@@ -740,6 +740,53 @@ private static Fixture relFn(Function<RelBuilder, RelNode>
relFn) {
.assertThatPlan(isLinux(expected));
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6703">[CALCITE-6703]
+ * RelJson cannot handle timestamps prior to 1970-01-25 20:31:23.648</a>. */
+ @Test void testJsonToRexForTimestamp() {
+ final String timestampRepresentedAsInt = "{\n"
+ + " \"literal\": 2129400000,\n"
+ + " \"type\": {\n"
+ + " \"type\": \"TIMESTAMP\",\n"
+ + " \"nullable\": false\n"
+ + " }\n"
+ + "}\n";
+ final String timestampRepresentedAsLong = "{\n"
+ + " \"literal\": 3129400000,\n"
+ + " \"type\": {\n"
+ + " \"type\": \"TIMESTAMP\",\n"
+ + " \"nullable\": false\n"
+ + " }\n"
+ + "}\n";
+
+ assertThatReadExpressionResult(timestampRepresentedAsInt, is("1970-01-25
15:30:00"));
Review Comment:
I have approved, I leave to you this decision.
--
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]