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 a17857a commit a891110Copy full SHA for a891110
spark/src/main/scala/ai/chronon/spark/TableUtils.scala
@@ -330,9 +330,10 @@ class TableUtils(@transient val sparkSession: SparkSession) extends Serializable
330
stats: Option[DfStats] = None,
331
sortByCols: Seq[String] = Seq.empty): Unit = {
332
// partitions to the last
333
+ val dataPointer = DataPointer.from(tableName, sparkSession)
334
val colOrder = df.columns.diff(partitionColumns) ++ partitionColumns
335
val dfRearranged: DataFrame = df.select(colOrder.map {
- case c if c == partitionColumn =>
336
+ case c if c == partitionColumn && dataPointer.writeFormat.map(_.toUpperCase).exists("BIGQUERY".equals) =>
337
to_date(df.col(c), partitionFormat).as(partitionColumn)
338
case c => df.col(c)
339
}: _*)
0 commit comments