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


##########
processing/src/main/java/org/apache/druid/query/planning/DataSourceAnalysis.java:
##########
@@ -117,6 +118,8 @@
   {
     if (baseDataSource instanceof TableDataSource) {
       return Optional.of((TableDataSource) baseDataSource);
+    } else if (baseDataSource instanceof SampledTableDataSource) {

Review Comment:
   ## Contradictory type checks
   
   This access of [baseDataSource](1) cannot be of type 
[SampledTableDataSource](2), since [this expression](3) ensures that it is not 
of type [TableDataSource](4).
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5920)



##########
processing/src/main/java/org/apache/druid/query/planning/DataSourceAnalysis.java:
##########
@@ -216,6 +219,7 @@
   public boolean isTableBased()
   {
     return (baseDataSource instanceof TableDataSource
+            || baseDataSource instanceof SampledTableDataSource

Review Comment:
   ## Contradictory type checks
   
   This access of [baseDataSource](1) cannot be of type 
[SampledTableDataSource](2), since [this expression](3) ensures that it is not 
of type [TableDataSource](4).
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5922)



##########
processing/src/main/java/org/apache/druid/query/planning/DataSourceAnalysis.java:
##########
@@ -117,6 +118,8 @@
   {
     if (baseDataSource instanceof TableDataSource) {
       return Optional.of((TableDataSource) baseDataSource);
+    } else if (baseDataSource instanceof SampledTableDataSource) {
+      return Optional.of((SampledTableDataSource) baseDataSource);

Review Comment:
   ## Contradictory type checks
   
   This access of [baseDataSource](1) cannot be of type 
[SampledTableDataSource](2), since [this expression](3) ensures that it is not 
of type [TableDataSource](4).
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5921)



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