You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/11/26 11:13:12 UTC

[jira] [Commented] (SPARK-4528) [SQL] add comment support for Spark SQL CLI

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

Apache Spark commented on SPARK-4528:
-------------------------------------

User 'tsingfu' has created a pull request for this issue:
https://github.com/apache/spark/pull/3477

> [SQL] add comment support for Spark SQL CLI 
> --------------------------------------------
>
>                 Key: SPARK-4528
>                 URL: https://issues.apache.org/jira/browse/SPARK-4528
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Fuqing Yang
>            Priority: Minor
>              Labels: features
>
> while using spark-sql, found it does not support comment while write sqls. 
> It returns an error if we add some comments  
> for examples:
> spark-sql> 
>          > show tables; --list tables in current db;
> 14/11/21 11:30:37 INFO parse.ParseDriver: Parsing command: show tables
> 14/11/21 11:30:37 INFO parse.ParseDriver: Parse Completed
> 14/11/21 11:30:37 INFO analysis.Analyzer: Max iterations (2) reached for batch MultiInstanceRelations
> 14/11/21 11:30:37 INFO analysis.Analyzer: Max iterations (2) reached for batch CaseInsensitiveAttributeReferences
> ......
> 14/11/21 11:30:38 INFO HiveMetaStore.audit: ugi=hadoop	ip=unknown-ip-addr	cmd=get_tables: db=default pat=.*	
> 14/11/21 11:30:38 INFO ql.Driver: </PERFLOG method=task.DDL.Stage-0 start=1416540638191 end=1416540638202 duration=11>
> 14/11/21 11:30:38 INFO ql.Driver: </PERFLOG method=runTasks start=1416540638191 end=1416540638202 duration=11>
> 14/11/21 11:30:38 INFO ql.Driver: </PERFLOG method=Driver.execute start=1416540638190 end=1416540638203 duration=13>
> OK
> 14/11/21 11:30:38 INFO ql.Driver: OK
> 14/11/21 11:30:38 INFO ql.Driver: <PERFLOG method=releaseLocks>
> 14/11/21 11:30:38 INFO ql.Driver: </PERFLOG method=releaseLocks start=1416540638203 end=1416540638203 duration=0>
> 14/11/21 11:30:38 INFO ql.Driver: </PERFLOG method=Driver.run start=1416540637998 end=1416540638203 duration=205>
> 14/11/21 11:30:38 INFO mapred.FileInputFormat: Total input paths to process : 1
> 14/11/21 11:30:38 INFO ql.Driver: <PERFLOG method=releaseLocks>
> 14/11/21 11:30:38 INFO ql.Driver: </PERFLOG method=releaseLocks start=1416540638207 end=1416540638208 duration=1>
> 14/11/21 11:30:38 INFO analysis.Analyzer: Max iterations (2) reached for batch MultiInstanceRelations
> 14/11/21 11:30:38 INFO analysis.Analyzer: Max iterations (2) reached for batch CaseInsensitiveAttributeReferences
> 14/11/21 11:30:38 INFO analysis.Analyzer: Max iterations (2) reached for batch Check Analysis
> 14/11/21 11:30:38 INFO sql.SQLContext$$anon$1: Max iterations (2) reached for batch Add exchange
> 14/11/21 11:30:38 INFO sql.SQLContext$$anon$1: Max iterations (2) reached for batch Prepare Expressions
> dummy
> records
> tab_sogou10
> Time taken: 0.412 seconds
> 14/11/21 11:30:38 INFO CliDriver: Time taken: 0.412 seconds
> 14/11/21 11:30:38 INFO parse.ParseDriver: Parsing command:  --list tables in current db
> NoViableAltException(-1@[])
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:902)
> Comment support is widely using in projects, it is a necessary to add this feature.
> this implitation can be archived in  the source org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.scala.
> We may need support three comment stypes:
> From a ‘#’ character to the end of the line.
> From a ‘-- ’ sequence to the end of the line
> From a /* sequence to the following */ sequence, as in the C programming language.
> This syntax allows a comment to extend over multiple lines because the beginning and closing sequences need not be on the same line.
> what do you think about?



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

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