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


##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteJoinQueryTest.java:
##########
@@ -5100,6 +5134,62 @@
     );
   }
 
+  @MethodSource("provideQueryContexts")
+  @ParameterizedTest(name = "{0}")
+  public void testJoinOnRestricted(Map<String, Object> queryContext)
+  {
+    String sql = "SELECT druid.restrictedBroadcastDatasource_m1_is_6.dim4, 
COUNT(*)\n"
+                 + "FROM druid.numfoo\n"
+                 + "INNER JOIN druid.restrictedBroadcastDatasource_m1_is_6 ON 
numfoo.dim4 = restrictedBroadcastDatasource_m1_is_6.dim4\n"
+                 + "GROUP BY 1 ORDER BY 2 LIMIT 4";
+    testQuery(
+        PLANNER_CONFIG_DEFAULT,
+        sql,
+        CalciteTests.SUPER_USER_AUTH_RESULT,
+        ImmutableList.of(
+            new TopNQueryBuilder()
+                .dataSource(
+                    join(
+                        new TableDataSource(CalciteTests.DATASOURCE3),
+                        RestrictedDataSource.create(
+                            new 
GlobalTableDataSource(CalciteTests.RESTRICTED_BROADCAST_DATASOURCE),
+                            CalciteTests.POLICY_NO_RESTRICTION_SUPERUSER
+                        ),
+                        "j0.",
+                        equalsCondition(makeColumnExpression("dim4"), 
makeColumnExpression("j0.dim4")),

Review Comment:
   ## 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/9203)



##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteJoinQueryTest.java:
##########
@@ -5100,6 +5134,62 @@
     );
   }
 
+  @MethodSource("provideQueryContexts")
+  @ParameterizedTest(name = "{0}")
+  public void testJoinOnRestricted(Map<String, Object> queryContext)
+  {
+    String sql = "SELECT druid.restrictedBroadcastDatasource_m1_is_6.dim4, 
COUNT(*)\n"
+                 + "FROM druid.numfoo\n"
+                 + "INNER JOIN druid.restrictedBroadcastDatasource_m1_is_6 ON 
numfoo.dim4 = restrictedBroadcastDatasource_m1_is_6.dim4\n"
+                 + "GROUP BY 1 ORDER BY 2 LIMIT 4";
+    testQuery(
+        PLANNER_CONFIG_DEFAULT,
+        sql,
+        CalciteTests.SUPER_USER_AUTH_RESULT,
+        ImmutableList.of(
+            new TopNQueryBuilder()
+                .dataSource(
+                    join(
+                        new TableDataSource(CalciteTests.DATASOURCE3),
+                        RestrictedDataSource.create(
+                            new 
GlobalTableDataSource(CalciteTests.RESTRICTED_BROADCAST_DATASOURCE),
+                            CalciteTests.POLICY_NO_RESTRICTION_SUPERUSER
+                        ),
+                        "j0.",
+                        equalsCondition(makeColumnExpression("dim4"), 
makeColumnExpression("j0.dim4")),

Review Comment:
   ## 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/9202)



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