[ https://issues.apache.org/jira/browse/SPARK-21437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16089527#comment-16089527 ]
Sean Owen commented on SPARK-21437: ----------------------------------- Almost certainly because of code generation, because {{const}} is a reserved word in Java. I suspect this will be considered not a bug, as you also can't have names like {{long}}, I believe. > 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