You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2019/06/26 11:45:50 UTC

[kylin] 04/04: fix beeline meta data parser on partition information

This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch 2.6.x-hadoop3.1
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 431c6304c21f919bcfed9c68c876649a218cef42
Author: sickcate <ia...@gmail.com>
AuthorDate: Tue Apr 23 17:08:14 2019 +0800

    fix beeline meta data parser on partition information
---
 .../org/apache/kylin/source/hive/BeelineHiveClient.java | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/BeelineHiveClient.java b/source-hive/src/main/java/org/apache/kylin/source/hive/BeelineHiveClient.java
index 6ad8593..16b12f7 100644
--- a/source-hive/src/main/java/org/apache/kylin/source/hive/BeelineHiveClient.java
+++ b/source-hive/src/main/java/org/apache/kylin/source/hive/BeelineHiveClient.java
@@ -182,14 +182,15 @@ public class BeelineHiveClient implements IHiveClient {
                 resultSet.next();
                 Preconditions.checkArgument("# col_name".equals(resultSet.getString(1).trim()));
                 resultSet.next();
-                Preconditions.checkArgument("".equals(resultSet.getString(1).trim()));
-                while (resultSet.next()) {
-                    if ("".equals(resultSet.getString(1).trim())) {
-                        break;
-                    }
-                    partitionColumns.add(new HiveTableMeta.HiveTableColumnMeta(resultSet.getString(1).trim(),
-                            resultSet.getString(2).trim(), resultSet.getString(3).trim()));
-                }
+            if ("".equals(resultSet.getString(1).trim()))
+                resultSet.next();
+            do {
+                 if ("".equals(resultSet.getString(1).trim())) {
+                     break;
+                 }
+                 partitionColumns.add(new HiveTableMeta.HiveTableColumnMeta(resultSet.getString(1).trim(),
+                         resultSet.getString(2).trim(), resultSet.getString(3).trim()));
+            } while (resultSet.next());
                 builder.setPartitionColumns(partitionColumns);
             }