class MergingSessionsIterator extends AggregationIterator
This is a variant of SortAggregateIterator which merges the session windows based on the fact input rows are sorted by "group keys + the start time of session window".
When merging windows, it also applies aggregations on merged window, which eliminates the necessity on buffering inputs (which requires copying rows) and update the session spec for each input.
- Alphabetic
- By Inheritance
- MergingSessionsIterator
- AggregationIterator
- Logging
- Iterator
- IterableOnceOps
- IterableOnce
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MergingSessionsIterator(partIndex: Int, groupingExpressions: Seq[NamedExpression], sessionExpression: NamedExpression, valueAttributes: Seq[Attribute], inputIterator: Iterator[InternalRow], aggregateExpressions: Seq[AggregateExpression], aggregateAttributes: Seq[Attribute], initialInputBufferOffset: Int, resultExpressions: Seq[NamedExpression], newMutableProjection: (Seq[Expression], Seq[Attribute]) => MutableProjection, numOutputRows: SQLMetric)
Type Members
- class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]]
- Definition Classes
- Iterator
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ++[B >: UnsafeRow](xs: => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def addString(b: StringBuilder): StringBuilder
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def addString(b: StringBuilder, sep: String): StringBuilder
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
- Definition Classes
- IterableOnceOps
- val aggregateFunctions: Array[AggregateFunction]
- Attributes
- protected
- Definition Classes
- AggregationIterator
- val allImperativeAggregateFunctionPositions: Array[Int]
- Attributes
- protected[this]
- Definition Classes
- AggregationIterator
- val allImperativeAggregateFunctions: Array[ImperativeAggregate]
- Attributes
- protected[this]
- Definition Classes
- AggregationIterator
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buffered: BufferedIterator[UnsafeRow]
- Definition Classes
- Iterator
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[B](pf: PartialFunction[UnsafeRow, B]): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def collectFirst[B](pf: PartialFunction[UnsafeRow, B]): Option[B]
- Definition Classes
- IterableOnceOps
- def concat[B >: UnsafeRow](xs: => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator
- def contains(elem: Any): Boolean
- Definition Classes
- Iterator
- def copyToArray[B >: UnsafeRow](xs: Array[B], start: Int, len: Int): Int
- Definition Classes
- IterableOnceOps
- def copyToArray[B >: UnsafeRow](xs: Array[B], start: Int): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
- def copyToArray[B >: UnsafeRow](xs: Array[B]): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
- def corresponds[B](that: IterableOnce[B])(p: (UnsafeRow, B) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def count(p: (UnsafeRow) => Boolean): Int
- Definition Classes
- IterableOnceOps
- def distinct: Iterator[UnsafeRow]
- Definition Classes
- Iterator
- def distinctBy[B](f: (UnsafeRow) => B): Iterator[UnsafeRow]
- Definition Classes
- Iterator
- def drop(n: Int): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def dropWhile(p: (UnsafeRow) => Boolean): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def duplicate: (Iterator[UnsafeRow], Iterator[UnsafeRow])
- Definition Classes
- Iterator
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exists(p: (UnsafeRow) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- val expressionAggInitialProjection: MutableProjection
- Attributes
- protected[this]
- Definition Classes
- AggregationIterator
- def filter(p: (UnsafeRow) => Boolean): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def filterNot(p: (UnsafeRow) => Boolean): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(p: (UnsafeRow) => Boolean): Option[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def flatMap[B](f: (UnsafeRow) => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def flatten[B](implicit ev: (UnsafeRow) => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def fold[A1 >: UnsafeRow](z: A1)(op: (A1, A1) => A1): A1
- Definition Classes
- IterableOnceOps
- def foldLeft[B](z: B)(op: (B, UnsafeRow) => B): B
- Definition Classes
- IterableOnceOps
- def foldRight[B](z: B)(op: (UnsafeRow, B) => B): B
- Definition Classes
- IterableOnceOps
- def forall(p: (UnsafeRow) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def foreach[U](f: (UnsafeRow) => U): Unit
- Definition Classes
- IterableOnceOps
- val generateOutput: (UnsafeRow, InternalRow) => UnsafeRow
- Attributes
- protected
- Definition Classes
- AggregationIterator
- def generateProcessRow(expressions: Seq[AggregateExpression], functions: Seq[AggregateFunction], inputAttributes: Seq[Attribute]): (InternalRow, InternalRow) => Unit
- Attributes
- protected
- Definition Classes
- AggregationIterator
- def generateResultProjection(): (UnsafeRow, InternalRow) => UnsafeRow
- Attributes
- protected
- Definition Classes
- AggregationIterator
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def grouped[B >: UnsafeRow](size: Int): GroupedIterator[B]
- Definition Classes
- Iterator
- val groupingAttributes: Seq[Attribute]
- Attributes
- protected
- Definition Classes
- AggregationIterator
- val groupingProjection: UnsafeProjection
- Attributes
- protected
- Definition Classes
- AggregationIterator
- val groupingWithoutSession: Seq[NamedExpression]
- val groupingWithoutSessionAttributes: Seq[Attribute]
- final def hasNext: Boolean
- Definition Classes
- MergingSessionsIterator → Iterator
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def indexOf[B >: UnsafeRow](elem: B, from: Int): Int
- Definition Classes
- Iterator
- def indexOf[B >: UnsafeRow](elem: B): Int
- Definition Classes
- Iterator
- def indexWhere(p: (UnsafeRow) => Boolean, from: Int): Int
- Definition Classes
- Iterator
- def initialize(): Unit
- Attributes
- protected
- def initializeAggregateFunctions(expressions: Seq[AggregateExpression], startingInputBufferOffset: Int): Array[AggregateFunction]
- Attributes
- protected
- Definition Classes
- AggregationIterator
- def initializeBuffer(buffer: InternalRow): Unit
Initializes buffer values for all aggregate functions.
Initializes buffer values for all aggregate functions.
- Attributes
- protected
- Definition Classes
- AggregationIterator
- def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def isEmpty: Boolean
- Definition Classes
- Iterator → IterableOnceOps
- Annotations
- @deprecatedOverriding("isEmpty is defined as !hasNext; override hasNext instead", "2.13.0")
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isTraversableAgain: Boolean
- Definition Classes
- IterableOnceOps
- final def iterator: Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnce
- Annotations
- @inline()
- def knownSize: Int
- Definition Classes
- IterableOnce
- final def length: Int
- Definition Classes
- Iterator
- Annotations
- @inline()
- def log: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logName: String
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def map[B](f: (UnsafeRow) => B): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def max[B >: UnsafeRow](implicit ord: Ordering[B]): UnsafeRow
- Definition Classes
- IterableOnceOps
- def maxBy[B](f: (UnsafeRow) => B)(implicit cmp: Ordering[B]): UnsafeRow
- Definition Classes
- IterableOnceOps
- def maxByOption[B](f: (UnsafeRow) => B)(implicit cmp: Ordering[B]): Option[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def maxOption[B >: UnsafeRow](implicit ord: Ordering[B]): Option[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def min[B >: UnsafeRow](implicit ord: Ordering[B]): UnsafeRow
- Definition Classes
- IterableOnceOps
- def minBy[B](f: (UnsafeRow) => B)(implicit cmp: Ordering[B]): UnsafeRow
- Definition Classes
- IterableOnceOps
- def minByOption[B](f: (UnsafeRow) => B)(implicit cmp: Ordering[B]): Option[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def minOption[B >: UnsafeRow](implicit ord: Ordering[B]): Option[UnsafeRow]
- Definition Classes
- IterableOnceOps
- final def mkString: String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(sep: String): String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(start: String, sep: String, end: String): String
- Definition Classes
- IterableOnceOps
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def next(): UnsafeRow
- Definition Classes
- MergingSessionsIterator → Iterator
- def nextOption(): Option[UnsafeRow]
- Definition Classes
- Iterator
- def nonEmpty: Boolean
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def outputForEmptyGroupingKeyWithoutInput(): UnsafeRow
- def padTo[B >: UnsafeRow](len: Int, elem: B): Iterator[B]
- Definition Classes
- Iterator
- def partition(p: (UnsafeRow) => Boolean): (Iterator[UnsafeRow], Iterator[UnsafeRow])
- Definition Classes
- Iterator
- def patch[B >: UnsafeRow](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
- Definition Classes
- Iterator
- def processCurrentSortedGroup(): Unit
Processes rows in the current group.
Processes rows in the current group. It will stop when it find a new group.
- Attributes
- protected
- val processRow: (InternalRow, InternalRow) => Unit
- Attributes
- protected
- Definition Classes
- AggregationIterator
- def product[B >: UnsafeRow](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- def reduce[B >: UnsafeRow](op: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeft[B >: UnsafeRow](op: (B, UnsafeRow) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeftOption[B >: UnsafeRow](op: (B, UnsafeRow) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceOption[B >: UnsafeRow](op: (B, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceRight[B >: UnsafeRow](op: (UnsafeRow, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceRightOption[B >: UnsafeRow](op: (UnsafeRow, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reversed: Iterable[UnsafeRow]
- Attributes
- protected
- Definition Classes
- IterableOnceOps
- def sameElements[B >: UnsafeRow](that: IterableOnce[B]): Boolean
- Definition Classes
- Iterator
- def scanLeft[B](z: B)(op: (B, UnsafeRow) => B): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def size: Int
- Definition Classes
- IterableOnceOps
- def slice(from: Int, until: Int): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def sliceIterator(from: Int, until: Int): Iterator[UnsafeRow]
- Attributes
- protected
- Definition Classes
- Iterator
- def sliding[B >: UnsafeRow](size: Int, step: Int): GroupedIterator[B]
- Definition Classes
- Iterator
- def span(p: (UnsafeRow) => Boolean): (Iterator[UnsafeRow], Iterator[UnsafeRow])
- Definition Classes
- Iterator → IterableOnceOps
- def splitAt(n: Int): (Iterator[UnsafeRow], Iterator[UnsafeRow])
- Definition Classes
- IterableOnceOps
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[UnsafeRow, S]): S
- Definition Classes
- IterableOnce
- def sum[B >: UnsafeRow](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def take(n: Int): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def takeWhile(p: (UnsafeRow) => Boolean): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def tapEach[U](f: (UnsafeRow) => U): Iterator[UnsafeRow]
- Definition Classes
- Iterator → IterableOnceOps
- def to[C1](factory: Factory[UnsafeRow, C1]): C1
- Definition Classes
- IterableOnceOps
- def toArray[B >: UnsafeRow](implicit arg0: ClassTag[B]): Array[B]
- Definition Classes
- IterableOnceOps
- final def toBuffer[B >: UnsafeRow]: Buffer[B]
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def toIndexedSeq: IndexedSeq[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def toList: List[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def toMap[K, V](implicit ev: <:<[UnsafeRow, (K, V)]): Map[K, V]
- Definition Classes
- IterableOnceOps
- def toSeq: Seq[UnsafeRow]
- Definition Classes
- IterableOnceOps
- def toSet[B >: UnsafeRow]: Set[B]
- Definition Classes
- IterableOnceOps
- def toString(): String
- Definition Classes
- Iterator → AnyRef → Any
- def toVector: Vector[UnsafeRow]
- Definition Classes
- IterableOnceOps
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withFilter(p: (UnsafeRow) => Boolean): Iterator[UnsafeRow]
- Definition Classes
- Iterator
- def zip[B](that: IterableOnce[B]): Iterator[(UnsafeRow, B)]
- Definition Classes
- Iterator
- def zipAll[A1 >: UnsafeRow, B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]
- Definition Classes
- Iterator
- def zipWithIndex: Iterator[(UnsafeRow, Int)]
- Definition Classes
- Iterator → IterableOnceOps
Deprecated Value Members
- final def /:[B](z: B)(op: (B, UnsafeRow) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldLeft instead of /:
- final def :\[B](z: B)(op: (UnsafeRow, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldRight instead of :\
- def aggregate[B](z: => B)(seqop: (B, UnsafeRow) => B, combop: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0)
aggregateis not relevant for sequential collections. UsefoldLeft(z)(seqop)instead.
- final def copyToBuffer[B >: UnsafeRow](dest: Buffer[B]): Unit
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
dest ++= collinstead
- final def hasDefiniteSize: Boolean
- Definition Classes
- Iterator → IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) hasDefiniteSize on Iterator is the same as isEmpty
- def scanRight[B](z: B)(op: (UnsafeRow, B) => B): Iterator[B]
- Definition Classes
- Iterator
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Call scanRight on an Iterable instead.
- def seq: MergingSessionsIterator.this.type
- Definition Classes
- Iterator
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Iterator.seq always returns the iterator itself
- final def toIterator: Iterator[UnsafeRow]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .iterator instead of .toIterator
- final def toStream: Stream[UnsafeRow]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .to(LazyList) instead of .toStream