KYLIN-1896 jdbc: add columnClassName to column metadata

Signed-off-by: lidongsjtu <lid...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/743c9f8d
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/743c9f8d
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/743c9f8d

Branch: refs/heads/1.5.x-CDH5.7
Commit: 743c9f8d32b46b4c6e5448f4c03011e94bd52975
Parents: 469aa40
Author: kangkaisen <kangkai...@live.com>
Authored: Fri Jul 15 17:26:10 2016 +0800
Committer: lidongsjtu <lid...@apache.org>
Committed: Fri Jul 15 18:22:42 2016 +0800

----------------------------------------------------------------------
 jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/743c9f8d/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java 
b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
index fe3712b..8890575 100644
--- a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
+++ b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
@@ -383,9 +383,10 @@ public class KylinClient implements IRemoteClient {
         List<ColumnMetaData> metas = new ArrayList<ColumnMetaData>();
         for (int i = 0; i < queryResp.getColumnMetas().size(); i++) {
             SQLResponseStub.ColumnMetaStub scm = 
queryResp.getColumnMetas().get(i);
-            ScalarType type = ColumnMetaData.scalar(scm.getColumnType(), 
scm.getColumnTypeName(), Rep.of(convertType(scm.getColumnType())));
+            Class columnClass = convertType(scm.getColumnType());
+            ScalarType type = ColumnMetaData.scalar(scm.getColumnType(), 
scm.getColumnTypeName(), Rep.of(columnClass));
 
-            ColumnMetaData meta = new ColumnMetaData(i, scm.isAutoIncrement(), 
scm.isCaseSensitive(), scm.isSearchable(), scm.isCurrency(), 
scm.getIsNullable(), scm.isSigned(), scm.getDisplaySize(), scm.getLabel(), 
scm.getName(), scm.getSchemaName(), scm.getPrecision(), scm.getScale(), 
scm.getTableName(), scm.getSchemaName(), type, scm.isReadOnly(), 
scm.isWritable(), scm.isWritable(), null);
+            ColumnMetaData meta = new ColumnMetaData(i, scm.isAutoIncrement(), 
scm.isCaseSensitive(), scm.isSearchable(), scm.isCurrency(), 
scm.getIsNullable(), scm.isSigned(), scm.getDisplaySize(), scm.getLabel(), 
scm.getName(), scm.getSchemaName(), scm.getPrecision(), scm.getScale(), 
scm.getTableName(), scm.getSchemaName(), type, scm.isReadOnly(), 
scm.isWritable(), scm.isWritable(), columnClass.getCanonicalName());
 
             metas.add(meta);
         }

Reply via email to