Ali Alsuliman has posted comments on this change.

Change subject: [ASTERIXDB-2194][COMP] Introduce datasource functions
......................................................................


Patch Set 6:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2216/6/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroducePrimaryIndexForAggregationRule.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroducePrimaryIndexForAggregationRule.java:

PS6, Line 184:  if (scanOperator instanceof DataSourceScanOperator) {
             :             DataSourceScanOperator dss = 
(DataSourceScanOperator) scanOperator;
             :             DataSource ds = (DataSource) dss.getDataSource();
             :             if (ds.getDatasourceType() != 
DataSource.Type.INTERNAL_DATASET) {
             :                 return false;
             :             }
             :         }
> Sure. I will move the check in the findDataset call..
While you are at it, look at line 276.
Should we check whether "dataset" is null? In terms of codebase, it could 
happen that the returned dataset is null. But I don't know if that will ever 
happen. If we want to avoid the nasty "null pointer" exception, you could add 
the check right after the if-else block (before using "dataset" object)


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2216
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibcf807ac713a21e8f4d59868525467386e801303
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to