zzcclp commented on a change in pull request #1618:
URL: https://github.com/apache/kylin/pull/1618#discussion_r607579269
##########
File path:
kylin-spark-project/kylin-spark-engine/src/main/scala/org/apache/kylin/engine/spark/builder/CubeTableEncoder.scala
##########
@@ -63,7 +67,20 @@ object CubeTableEncoder extends Logging {
.select(columns: _*)
}
)
+
ds.sparkSession.sparkContext.setJobDescription(null)
+
+ //repartition by a single column during dict encode step before is more
easily to cause data skew, add step to void such case.
+ if (!cols.isEmpty && seg.kylinconf.rePartitionEncodedDatasetWithRowKey) {
+ val colsInDS = partitionedDs.schema.map(_.name)
+ val rowKeyColRefs = seg.allRowKeyCols.map(colDesc =>
convertFromDot(colDesc.identity)).filter(colsInDS.contains).map(col)
+ //if not set in config, use the largest partition num during dict encode
step
+ if (seg.kylinconf.getRepartitionNumAfterEncode != 0) {
Review comment:
change to `if (seg.kylinconf.getRepartitionNumAfterEncode < 1) {`, avoid
to run failed when setting this value to -1.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]