mirror of https://github.com/citusdata/citus.git
support for single repartition join mode
parent
ad3b6ed164
commit
103c4e61f3
|
@ -89,6 +89,8 @@ Schema for Query configuration:
|
|||
```yaml
|
||||
queryCount: <int>
|
||||
queryOutFile: <string>
|
||||
repartitionJoin: <bool>
|
||||
singleRepartitionJoin: <bool>
|
||||
semiAntiJoin: <bool>
|
||||
cartesianProduct: <bool>
|
||||
limit: <bool>
|
||||
|
@ -116,6 +118,8 @@ Explanation:
|
|||
```yaml
|
||||
queryCount: "number of queries to generate"
|
||||
queryOutFile: "file to write generated queries"
|
||||
repartitionJoin: "should we enable repartition join"
|
||||
singleRepartitionJoin: "should we make default repartition join mode as single repartition join (default is dual)"
|
||||
semiAntiJoin: "should we support semi joins (WHERE col IN (Subquery))"
|
||||
cartesianProduct: "should we support cartesian joins"
|
||||
limit: "should we support limit clause"
|
||||
|
|
|
@ -28,6 +28,8 @@ class Config:
|
|||
self.targetRteCount = configObj["targetRteCount"]
|
||||
self.targetCteCount = configObj["targetCteCount"]
|
||||
self.targetCteRteCount = configObj["targetCteRteCount"]
|
||||
self.repartitionJoin = configObj["repartitionJoin"]
|
||||
self.singleRepartitionJoin = configObj["singleRepartitionJoin"]
|
||||
self.semiAntiJoin = configObj["semiAntiJoin"]
|
||||
self.cartesianProduct = configObj["cartesianProduct"]
|
||||
self.limit = configObj["limit"]
|
||||
|
|
|
@ -2,6 +2,8 @@ interactiveMode: false
|
|||
queryCount: 250
|
||||
queryOutFile: queries.sql
|
||||
ddlOutFile: ddls.sql
|
||||
repartitionJoin: true
|
||||
singleRepartitionJoin: false
|
||||
semiAntiJoin: true
|
||||
cartesianProduct: false
|
||||
limit: true
|
||||
|
|
|
@ -55,8 +55,15 @@ def _fileMode(ddls, data):
|
|||
)
|
||||
with open(fileName, "w") as f:
|
||||
# enable repartition joins due to https://github.com/citusdata/citus/issues/6865
|
||||
enableRepartitionJoinCommand = "SET citus.enable_repartition_joins TO on;\n"
|
||||
queryLines = [enableRepartitionJoinCommand]
|
||||
queryLines = []
|
||||
if getConfig().repartitionJoin:
|
||||
enableRepartitionJoinCommand = "SET citus.enable_repartition_joins TO on;\n"
|
||||
queryLines.append(enableRepartitionJoinCommand)
|
||||
if getConfig().singleRepartitionJoin:
|
||||
singleRepartitionJoinCommand = (
|
||||
"SET citus.enable_single_hash_repartition_joins TO on;\n"
|
||||
)
|
||||
queryLines.append(singleRepartitionJoinCommand)
|
||||
queryId = 1
|
||||
for _ in range(queryCount):
|
||||
query = newQuery()
|
||||
|
|
Loading…
Reference in New Issue