[ 
https://issues.apache.org/jira/browse/SPARK-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130478#comment-15130478
 ] 

Thomas Sebastian commented on SPARK-12982:
------------------------------------------

One main difference for this with the description of this bug is that the 
latest spark 2.0 code throws Analysis Exception with the NoViableAlt..message 
for the same scenario. But we hope it is fine, as the fix would hold good for 
spark 1.6 and spark2.0

> SQLContext: temporary table registration does not accept valid identifier
> -------------------------------------------------------------------------
>
>                 Key: SPARK-12982
>                 URL: https://issues.apache.org/jira/browse/SPARK-12982
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.0
>            Reporter: Grzegorz Chilkiewicz
>            Priority: Minor
>              Labels: sql
>
> We have encountered very strange behavior of SparkSQL temporary table 
> registration.
> What identifiers for temporary table should be valid?
> Alphanumerical + '_' with at least one non-digit?
> Valid identifiers:
> df
> 674123a
> 674123_
> a0e97c59_4445_479d_a7ef_d770e3874123
> 1ae97c59_4445_479d_a7ef_d770e3874123
> Invalid identifier:
> 10e97c59_4445_479d_a7ef_d770e3874123
> Stack trace:
> {code:xml}
> java.lang.RuntimeException: [1.1] failure: identifier expected
> 10e97c59_4445_479d_a7ef_d770e3874123
> ^
>       at scala.sys.package$.error(package.scala:27)
>       at 
> org.apache.spark.sql.catalyst.SqlParser$.parseTableIdentifier(SqlParser.scala:58)
>       at org.apache.spark.sql.SQLContext.table(SQLContext.scala:827)
>       at org.apache.spark.sql.SQLContext.dropTempTable(SQLContext.scala:763)
>       at 
> SparkSqlContextTempTableIdentifier$.identifierCheck(SparkSqlContextTempTableIdentifier.scala:9)
>       at 
> SparkSqlContextTempTableIdentifier$.main(SparkSqlContextTempTableIdentifier.scala:42)
>       at 
> SparkSqlContextTempTableIdentifier.main(SparkSqlContextTempTableIdentifier.scala)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at sbt.Run.invokeMain(Run.scala:67)
>       at sbt.Run.run0(Run.scala:61)
>       at sbt.Run.sbt$Run$$execute$1(Run.scala:51)
>       at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:55)
>       at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
>       at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
>       at sbt.Logger$$anon$4.apply(Logger.scala:85)
>       at sbt.TrapExit$App.run(TrapExit.scala:248)
>       at java.lang.Thread.run(Thread.java:745)
> {code}
> Code to reproduce this bug:
> https://github.com/grzegorz-chilkiewicz/SparkSqlContextTempTableIdentifier



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to