File tree Expand file tree Collapse file tree 3 files changed +9
-20
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -120,4 +120,6 @@ case class CreateNamedStruct(children: Seq[Expression]) extends Expression {
120120 override def eval (input : InternalRow ): Any = {
121121 InternalRow (valExprs.map(_.eval(input)): _* )
122122 }
123+
124+ override def prettyName : String = " named_struct"
123125}
Original file line number Diff line number Diff line change 1717
1818package org .apache .spark .sql .catalyst
1919
20+ import org .apache .spark .sql .catalyst .expressions ._
21+
2022/**
2123 * A set of classes that can be used to represent trees of relational expressions. A key goal of
2224 * the expression library is to hide the details of naming and scoping from developers who want to
@@ -49,6 +51,11 @@ package org.apache.spark.sql.catalyst
4951 */
5052package object expressions {
5153
54+ /**
55+ * Used as input into expressions whose output does not depend on any input value.
56+ */
57+ val EmptyRow : InternalRow = null
58+
5259 /**
5360 * Converts a [[InternalRow ]] to another Row given a sequence of expression that define each
5461 * column of the new row. If the schema of the input row is specified, then the given expression
Original file line number Diff line number Diff line change @@ -54,26 +54,6 @@ abstract class MutableRow extends InternalRow {
5454 }
5555}
5656
57- /**
58- * A row with no data. Calling any methods will result in an error. Can be used as a placeholder.
59- */
60- object EmptyRow extends InternalRow {
61- override def apply (i : Int ): Any = throw new UnsupportedOperationException
62- override def toSeq : Seq [Any ] = Seq .empty
63- override def length : Int = 0
64- override def isNullAt (i : Int ): Boolean = throw new UnsupportedOperationException
65- override def getInt (i : Int ): Int = throw new UnsupportedOperationException
66- override def getLong (i : Int ): Long = throw new UnsupportedOperationException
67- override def getDouble (i : Int ): Double = throw new UnsupportedOperationException
68- override def getFloat (i : Int ): Float = throw new UnsupportedOperationException
69- override def getBoolean (i : Int ): Boolean = throw new UnsupportedOperationException
70- override def getShort (i : Int ): Short = throw new UnsupportedOperationException
71- override def getByte (i : Int ): Byte = throw new UnsupportedOperationException
72- override def getString (i : Int ): String = throw new UnsupportedOperationException
73- override def getAs [T ](i : Int ): T = throw new UnsupportedOperationException
74- override def copy (): InternalRow = this
75- }
76-
7757/**
7858 * A row implementation that uses an array of objects as the underlying storage.
7959 */
You can’t perform that action at this time.
0 commit comments