FAQ
Author: brock
Date: Fri Feb 27 18:36:39 2015
New Revision: 1662780

URL: http://svn.apache.org/r1662780
Log:
HIVE-9770 - Beeline ignores --showHeader for non-tablular output formats i.e csv,tsv,dsv (Naveen Gangam via Brock)

Modified:
     hive/trunk/beeline/src/java/org/apache/hive/beeline/DeprecatedSeparatedValuesOutputFormat.java
     hive/trunk/beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java

Modified: hive/trunk/beeline/src/java/org/apache/hive/beeline/DeprecatedSeparatedValuesOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/trunk/beeline/src/java/org/apache/hive/beeline/DeprecatedSeparatedValuesOutputFormat.java?rev=1662780&r1=1662779&r2=1662780&view=diff
==============================================================================
--- hive/trunk/beeline/src/java/org/apache/hive/beeline/DeprecatedSeparatedValuesOutputFormat.java (original)
+++ hive/trunk/beeline/src/java/org/apache/hive/beeline/DeprecatedSeparatedValuesOutputFormat.java Fri Feb 27 18:36:39 2015
@@ -45,6 +45,11 @@ class DeprecatedSeparatedValuesOutputFor
    public int print(Rows rows) {
      int count = 0;
      while (rows.hasNext()) {
+ if (count == 0 && !beeLine.getOpts().getShowHeader()) {
+ rows.next();
+ count++;
+ continue;
+ }
        printRow(rows, (Rows.Row) rows.next());
        count++;
      }

Modified: hive/trunk/beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/trunk/beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java?rev=1662780&r1=1662779&r2=1662780&view=diff
==============================================================================
--- hive/trunk/beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java (original)
+++ hive/trunk/beeline/src/java/org/apache/hive/beeline/SeparatedValuesOutputFormat.java Fri Feb 27 18:36:39 2015
@@ -64,6 +64,11 @@ class SeparatedValuesOutputFormat implem

      int count = 0;
      while (rows.hasNext()) {
+ if (count == 0 && !beeLine.getOpts().getShowHeader()) {
+ rows.next();
+ count++;
+ continue;
+ }
        printRow(rows, (Rows.Row) rows.next());
        count++;
      }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedFeb 27, '15 at 6:36p
activeFeb 27, '15 at 6:36p
posts1
users1
websitehive.apache.org

1 user in discussion

Brock: 1 post

People

Translate

site design / logo © 2021 Grokbase