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
