Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to make a multi line comment in hive scripts

Tags:

hive

I know that we can make a single line comment with '--' in hiveQL(hive.sql scripts) but is there a way to make multi line comments? I need something like below

/*  This sentence is 
    a comment */
like image 654
Karthick Avatar asked Apr 19 '12 19:04

Karthick


People also ask

Are multiline comment supported in Hive script?

No, Multi-line comments are not supported in Hive.

How do I comment in HQL?

setComment("Some comment here"); and you will see something like the following in your MySQL log file (if you're using MySQL): 5998 Query /* Some comment here */ select ..... +1 For the nice tip!


3 Answers

As per my knowledge, multi-line comments are not supported in Hive scripts as of now. Seems like this JIRA introduced only single line comments, starting with -- in Hive 0.8

like image 60
Mark Grover Avatar answered Oct 11 '22 08:10

Mark Grover


No, As of now Hive support single line comment only.

Hive, Pig, Hbase are starting stage not implemented like Mangodb, Cassandra, but in next version especially for Hadoop 2.x it's possible multiple comments also.

Just use -- two dashes to make a comment in hive.

like image 35
Venu A Positive Avatar answered Oct 11 '22 09:10

Venu A Positive


Multi-line (aka "bracketed") comments should be available in Hive v2.3.0: https://issues.apache.org/jira/browse/HIVE-15765

like image 6
combinatorist Avatar answered Oct 11 '22 08:10

combinatorist