okumin commented on code in PR #6389:
URL: https://github.com/apache/hive/pull/6389#discussion_r3045073609
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java:
##########
@@ -853,22 +862,25 @@ private ArrayList<ExprNodeDesc>
getPositionsToExprNodes(List<Integer> pos,
// The way max number of writers allowed are computed based on
// (executor/container memory) * (percentage of memory taken by orc)
// and dividing that by max memory (stripe size) taken by a single writer.
- private boolean shouldDo(List<Integer> partitionPos, Operator<? extends
OperatorDesc> fsParent) {
+ private boolean shouldDo(List<Integer> partitionPos,
+ List<Function<List<ExprNodeDesc>, ExprNodeDesc>> customPartitionExprs,
+ Operator<? extends OperatorDesc> fsParent,
+ ArrayList<ExprNodeDesc> allRSCols) {
int threshold = HiveConf.getIntVar(this.parseCtx.getConf(),
HiveConf.ConfVars.HIVE_OPT_SORT_DYNAMIC_PARTITION_THRESHOLD);
long MAX_WRITERS = -1;
switch (threshold) {
- case -1:
- return false;
- case 0:
- break;
- case 1:
- return true;
- default:
- MAX_WRITERS = threshold;
- break;
+ case -1:
+ return false;
+ case 0:
+ break;
+ case 1:
+ return true;
+ default:
+ MAX_WRITERS = threshold;
+ break;
Review Comment:
The original one is aligned with our checkstyle:
https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6389&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true
```suggestion
case -1:
return false;
case 0:
break;
case 1:
return true;
default:
MAX_WRITERS = threshold;
break;
```
--
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]