Grokbase Groups Hive user June 2011
FAQ
hi,
Is there any way to comment out hive script file?
Either "--" or "/* */" does not seem to work.
Thanks in advance,satoshi

Search Discussions

  • Edward Capriolo at Jun 29, 2011 at 1:57 pm
    There is a subtle nuance, comments can only appear before QL statements not
    set or add commands.

    Edward

    On Wed, Jun 29, 2011 at 8:36 AM, Satoshi Yamada
    wrote:
    hi,

    Is there any way to comment out hive script file?

    Either "--" or "/* */" does not seem to work.

    Thanks in advance,
    satoshi
  • Satoshi Yamada at Jul 3, 2011 at 11:33 am
    Thanks, Edward, and sorry for late reply.
    I want to add comment in the file using with "hive -f".
    $ cat sample_select.hql
    -- some commentSELECT something FROM sample_table;
    $ hive -f sample_select.hql
    Sample above does not work. Either "#" or "/* */" doesnot work.
    So, is there no way to add comment in the file?
    Thanks,satoshi
    --- On Wed, 2011/6/29, Edward Capriolo wrote:

    There is a subtle nuance, comments can only appear before QL statements not set or add commands.

    Edward

    On Wed, Jun 29, 2011 at 8:36 AM, Satoshi Yamada wrote:


    hi,
    Is there any way to comment out hive script file?
    Either "--" or "/* */" does not seem to work.
    Thanks in advance,satoshi
  • Travis Powell at Jul 3, 2011 at 4:12 pm
    Comments cannot be the first line of a file, if I recall correctly. The way that I put my name and email at the top is after a using statement for the database.

    use default;

    -- John Doe, jdoe@acme.ru
    -- (c) Acme co 2007

    Select * from (...)

    Travis


    Travis Powell
    tpowell@tealeaf.com
    (415) 488-7160

    -----Original Message-----
    From: Satoshi Yamada
    Sent: Sunday, July 03, 2011 04:32 AM Pacific Standard Time
    To: user@hive.apache.org
    Subject: Re: comment out hive script file

    Thanks, Edward, and sorry for late reply.
    I want to add comment in the file using with "hive -f".
    $ cat sample_select.hql
    -- some commentSELECT something FROM sample_table;
    $ hive -f sample_select.hql
    Sample above does not work. Either "#" or "/* */" doesnot work.
    So, is there no way to add comment in the file?
    Thanks,satoshi
    --- On Wed, 2011/6/29, Edward Capriolo wrote:

    There is a subtle nuance, comments can only appear before QL statements not set or add commands.

    Edward

    On Wed, Jun 29, 2011 at 8:36 AM, Satoshi Yamada wrote:


    hi,
    Is there any way to comment out hive script file?
    Either "--" or "/* */" does not seem to work.
    Thanks in advance,satoshi
  • Satoshi Yamada at Jul 7, 2011 at 2:28 pm
    hi,
    I misunderstood Edward's comment, and figured out"--" works unless put before add and set.Thanks, Edward.
    Travis"--" works even in the first line in case you writeSQL after that.
    But this issue seems put on JIRA.https://issues.apache.org/jira/browse/HIVE-2259
    Thanks,satoshi
    --- On Mon, 2011/7/4, Travis Powell wrote:






    RE: comment out hive script file




    Comments cannot be the first line of a file, if I recall correctly. The way that I put my name and email at the top is after a using statement for the database.



    use default;



    -- John Doe, jdoe@acme.ru

    -- (c) Acme co 2007



    Select * from (...)



    Travis





    Travis Powell

    tpowell@tealeaf.com

    (415) 488-7160



    -----Original Message-----

    From: Satoshi Yamada

    Sent: Sunday, July 03, 2011 04:32 AM Pacific Standard Time

    To: user@hive.apache.org

    Subject: Re: comment out hive script file



    Thanks, Edward, and sorry for late reply.

    I want to add comment in the file using with "hive -f".

    $ cat sample_select.hql

    -- some commentSELECT something FROM sample_table;

    $ hive -f sample_select.hql

    Sample above does not work. Either "#" or "/* */" doesnot work.

    So, is there no way to add comment in the file?

    Thanks,satoshi

    --- On Wed, 2011/6/29, Edward Capriolo wrote:



    There is a subtle nuance, comments can only appear before QL statements not set or add commands.



    Edward



    On Wed, Jun 29, 2011 at 8:36 AM, Satoshi Yamada wrote:





    hi,

    Is there any way to comment out hive script file?

    Either "--" or "/* */" does not seem to work.

    Thanks in advance,satoshi

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedJun 29, '11 at 12:37p
activeJul 7, '11 at 2:28p
posts5
users3
websitehive.apache.org

People

Translate

site design / logo © 2021 Grokbase