You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "github-code-scanning[bot] (via GitHub)" <gi...@apache.org> on 2023/05/10 18:51:35 UTC

[GitHub] [druid] github-code-scanning[bot] commented on a diff in pull request #14247: Define DruidInputSource getTypes() method

github-code-scanning[bot] commented on code in PR #14247:
URL: https://github.com/apache/druid/pull/14247#discussion_r1190284759


##########
indexing-service/src/test/java/org/apache/druid/indexing/input/DruidInputSourceTest.java:
##########
@@ -299,4 +299,36 @@
     Assert.assertTrue(columnsFilter.apply(column));
     Assert.assertFalse(columnsFilter.apply(metricName));
   }
+
+  @Test
+  public void testGetTypesEmpty()
+  {
+    String datasource = "foo";
+    Interval interval = Intervals.of("2000/2001");
+    String column = "c1";
+    String metricName = "m1";
+    ColumnsFilter originalColumnsFilter = ColumnsFilter.inclusionBased(ImmutableSet.of(column));
+    InputRowSchema inputRowSchema = new InputRowSchema(
+        new TimestampSpec("timestamp", "auto", null),
+        new DimensionsSpec(
+            DimensionsSpec.getDefaultSchemas(Arrays.asList("timestamp", "a", "b"))
+        ),
+        originalColumnsFilter,
+        ImmutableSet.of(metricName)
+    );

Review Comment:
   ## Unread local variable
   
   Variable 'InputRowSchema inputRowSchema' is never read.
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/4943)



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