[ https://issues.apache.org/jira/browse/SPARK-27017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786797#comment-16786797 ]
Henryk Cesnolovic commented on SPARK-27017: ------------------------------------------- Hive allows, just use this quotes for column names ``. Just copy paste query. _Create table abc_orc (`Column with speci@l symbo|s`string) stored as orc;_ _Insert into table abc_orc values ('test_value');_ _Select `__Column with speci@l symbo|s` from abc_orc;_ > Creating orc table with special symbols in column name via spark.sql > -------------------------------------------------------------------- > > Key: SPARK-27017 > URL: https://issues.apache.org/jira/browse/SPARK-27017 > Project: Spark > Issue Type: Question > Components: Spark Shell > Affects Versions: 2.3.0 > Reporter: Henryk Cesnolovic > Priority: Major > > Issue is creating orc table with special symbols in column name in spark with > hive support. Example: > _spark.sql("Create table abc_orc (`Column with speci@l symbo|s`string) stored > as orc")_ > throws org.apache.spark.sql.AnalysisException: Column name "Column with > speci@l symbo|s" contains invalid character(s). Please use alias to rename it. > It's interesting, because in Hive we can create such table and after that in > spark we can select data from that table and it resolves schema correctly. > My question is, is it correct behaviour of spark and if so, what is the > reason of that behaviour? > > -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org