You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "imply-cheddar (via GitHub)" <gi...@apache.org> on 2023/04/04 22:49:27 UTC

[GitHub] [druid] imply-cheddar commented on a diff in pull request #14020: Frames: Ensure nulls are read as default values when appropriate.

imply-cheddar commented on code in PR #14020:
URL: https://github.com/apache/druid/pull/14020#discussion_r1157838352


##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQFaultsTest.java:
##########
@@ -132,24 +135,51 @@ public void testInsertTimeOutOfBoundsFault()
   @Test
   public void testInsertTimeNullFault()
   {
+    final String expectedDataSource = "foo1";
+
     final RowSignature rowSignature =
         RowSignature.builder()
                     .add("__time", ColumnType.LONG)
-                    .add("dim1", ColumnType.STRING)
+                    .add("cnt", ColumnType.STRING)
                     .build();
 
-    testIngestQuery()
-        .setSql(
-            "INSERT INTO foo1\n"
-            + "SELECT TIME_PARSE(dim1) AS __time, dim1 as cnt\n"
-            + "FROM foo\n"
-            + "PARTITIONED BY DAY\n"
-            + "CLUSTERED BY dim1")
-        .setExpectedDataSource("foo1")
-        .setExpectedRowSignature(rowSignature)
-        .setExpectedSegment(ImmutableSet.of(SegmentId.of("foo", Intervals.of("2000-01-01T/P1M"), "test", 0)))
-        .setExpectedMSQFault(InsertTimeNullFault.instance())
-        .verifyResults();
+    final String sql = "INSERT INTO foo1\n"
+                     + "SELECT TIME_PARSE(dim1) AS __time, dim1 as cnt\n"
+                     + "FROM foo\n"
+                     + "PARTITIONED BY DAY\n"
+                     + "CLUSTERED BY dim1";

Review Comment:
   If you were to add a `WHERE TIME_PARSE(dim1) is not null` to the query, do the results of the two queries becomes the same regardless of mode?  I think they should, but curious.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org