[SPARK-15210][SQL] Add missing @DeveloperApi annotation in sql.types

add DeveloperApi annotation for `AbstractDataType` `MapType` `UserDefinedType`

local build

Author: Zheng RuiFeng <ruifengz@foxmail.com>

Closes #12982 from zhengruifeng/types_devapi.
This commit is contained in:
Zheng RuiFeng 2016-05-09 11:20:48 -07:00 committed by Andrew Or
parent f8aca5b4a9
commit dfdcab00c7
3 changed files with 6 additions and 1 deletions

View file

@ -20,6 +20,7 @@ package org.apache.spark.sql.types
import scala.reflect.ClassTag
import scala.reflect.runtime.universe.{runtimeMirror, TypeTag}
import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.sql.catalyst.ScalaReflectionLock
import org.apache.spark.sql.catalyst.expressions.Expression
import org.apache.spark.util.Utils
@ -141,6 +142,7 @@ protected[sql] abstract class AtomicType extends DataType {
* :: DeveloperApi ::
* Numeric data types.
*/
@DeveloperApi
abstract class NumericType extends AtomicType {
// Unfortunately we can't get this implicitly as that breaks Spark Serialization. In order for
// implicitly[Numeric[JvmType]] to be valid, we have to change JvmType from a type variable to a

View file

@ -20,6 +20,7 @@ package org.apache.spark.sql.types
import org.json4s.JsonAST.JValue
import org.json4s.JsonDSL._
import org.apache.spark.annotation.DeveloperApi
/**
* :: DeveloperApi ::
@ -31,6 +32,7 @@ import org.json4s.JsonDSL._
* @param valueType The data type of map values.
* @param valueContainsNull Indicates if map values have `null` values.
*/
@DeveloperApi
case class MapType(
keyType: DataType,
valueType: DataType,

View file

@ -96,11 +96,12 @@ abstract class UserDefinedType[UserType >: Null] extends DataType with Serializa
}
/**
* ::DeveloperApi::
* :: DeveloperApi ::
* The user defined type in Python.
*
* Note: This can only be accessed via Python UDF, or accessed as serialized object.
*/
@DeveloperApi
private[sql] class PythonUserDefinedType(
val sqlType: DataType,
override val pyUDT: String,