@@ -46,7 +46,8 @@ object GetField {
4646 MapOrdinalGetField (child, fieldExpr)
4747 case (otherType, _) =>
4848 throw new AnalysisException (
49- s " GetField is not valid on child of type $otherType with fieldExpr of type ${fieldExpr.dataType}" )
49+ " GetField is not valid on child of type " +
50+ s " $otherType with fieldExpr of type ${fieldExpr.dataType}" )
5051 }
5152 }
5253
@@ -138,8 +139,11 @@ case class SimpleStructGetField(child: Expression, field: StructField, ordinal:
138139/**
139140 * Returns the array of value of fields in the Array of Struct `child`.
140141 */
141- case class ArrayStructGetField (child : Expression , field : StructField , ordinal : Int , containsNull : Boolean )
142- extends StructGetField {
142+ case class ArrayStructGetField (
143+ child : Expression ,
144+ field : StructField ,
145+ ordinal : Int ,
146+ containsNull : Boolean ) extends StructGetField {
143147
144148 override def dataType : DataType = ArrayType (field.dataType, containsNull)
145149 override def nullable : Boolean = child.nullable
@@ -160,7 +164,7 @@ case class ArrayStructGetField(child: Expression, field: StructField, ordinal: I
160164case class ArrayOrdinalGetField (child : Expression , ordinal : Expression )
161165 extends OrdinalGetField {
162166
163- override def dataType = child.dataType.asInstanceOf [ArrayType ].elementType
167+ override def dataType : DataType = child.dataType.asInstanceOf [ArrayType ].elementType
164168
165169 override lazy val resolved = childrenResolved &&
166170 child.dataType.isInstanceOf [ArrayType ] && ordinal.dataType.isInstanceOf [IntegralType ]
@@ -184,12 +188,12 @@ case class ArrayOrdinalGetField(child: Expression, ordinal: Expression)
184188case class MapOrdinalGetField (child : Expression , ordinal : Expression )
185189 extends OrdinalGetField {
186190
187- override def dataType = child.dataType.asInstanceOf [MapType ].valueType
191+ override def dataType : DataType = child.dataType.asInstanceOf [MapType ].valueType
188192
189193 override lazy val resolved = childrenResolved && child.dataType.isInstanceOf [MapType ]
190194
191195 protected def evalNotNull (value : Any , ordinal : Any ) = {
192196 val baseValue = value.asInstanceOf [Map [Any , _]]
193197 baseValue.get(ordinal).orNull
194198 }
195- }
199+ }
0 commit comments