خرید بک لینک

Vote count: 0

I'm using the following aotation parameter shipped with Spark-SQL:

@SQLUserDefinedType(udt = ActionUDT.CLAZZ)
trait Action extends ActionLike {
...implementation
}

Where ActionUDT.CLAZZ is defined as a constant val:

object ActionUDT extends ActionUDT {

  final val CLAZZ: Class[_ <: ActionUDT] = this.getClass
}

But I got the following compiler error:

Error:(25, 37) aotation argument needs to be a constant; found: ActionUDT.clazz
@SQLUserDefinedType(udt = ActionUDT.clazz)
                                    ^

Why it gives such false alarm? Is it a bug? I'm using Scala 2.10.5

asked 40 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 9 خرداد 1395 ساعت: 1:59

صفحه بندی