[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15850957#comment-15850957 ] Lefty Leverenz commented on HIVE-15765: --- Thanks [~hagleitn], that's a good first draft for a Comments section in the DDL doc. > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Labels: TODOC2.2 > Fix For: 2.2.0 > > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch, HIVE-15765.3.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15850941#comment-15850941 ] Gunther Hagleitner commented on HIVE-15765: --- [~leftylev] the COMMENT keyword is used to attach comments (explanations) to database objects, I think. So you can add a comment to a table or column to explain what it does. This particular jira implements a sql standard way of commenting your SQL statements in general. The comment keyword can only happen in certain places in DML/DDL statements, but we now have 2 ways of commenting any piece of SQL you write. Line comments (already in the code before this jira): Example: select bla -- bla bla bla from foo; Basically everything from "--" to the end of the line is considered a comment and ignored by the compiler. Bracketed comments (new addition): Example: select bla /* bla bla bla */ from bla; Everything between /* and */ is considered a comment and ignored by the compiler. (can be multi line or part of a line, etc). There's an exception. "/*+" marks the beginning of a compiler hint and can be used to send "hints" to the compiler. Example: select /*+ MAPJOIN(a) */ * from a join b on (a.key = b.key) Does that make it clearer? /* also i've updated the fix version */ > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Labels: TODOC2.2 > Fix For: 2.2.0 > > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch, HIVE-15765.3.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15850909#comment-15850909 ] Lefty Leverenz commented on HIVE-15765: --- Doc note: This should be documented in the wiki, with version information, but I'm not sure where it belongs. How do these comments compare with the COMMENT keyword -- are they interchangeable or is /*blahblah */ more like a code comment? The COMMENT keyword is documented in these places: * Tutorial ** [Creating Tables | https://cwiki.apache.org/confluence/display/Hive/Tutorial#Tutorial-CreatingTables] ** [Altering Tables | https://cwiki.apache.org/confluence/display/Hive/Tutorial#Tutorial-AlteringTables] ** [Loading Data | https://cwiki.apache.org/confluence/display/Hive/Tutorial#Tutorial-LoadingData] * DDL ** [Create Database | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateDatabase] ** [Create Table | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable] ** [Partitioned Tables (examples only) | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-PartitionedTables] ** [External Tables (example only) | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-ExternalTables] ** [Bucketed Sorted Tables (example only) | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-BucketedSortedTables] ** [Change Column Name/Type/Position/Comment | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-ChangeColumnName/Type/Position/Comment] ** [Add/Replace Columns | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Add/ReplaceColumns] ** [Create View | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateView] ** [Create Index | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateIndex] * DML and Select docs: no comment Other comment doc: * [DDL -- Alter Table Properties -- Alter Table Comment | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTableComment] Perhaps we need a section on comments in each of the major SQL docs (DDL, DML, and Select). /* Fix Version/s needs to be updated. */ > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Labels: TODOC2.2 > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch, HIVE-15765.3.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15850436#comment-15850436 ] Hive QA commented on HIVE-15765: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12850660/HIVE-15765.3.patch {color:green}SUCCESS:{color} +1 due to 13 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 6 failed/errored test(s), 11024 tests executed *Failed tests:* {noformat} TestDerbyConnector - did not produce a TEST-*.xml file (likely timed out) (batchId=235) org.apache.hadoop.hive.cli.TestEncryptedHDFSCliDriver.testCliDriver[encryption_join_with_different_encryption_keys] (batchId=159) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_char_simple] (batchId=147) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_varchar_simple] (batchId=153) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=223) org.apache.hive.service.cli.session.TestSessionManagerMetrics.testAbandonedSessionMetrics (batchId=186) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build//testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build//console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 6 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12850660 - PreCommit-HIVE-Build > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch, HIVE-15765.3.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15850310#comment-15850310 ] Pengcheng Xiong commented on HIVE-15765: Thanks [~hagleitn] for the new patch which includes the q files changes. LGTM +1 pending tests. Thanks. > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch, HIVE-15765.3.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15850223#comment-15850223 ] Gunther Hagleitner commented on HIVE-15765: --- [~pxiong] thanks for the review. I've looked through the tests and updated the patch accordingly. > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch, HIVE-15765.3.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15849760#comment-15849760 ] Hive QA commented on HIVE-15765: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12850592/HIVE-15765.2.patch {color:green}SUCCESS:{color} +1 due to 13 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 11024 tests executed *Failed tests:* {noformat} TestDerbyConnector - did not produce a TEST-*.xml file (likely timed out) (batchId=235) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[auto_sortmerge_join_11] (batchId=78) org.apache.hadoop.hive.cli.TestEncryptedHDFSCliDriver.testCliDriver[encryption_join_with_different_encryption_keys] (batchId=159) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=223) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/3323/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/3323/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-3323/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 4 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12850592 - PreCommit-HIVE-Build > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch, > HIVE-15765.2.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-15765) Support bracketed comments
[ https://issues.apache.org/jira/browse/HIVE-15765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15849234#comment-15849234 ] Pengcheng Xiong commented on HIVE-15765: The patch LGTM. Please take a look at the failing tests. > Support bracketed comments > -- > > Key: HIVE-15765 > URL: https://issues.apache.org/jira/browse/HIVE-15765 > Project: Hive > Issue Type: Bug >Reporter: Gunther Hagleitner >Assignee: Gunther Hagleitner > Attachments: HIVE-15765.1.patch, HIVE-15765.1.patch > > > C-style comments are in the SQL spec as well as supported by all major DBs. > The are useful for inline annotation of the SQL. We should have them too. > Example: > {noformat} > select > /*+ MAPJOIN(a) */ /* mapjoin hint */ > a /* column */ > from foo join bar; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)