[ 
https://issues.apache.org/jira/browse/SPARK-21437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon resolved SPARK-21437.
----------------------------------
    Resolution: Not A Bug

> Java Keyword cannot be used in table schema
> -------------------------------------------
>
>                 Key: SPARK-21437
>                 URL: https://issues.apache.org/jira/browse/SPARK-21437
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.1
>            Reporter: pin_zhang
>
> Java keywords doesn't work in spark211 that works in spark 201
> import org.apache.spark.SparkConf
> import org.apache.spark.SparkContext
> import org.apache.spark.sql.SparkSession
> case class a(`const`: Int)
> case class b(aa: a)
> object KeyworkdsTest {
>   def main(args: Array[String]): Unit = {    
>     val conf = new SparkConf().setAppName("scala").setMaster("local[2]")    
>     val sc = new SparkContext(conf)    
>     val spark = 
> SparkSession.builder().enableHiveSupport().config(conf).getOrCreate()
>     val q = Seq(b(a(1)))
>     val rdd = sc.makeRDD(q)
>     val d = spark.createDataFrame(rdd)    
>   }
> }



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to