KYLIN-1758 add the hive set statements
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/76d3bd21 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/76d3bd21 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/76d3bd21 Branch: refs/heads/1.5.x-CDH5.7 Commit: 76d3bd21a46549dd6da4db1ffac3bdc5dcbe12c4 Parents: 9bac838 Author: shaofengshi <shaofeng...@apache.org> Authored: Sat Jun 4 16:22:38 2016 +0800 Committer: shaofengshi <shaofeng...@apache.org> Committed: Mon Jul 25 20:13:38 2016 +0800 ---------------------------------------------------------------------- jdbc/pom.xml | 4 ---- server/pom.xml | 4 ---- .../main/java/org/apache/kylin/source/hive/HiveMRInput.java | 7 ++++--- 3 files changed, 4 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/76d3bd21/jdbc/pom.xml ---------------------------------------------------------------------- diff --git a/jdbc/pom.xml b/jdbc/pom.xml index ff83568..e86998e 100644 --- a/jdbc/pom.xml +++ b/jdbc/pom.xml @@ -27,11 +27,7 @@ <parent> <groupId>org.apache.kylin</groupId> <artifactId>kylin</artifactId> -<<<<<<< 571874049bdb9139afdc467474b53a1d63be818b <version>1.5.3</version> -======= - <version>1.5.2.1</version> ->>>>>>> update version number </parent> http://git-wip-us.apache.org/repos/asf/kylin/blob/76d3bd21/server/pom.xml ---------------------------------------------------------------------- diff --git a/server/pom.xml b/server/pom.xml index e0a4110..bca91fb 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -28,11 +28,7 @@ <parent> <groupId>org.apache.kylin</groupId> <artifactId>kylin</artifactId> -<<<<<<< 571874049bdb9139afdc467474b53a1d63be818b <version>1.5.3</version> -======= - <version>1.5.2.1</version> ->>>>>>> update version number </parent> http://git-wip-us.apache.org/repos/asf/kylin/blob/76d3bd21/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java ---------------------------------------------------------------------- diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java index 5de9a98..0dfeb5a 100644 --- a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java +++ b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java @@ -132,7 +132,6 @@ public class HiveMRInput implements IMRInput { hiveCmdBuilder.addStatement(JoinedFlatTable.generateHiveSetStatements(conf)); hiveCmdBuilder.addStatement("set hive.exec.compress.output=false;\n"); hiveCmdBuilder.addStatement(JoinedFlatTable.generateCountDataStatement(flatTableDesc, rowCountOutputDir)); - step.setCmd(hiveCmdBuilder.build()); step.setName(ExecutableConstants.STEP_NAME_COUNT_HIVE_TABLE); @@ -161,10 +160,12 @@ public class HiveMRInput implements IMRInput { if (lookupViewsTables.size() == 0) { return null; } + String setHql = ""; + setHql = JoinedFlatTable.generateHiveSetStatements(conf); final String useDatabaseHql = "USE " + conf.getConfig().getHiveDatabaseForIntermediateTable() + ";"; hiveCmdBuilder.addStatement(useDatabaseHql); - hiveCmdBuilder.addStatement(JoinedFlatTable.generateHiveSetStatements(conf)); - for (TableDesc lookUpTableDesc : lookupViewsTables) { + hiveCmdBuilder.addStatement(setHql); + for(TableDesc lookUpTableDesc : lookupViewsTables) { if (TableDesc.TABLE_TYPE_VIRTUAL_VIEW.equalsIgnoreCase(lookUpTableDesc.getTableType())) { StringBuilder createIntermediateTableHql = new StringBuilder(); createIntermediateTableHql.append("DROP TABLE IF EXISTS " + lookUpTableDesc.getMaterializedName() + ";\n");