Class GridCacheTwoStepQuery
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.GridCacheTwoStepQuery
-
public class GridCacheTwoStepQuery extends Object
Two step map-reduce style query.
-
-
Constructor Summary
Constructors Constructor Description GridCacheTwoStepQuery(String originalSql, int paramsCnt, Set<QueryTable> tbls, GridCacheSqlQuery rdc, List<GridCacheSqlQuery> mapQrys, boolean skipMergeTbl, boolean explain, boolean distributedJoins, boolean replicatedOnly, PartitionResult derivedPartitions, List<Integer> cacheIds, boolean locSplit, boolean treatReplicatedAsPartitioned)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Integer>cacheIds()PartitionResultderivedPartitions()booleandistributedJoins()Check if distributed joins are enabled for this query.booleanexplain()booleanhasCacheIds()booleanisLocal()booleanisLocalSplit()booleanisReplicatedOnly()List<GridCacheSqlQuery>mapQueries()StringoriginalSql()intparametersCount()GridCacheSqlQueryreduceQuery()booleanskipMergeTable()Set<QueryTable>tables()inttablesCount()StringtoString()booleantreatReplicatedAsPartitioned()
-
-
-
Constructor Detail
-
GridCacheTwoStepQuery
public GridCacheTwoStepQuery(String originalSql, int paramsCnt, Set<QueryTable> tbls, GridCacheSqlQuery rdc, List<GridCacheSqlQuery> mapQrys, boolean skipMergeTbl, boolean explain, boolean distributedJoins, boolean replicatedOnly, PartitionResult derivedPartitions, List<Integer> cacheIds, boolean locSplit, boolean treatReplicatedAsPartitioned)
- Parameters:
originalSql- Original SQL.paramsCnt- Parameters count.tbls- Tables.rdc- Reduce query.mapQrys- Map query.skipMergeTbl- Skip merge table flag.explain- Explain flag.distributedJoins- Distributed joins flag.replicatedOnly- Replicated only flag.derivedPartitions- Derived partitions.cacheIds- Cache ids.locSplit- Local split flag.treatReplicatedAsPartitioned- Treat replicated as partitioned flag.
-
-
Method Detail
-
distributedJoins
public boolean distributedJoins()
Check if distributed joins are enabled for this query.- Returns:
trueIf distributed joins enabled.
-
skipMergeTable
public boolean skipMergeTable()
- Returns:
Trueif reduce query can skip merge table creation and get data directly from merge index.
-
explain
public boolean explain()
- Returns:
- If this is explain query.
-
isReplicatedOnly
public boolean isReplicatedOnly()
- Returns:
trueIf all the map queries contain only replicated tables.
-
reduceQuery
public GridCacheSqlQuery reduceQuery()
- Returns:
- Reduce query.
-
mapQueries
public List<GridCacheSqlQuery> mapQueries()
- Returns:
- Map queries.
-
hasCacheIds
public boolean hasCacheIds()
- Returns:
- Whether cache IDs exist.
-
originalSql
public String originalSql()
- Returns:
- Original query SQL.
-
isLocal
public boolean isLocal()
- Returns:
TrueIf query is local.
-
isLocalSplit
public boolean isLocalSplit()
- Returns:
Trueif this is local query with split.
-
derivedPartitions
public PartitionResult derivedPartitions()
- Returns:
- Query derived partitions info.
-
tablesCount
public int tablesCount()
- Returns:
- Nuumber of tables.
-
tables
public Set<QueryTable> tables()
- Returns:
- Tables.
-
parametersCount
public int parametersCount()
- Returns:
- Number of parameters
-
treatReplicatedAsPartitioned
public boolean treatReplicatedAsPartitioned()
- Returns:
trueif need to treat replicated as partitioned (for outer joins).
-
-