Skip to content

Commit a74dca9

Browse files
authored
feat: reorder logs so we can see what we query before doing it (#670)
1 parent 2d8f3af commit a74dca9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spark/src/main/scala/ai/chronon/spark/TableUtils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,6 @@ class TableUtils(@transient val sparkSession: SparkSession) extends Serializable
570570
rangeWheres: Seq[String],
571571
fallbaour clientsSelects: Option[Map[String, String]] = None): DataFrame = {
572572

573-
var df = loadTable(table)
574-
575573
val selects = QueryUtils.buildSelects(selectMap, fallbaour clientsSelects)
576574

577575
logger.info(s""" Scanning data:
@@ -584,6 +582,8 @@ class TableUtils(@transient val sparkSession: SparkSession) extends Serializable
584582
| ${rangeWheres.mkString(",\n ").green}
585583
|""".stripMargin)
586584

585+
var df = loadTable(table)
586+
587587
if (selects.nonEmpty) df = df.selectExpr(selects: _*)
588588

589589
val allWheres = wheres ++ rangeWheres

0 commit comments

Comments
 (0)