mihaibudiu commented on code in PR #4060:
URL: https://github.com/apache/calcite/pull/4060#discussion_r1854517110


##########
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"

Review Comment:
   putting this in a comment will help a bit - the purpose of this choice is 
clearer
   but if you have validated this using other external means, like another DB, 
you can also mention it in a 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]

Reply via email to