Hive
  1. Hive
  2. HIVE-302

Implement "LINES TERMINATED BY"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed

      Description

      Specifying "LINES TERMINATED BY" when creating a table currently doesn't do anything when querying that data. It needs to be implemented to support various datasets that ends lines with other characters then just line break.

      1. HIVE-302.3.patch
        20 kB
        Zheng Shao
      2. HIVE-302.2.patch
        4 kB
        Zheng Shao
      3. HIVE-302.1.patch
        1 kB
        Zheng Shao

        Issue Links

          Activity

          Hide
          Namit Jain added a comment -

          Committed. Thanks Zheng

          Show
          Namit Jain added a comment - Committed. Thanks Zheng
          Hide
          Namit Jain added a comment -

          +1

          looks good - will commit if the tests pass

          Show
          Namit Jain added a comment - +1 looks good - will commit if the tests pass
          Hide
          Zheng Shao added a comment -

          Fixed ctas.q and also tested all test cases.

          Show
          Zheng Shao added a comment - Fixed ctas.q and also tested all test cases.
          Hide
          Namit Jain added a comment -

          ctas.q has a CTAS with line delimiter specified - that also breaks, the tests need to be modified

          Show
          Namit Jain added a comment - ctas.q has a CTAS with line delimiter specified - that also breaks, the tests need to be modified
          Hide
          Zheng Shao added a comment -

          This one keeps the old syntax but will throw out an error in case anything breaks.

          Show
          Zheng Shao added a comment - This one keeps the old syntax but will throw out an error in case anything breaks.
          Hide
          He Yongqiang added a comment -

          oh, sorry, ignore my previous comment.

          Show
          He Yongqiang added a comment - oh, sorry, ignore my previous comment.
          Hide
          He Yongqiang added a comment -

          +1. Looks good. Will commit if tests pass.

          Show
          He Yongqiang added a comment - +1. Looks good. Will commit if tests pass.
          Hide
          Namit Jain added a comment -

          talked with Zheng offline - it might be easier to specify a semantic error instead for compatiblity

          Show
          Namit Jain added a comment - talked with Zheng offline - it might be easier to specify a semantic error instead for compatiblity
          Hide
          Zheng Shao added a comment -

          This is not fixable currently because the line terminator is determined by LineRecordReader.LineReader which is in the Hadoop land.
          However we do support writing to such tables.

          In order to avoid confusion, I will just drop this from the syntax.

          Show
          Zheng Shao added a comment - This is not fixable currently because the line terminator is determined by LineRecordReader.LineReader which is in the Hadoop land. However we do support writing to such tables. In order to avoid confusion, I will just drop this from the syntax.
          Hide
          Namit Jain added a comment -

          create table nzhang_ctas5 row format delimited fields terminated by ',' lines terminated by '.' stored as textfile as select key, value from src sort by key, value limit 10;

          select * from nzhang_ctas5;

          Modified ctas.q to add the following:

          Got only 1 row as the output.

          Show
          Namit Jain added a comment - create table nzhang_ctas5 row format delimited fields terminated by ',' lines terminated by '.' stored as textfile as select key, value from src sort by key, value limit 10; select * from nzhang_ctas5; Modified ctas.q to add the following: Got only 1 row as the output.

            People

            • Assignee:
              Zheng Shao
              Reporter:
              Johan Oskarsson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development