Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
beliefer committed Jul 17, 2023
1 parent 8a42a38 commit ad88985
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class WindowInPandasEvaluatorFactory(
}

class WindowInPandasPartitionEvaluator extends PartitionEvaluator[InternalRow, InternalRow] {
val conf: SQLConf = SQLConf.get
private val conf: SQLConf = SQLConf.get

// Unwrap the expressions and factories from the map.
private val expressionsWithFrameIndex =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ trait WindowEvaluatorFactoryBase {

// Map the groups to a (unbound) expression and frame factory pair.
var numExpressions = 0
val timeZone = conf.sessionLocalTimeZone
val timeZone = SQLConf.get.sessionLocalTimeZone
framedFunctions.toSeq.map {
case (key, (expressions, functionSeq)) =>
val ordinal = numExpressions
Expand Down Expand Up @@ -303,13 +303,13 @@ class WindowEvaluatorFactory(
}

class WindowPartitionEvaluator extends PartitionEvaluator[InternalRow, InternalRow] {
val conf: SQLConf = SQLConf.get
private val conf: SQLConf = SQLConf.get

// Unwrap the window expressions and window frame factories from the map.
val expressions = windowFrameExpressionFactoryPairs.flatMap(_._1)
val factories = windowFrameExpressionFactoryPairs.map(_._2).toArray
val inMemoryThreshold = conf.windowExecBufferInMemoryThreshold
val spillThreshold = conf.windowExecBufferSpillThreshold
private val expressions = windowFrameExpressionFactoryPairs.flatMap(_._1)
private val factories = windowFrameExpressionFactoryPairs.map(_._2).toArray
private val inMemoryThreshold = conf.windowExecBufferInMemoryThreshold
private val spillThreshold = conf.windowExecBufferSpillThreshold

override def eval(
partitionIndex: Int,
Expand Down

0 comments on commit ad88985

Please sign in to comment.