GP
Size: a a a
GP
ПФ
GP
package scala.collection
trait Seq[+A] extends scala.AnyRef with scala.PartialFunction[scala.Int, A] with scala.collection.Iterable[A] with scala.collection.GenSeq[A] with scala.collection.generic.GenericTraversableTemplate[A, scala.collection.Seq] with scala.collection.SeqLike[A, scala.collection.Seq[A]] {
override def companion : scala.collection.generic.GenericCompanion[scala.collection.Seq] = { /* compiled code */ }
override def seq : scala.collection.Seq[A] = { /* compiled code */ }
}
object Seq extends scala.collection.generic.SeqFactory[scala.collection.Seq] {
implicit def canBuildFrom[A] : scala.collection.generic.CanBuildFrom[Seq.Coll, A, scala.collection.Seq[A]] = { /* compiled code */ }
def newBuilder[A] : scala.collection.mutable.Builder[A, scala.collection.Seq[A]] = { /* compiled code */ }
}
ПФ
GP
GP
ПФ
GP
GP
ПФ
GP
GP
ПФ
ПФ
ПФ
val attrs = List(AttributeReference("value”, IntegerType, nullable = true)())
ПФ
[Error] /home/finkel/work_jb/kotlin-spark-api-sandbox/core/src/main/scala/org/apache/spark/sql/KotlinWrappers.scala:166: missing argument list for method apply in object AttributeReference
Unapplied methods are only converted to functions when a function type is expected.
You can make this conversion explicit by writing `apply _` or `apply(_,_,_,_)(_,_)` instead of `apply`.
one error found
GP
case class AttributeReference(
name: String,
dataType: DataType,
nullable: Boolean = true,
override val metadata: Metadata = Metadata.empty)(
val exprId: ExprId = NamedExpression.newExprId,
val qualifier: Seq[String] = Seq.empty[String])
extends Attribute with Unevaluable {
ПФ
ПФ
def doit(enc:ExpressionEncoder[_]) = {
val attrs = List(AttributeReference("value", IntegerType, nullable = true))
val bound = enc.resolveAndBind(attrs)
println(bound.fromRow(InternalRow(1.asInstanceOf[java.lang.Integer])))
try {
println(bound.fromRow(InternalRow(null)))
} catch {
case e: Throwable => println(e.getMessage)
}
}
GP