github-advanced-security[bot] commented on code in PR #20607:
URL: https://github.com/apache/druid/pull/20607#discussion_r4366457731


##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteJoinQueryTest.java:
##########
@@ -5404,6 +5409,51 @@
     );
   }
 
+  @DecoupledTestConfig(quidemReason = 
QuidemTestCaseReason.JOIN_FILTER_LOCATIONS)
+  @Test
+  public void testRequireTimeConditionBroadcastRightSidePositive()
+  {
+    // Cannot vectorize JOIN operator.
+    cannotVectorize();
+
+    // A broadcast table joined directly on the right-hand side does not need 
a time condition. Only the left-hand
+    // side, which reads segments, does.
+    testQuery(
+        PLANNER_CONFIG_REQUIRE_TIME_CONDITION,
+        "SELECT druid.broadcast.dim4, COUNT(*)\n"
+        + "FROM druid.numfoo\n"
+        + "INNER JOIN druid.broadcast ON numfoo.dim4 = broadcast.dim4\n"
+        + "WHERE numfoo.__time >= TIMESTAMP '2000-01-02 00:00:00' AND 
numfoo.__time < TIMESTAMP '2001-01-02 00:00:00'\n"
+        + "GROUP BY 1",
+        CalciteTests.REGULAR_USER_AUTH_RESULT,
+        ImmutableList.of(
+            GroupByQuery.builder()
+                        .setDataSource(
+                            join(
+                                new TableDataSource(CalciteTests.DATASOURCE3),
+                                new 
GlobalTableDataSource(CalciteTests.BROADCAST_DATASOURCE),
+                                "j0.",
+                                equalsCondition(
+                                    makeColumnExpression("dim4"),

Review Comment:
   ## CodeQL / Deprecated method or constructor invocation
   
   Invoking [CalciteTestBase.makeColumnExpression](1) should be avoided because 
it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/12119)



##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteJoinQueryTest.java:
##########
@@ -5404,6 +5409,51 @@
     );
   }
 
+  @DecoupledTestConfig(quidemReason = 
QuidemTestCaseReason.JOIN_FILTER_LOCATIONS)
+  @Test
+  public void testRequireTimeConditionBroadcastRightSidePositive()
+  {
+    // Cannot vectorize JOIN operator.
+    cannotVectorize();
+
+    // A broadcast table joined directly on the right-hand side does not need 
a time condition. Only the left-hand
+    // side, which reads segments, does.
+    testQuery(
+        PLANNER_CONFIG_REQUIRE_TIME_CONDITION,
+        "SELECT druid.broadcast.dim4, COUNT(*)\n"
+        + "FROM druid.numfoo\n"
+        + "INNER JOIN druid.broadcast ON numfoo.dim4 = broadcast.dim4\n"
+        + "WHERE numfoo.__time >= TIMESTAMP '2000-01-02 00:00:00' AND 
numfoo.__time < TIMESTAMP '2001-01-02 00:00:00'\n"
+        + "GROUP BY 1",
+        CalciteTests.REGULAR_USER_AUTH_RESULT,
+        ImmutableList.of(
+            GroupByQuery.builder()
+                        .setDataSource(
+                            join(
+                                new TableDataSource(CalciteTests.DATASOURCE3),
+                                new 
GlobalTableDataSource(CalciteTests.BROADCAST_DATASOURCE),
+                                "j0.",
+                                equalsCondition(
+                                    makeColumnExpression("dim4"),
+                                    makeColumnExpression("j0.dim4")

Review Comment:
   ## CodeQL / Deprecated method or constructor invocation
   
   Invoking [CalciteTestBase.makeColumnExpression](1) should be avoided because 
it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/12120)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to