We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9c3806 commit 9159d3dCopy full SHA for 9159d3d
spark/src/main/scala/ai/chronon/spark/TableUtils.scala
@@ -786,8 +786,9 @@ class TableUtils(@transient val sparkSession: SparkSession) extends Serializable
786
val whereStr = allWheres.map(w => s"($w)").mkString(" AND ")
787
df = df.where(whereStr)
788
}
789
- val partitionCount = sparkSession.sparkContext.getConf.getInt("spark.default.parallelism", 1000)
790
- df.coalesce(partitionCount)
+ val parallelism = sparkSession.sparkContext.getConf.getInt("spark.default.parallelism", 1000)
+ val coalesceFactor = sparkSession.sparkContext.getConf.getInt("spark.chronon.coalesce.factor", 4)
791
+ df.coalesce(coalesceFactor * parallelism)
792
793
794
def whereClauses(partitionRange: PartitionRange, partitionColumn: String = partitionColumn): Seq[String] = {
0 commit comments