Hive
  1. Hive
  2. HIVE-4346

when writing data into filesystem from queries ,the output files could contain a line of column names

    Details

    • Type: New Feature New Feature
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Query Processor
    • Labels:
      None

      Description

      For example :
      hive>desc src;
      key string
      value string

      hive>select * from src;
      1 10
      2 20

      hive>set hive.output.markschema=true;
      hive>insert overwrite local directory './test1' select * from src ;
      hive>!ls -l './test1';
      ./test1/_metadata
      ./test1/000000_0

      hive>!cat './test1/_metadata'
      key^Avalue

      hive>!cat './test1/000000_0';
      1^A10
      2^A20

      1. HIVE-4346-4.patch
        23 kB
        caofangkun
      2. HIVE-4346-3.patch
        8 kB
        caofangkun
      3. HIVE-4346-1.patch
        6 kB
        caofangkun

        Issue Links

          Activity

          caofangkun created issue -
          caofangkun made changes -
          Field Original Value New Value
          Description For example :
          hive>desc src;
          key string
          value string
          hive>select * from src;
          1 10
          2 20
          hive>set hive.output.contain.columnnames=true;
          hive>insert overwrite local directory './test1' select * from src ;
          hive>!cat './test1/000000_0';
          key^Avalue
          1^A10
          2^A20
          For example :
          hive>desc src;
          key string
          value string

          hive>select * from src;
          1 10
          2 20

          hive>set hive.output.contain.columnnames=true;
          hive>insert overwrite local directory './test1' select * from src ;
          hive>!ls -l './test1';
          ./test1/_metadata
          ./test1/000000_0

          hive>!cat './test1/_metadata'
          key^Avalue

          hive>!cat './test1/000000_0';
          1^A10
          2^A20
          Show
          caofangkun added a comment - https://reviews.apache.org/r/10474/
          caofangkun made changes -
          Attachment HIVE-4346-1.patch [ 12578690 ]
          caofangkun made changes -
          Link This issue is related to HIVE-3682 [ HIVE-3682 ]
          Hide
          caofangkun added a comment -

          because of HIVE-3682, column names in _metadata should be separated by user defined separator

          Show
          caofangkun added a comment - because of HIVE-3682 , column names in _metadata should be separated by user defined separator
          caofangkun made changes -
          Description For example :
          hive>desc src;
          key string
          value string

          hive>select * from src;
          1 10
          2 20

          hive>set hive.output.contain.columnnames=true;
          hive>insert overwrite local directory './test1' select * from src ;
          hive>!ls -l './test1';
          ./test1/_metadata
          ./test1/000000_0

          hive>!cat './test1/_metadata'
          key^Avalue

          hive>!cat './test1/000000_0';
          1^A10
          2^A20
          For example :
          hive>desc src;
          key string
          value string

          hive>select * from src;
          1 10
          2 20

          hive>set hive.output.markschema=true;
          hive>insert overwrite local directory './test1' select * from src ;
          hive>!ls -l './test1';
          ./test1/_metadata
          ./test1/000000_0

          hive>!cat './test1/_metadata'
          key^Avalue

          hive>!cat './test1/000000_0';
          1^A10
          2^A20
          caofangkun made changes -
          Attachment HIVE-4346-3.patch [ 12582265 ]
          caofangkun made changes -
          Assignee caofangkun [ caofangkun ]
          caofangkun made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          caofangkun added a comment -

          https://reviews.apache.org/r/10474/

          Could anybody review this patch?

          Show
          caofangkun added a comment - https://reviews.apache.org/r/10474/ Could anybody review this patch?
          caofangkun made changes -
          Attachment HIVE-4346-4.patch [ 12586676 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          55d 21h 6m 1 caofangkun 07/Jun/13 07:37

            People

            • Assignee:
              caofangkun
              Reporter:
              caofangkun
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development