You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vg...@apache.org on 2019/01/18 18:26:14 UTC

[2/2] hive git commit: HIVE-21107: Cannot find field" error during dynamically partitioned hash join (Vineet Garg, reviewed by Gopal V)

HIVE-21107: Cannot find field" error during dynamically partitioned hash join (Vineet Garg, reviewed by Gopal V)


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

Branch: refs/heads/master
Commit: a71297852836e291e50a2e5019f5e760f8d6136a
Parents: 67284b0
Author: Vineet Garg <vg...@apache.org>
Authored: Fri Jan 18 10:25:43 2019 -0800
Committer: Vineet Garg <vg...@apache.org>
Committed: Fri Jan 18 10:25:43 2019 -0800

----------------------------------------------------------------------
 .../test/resources/testconfiguration.properties |    1 +
 .../hadoop/hive/ql/plan/ExprNodeDescUtils.java  |    5 +
 .../dynamic_partition_join_noncbo.q             | 1005 ++++++
 .../llap/dynamic_partition_join_noncbo.q.out    | 2867 ++++++++++++++++++
 4 files changed, 3878 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a7129785/itests/src/test/resources/testconfiguration.properties
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties
index 18e4f7f..e605dde 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -506,6 +506,7 @@ minillaplocal.query.files=\
   cross_prod_4.q,\
   dpp.q,\
   dynamic_partition_pruning.q,\
+  dynamic_partition_join_noncbo.q,\
   dynamic_semijoin_reduction.q,\
   dynamic_semijoin_reduction_2.q,\
   dynamic_semijoin_reduction_3.q,\

http://git-wip-us.apache.org/repos/asf/hive/blob/a7129785/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
index 7b23240..eb5b111 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.hive.ql.exec.Operator;
 import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
 import org.apache.hadoop.hive.ql.exec.RowSchema;
 import org.apache.hadoop.hive.ql.exec.UDF;
+import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.optimizer.ConstantPropagateProcFactory;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
@@ -434,6 +435,10 @@ public class ExprNodeDescUtils {
     for (Map.Entry<String, ExprNodeDesc> mapEntry : reduceSinkOp.getColumnExprMap().entrySet()) {
       if (mapEntry.getValue().equals(source)) {
         String columnInternalName = mapEntry.getKey();
+        // Joins always use KEY columns for the keys, so avoid resolving to VALUE columns
+        if(columnInternalName.startsWith(Utilities.ReduceField.VALUE.toString())) {
+          continue;
+        }
         if (source instanceof ExprNodeColumnDesc) {
           // The join key is a table column. Create the ExprNodeDesc based on this column.
           ColumnInfo columnInfo = reduceSinkOp.getSchema().getColumnInfo(columnInternalName);

http://git-wip-us.apache.org/repos/asf/hive/blob/a7129785/ql/src/test/queries/clientpositive/dynamic_partition_join_noncbo.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/dynamic_partition_join_noncbo.q b/ql/src/test/queries/clientpositive/dynamic_partition_join_noncbo.q
new file mode 100644
index 0000000..90426f5
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/dynamic_partition_join_noncbo.q
@@ -0,0 +1,1005 @@
+CREATE TABLE t0 (
+    phi bigint,
+    vn string,
+    t0_c0 string,
+    t0_c1 string,
+    t0_c2 string,
+    t0_c3 string,
+    t0_c4 string,
+    t0_c5 bigint,
+    t0_c6 string,
+    t0_c7 string,
+    t0_c8 timestamp,
+    t0_c9 bigint,
+    t0_c10 string,
+    t0_c11 string,
+    t0_c12 string,
+    t0_c13 string,
+    t0_c14 bigint,
+    t0_c15 string,
+    t0_c16 timestamp,
+    t0_c17 bigint,
+    t0_c18 string,
+    t0_c19 timestamp,
+    t0_c20 bigint,
+    t0_c21 bigint,
+    t0_c22 bigint,
+    t0_c23 bigint,
+    t0_c24 bigint,
+    t0_c25 bigint,
+    t0_c26 bigint,
+    t0_c27 string,
+    t0_c28 string,
+    t0_c29 string,
+    t0_c30 string,
+    t0_c31 string,
+    t0_c32 string,
+    t0_c33 date,
+    t0_c34 double,
+    t0_c35 double,
+    t0_c36 string,
+    t0_c37 bigint,
+    t0_c38 date,
+    t0_c39 string,
+    t0_c40 timestamp,
+    t0_c41 double,
+    t0_c42 string,
+    t0_c43 string,
+    t0_c44 string,
+    t0_c45 string,
+    t0_c46 string,
+    t0_c47 string,
+    t0_c48 date,
+    t0_c49 timestamp,
+    t0_c50 string,
+    t0_c51 string,
+    t0_c52 string,
+    t0_c53 string,
+    t0_c54 date,
+    t0_c55 string,
+    t0_c56 string,
+    t0_c57 string,
+    t0_c58 string,
+    t0_c59 string,
+    t0_c60 string,
+    t0_c61 string,
+    t0_c62 string,
+    t0_c63 string,
+    t0_c64 string,
+    t0_c65 string,
+    t0_c66 string,
+    t0_c67 string,
+    t0_c68 string,
+    t0_c69 string,
+    t0_c70 string,
+    t0_c71 string,
+    t0_c72 string,
+    t0_c73 bigint,
+    t0_c74 string,
+    t0_c75 string,
+    t0_c76 string,
+    t0_c77 date,
+    t0_c78 string,
+    t0_c79 bigint,
+    t0_c80 string,
+    t0_c81 bigint,
+    t0_c82 string,
+    t0_c83 string,
+    t0_c84 string,
+    t0_c85 double,
+    t0_c86 double,
+    t0_c87 double,
+    t0_c88 double,
+    t0_c89 timestamp,
+    t0_c90 date,
+    t0_c91 string,
+    t0_c92 string,
+    t0_c93 string,
+    t0_c94 string,
+    t0_c95 string,
+    t0_c96 string,
+    t0_c97 string,
+    t0_c98 string,
+    t0_c99 date,
+    t0_c100 date,
+    t0_c101 bigint,
+    t0_c102 string,
+    t0_c103 string,
+    t0_c104 string,
+    t0_c105 string,
+    t0_c106 string,
+    t0_c107 double,
+    t0_c108 double,
+    t0_c109 string,
+    t0_c110 string,
+    t0_c111 string,
+    t0_c112 double,
+    t0_c113 bigint,
+    t0_c114 double,
+    t0_c115 double,
+    t0_c116 date,
+    t0_c117 date,
+    t0_c118 string,
+    t0_c119 date,
+    t0_c120 string,
+    t0_c121 string,
+    t0_c122 string,
+    t0_c123 string,
+    t0_c124 string,
+    t0_c125 date,
+    t0_c126 date,
+    t0_c127 string,
+    t0_c128 string,
+    t0_c129 double,
+    t0_c130 double,
+    t0_c131 double,
+    t0_c132 double,
+    t0_c133 double,
+    t0_c134 string,
+    t0_c135 string,
+    t0_c136 bigint,
+    t0_c137 string,
+    t0_c138 string,
+    t0_c139 string,
+    t0_c140 string,
+    t0_c141 string,
+    t0_c142 double,
+    t0_c143 string,
+    t0_c144 string,
+    t0_c145 string,
+    t0_c146 string,
+    t0_c147 double,
+    t0_c148 string,
+    t0_c149 string,
+    t0_c150 timestamp,
+    t0_c151 timestamp,
+    t0_c152 string,
+    t0_c153 double,
+    t0_c154 string,
+    t0_c155 string,
+    t0_c156 string,
+    t0_c157 string,
+    t0_c158 string,
+    t0_c159 string,
+    t0_c160 string,
+    t0_c161 string,
+    t0_c162 string,
+    t0_c163 string,
+    t0_c164 string,
+    t0_c165 string,
+    t0_c166 string,
+    t0_c167 string,
+    t0_c168 string,
+    t0_c169 string,
+    t0_c170 string,
+    t0_c171 string,
+    t0_c172 string,
+    t0_c173 string,
+    t0_c174 string,
+    t0_c175 string,
+    t0_c176 string,
+    t0_c177 string,
+    t0_c178 string,
+    t0_c179 string,
+    t0_c180 double,
+    t0_c181 double,
+    t0_c182 string,
+    t0_c183 string,
+    t0_c184 string,
+    t0_c185 string,
+    t0_c186 string,
+    t0_c187 string,
+    t0_c188 bigint,
+    t0_c189 timestamp,
+    t0_c190 string,
+    t0_c191 string,
+    t0_c192 string,
+    t0_c193 double,
+    t0_c194 string,
+    t0_c195 string,
+    t0_c196 string,
+    t0_c197 double,
+    t0_c198 string,
+    t0_c199 string,
+    t0_c200 string,
+    t0_c201 string,
+    t0_c202 timestamp,
+    t0_c203 timestamp,
+    t0_c204 bigint,
+    t0_c205 bigint,
+    t0_c206 string,
+    t0_c207 string,
+    t0_c208 string,
+    t0_c209 bigint,
+    t0_c210 bigint,
+    t0_c211 bigint,
+    t0_c212 string,
+    t0_c213 double,
+    t0_c214 string,
+    t0_c215 string,
+    t0_c216 string,
+    t0_c217 date,
+    t0_c218 date,
+    t0_c219 string,
+    t0_c220 string,
+    t0_c221 string,
+    t0_c222 double,
+    t0_c223 double,
+    t0_c224 bigint,
+    t0_c225 string,
+    t0_c226 string,
+    t0_c227 string,
+    t0_c228 string,
+    t0_c229 string,
+    t0_c230 string,
+    t0_c231 string,
+    t0_c232 bigint,
+    t0_c233 bigint,
+    t0_c234 string,
+    t0_c235 string,
+    t0_c236 bigint,
+    t0_c237 string,
+    t0_c238 string,
+    t0_c239 string,
+    t0_c240 string,
+    t0_c241 string,
+    t0_c242 bigint,
+    t0_c243 string,
+    t0_c244 string,
+    t0_c245 string,
+    t0_c246 string,
+    t0_c247 bigint,
+    t0_c248 bigint,
+    t0_c249 string,
+    t0_c250 string,
+    t0_c251 string,
+    t0_c252 string,
+    t0_c253 string,
+    t0_c254 string,
+    t0_c255 timestamp,
+    t0_c256 timestamp,
+    t0_c257 timestamp,
+    t0_c258 int,
+    t0_c259 bigint,
+    t0_c260 bigint,
+    t0_c261 timestamp,
+    t0_c262 timestamp,
+    t0_c263 string,
+    t0_c264 string,
+    t0_c265 string,
+    t0_c266 string,
+    t0_c267 string,
+    t0_c268 double,
+    t0_c269 double,
+    t0_c270 double,
+    t0_c271 string,
+    t0_c272 string,
+    t0_c273 string,
+    t0_c274 bigint,
+    t0_c275 string,
+    t0_c276 string,
+    t0_c277 string,
+    t0_c278 string,
+    t0_c279 string,
+    t0_c280 string,
+    t0_c281 string,
+    t0_c282 string,
+    t0_c283 string,
+    t0_c284 string,
+    t0_c285 string,
+    t0_c286 string,
+    t0_c287 string,
+    t0_c288 string,
+    t0_c289 string,
+    t0_c290 string,
+    t0_c291 string,
+    t0_c292 string,
+    t0_c293 string,
+    t0_c294 string,
+    t0_c295 string,
+    t0_c296 string,
+    t0_c297 string,
+    t0_c298 string,
+    t0_c299 string,
+    t0_c300 string,
+    t0_c301 string,
+    t0_c302 string,
+    t0_c303 string,
+    t0_c304 string,
+    t0_c305 string,
+    t0_c306 int
+) PARTITIONED BY (
+   `p1` string)
+ ROW FORMAT SERDE
+   'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
+ STORED AS INPUTFORMAT
+   'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
+ OUTPUTFORMAT
+   'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat';
+
+ CREATE TABLE t1 (
+    phi bigint,
+    pli bigint,
+    t1_c0 string,
+    t1_c1 string,
+    t1_c2 string,
+    t1_c3 string,
+    t1_c4 timestamp,
+    t1_c5 bigint,
+    t1_c6 string,
+    t1_c7 bigint,
+    t1_c8 string,
+    t1_c9 bigint,
+    t1_c45 string,
+    t1_c46 string,
+    t1_c47 string,
+    t1_c48 string,
+    t1_c49 string,
+    t1_c50 string,
+    t1_c51 string,
+    t1_c52 string,
+    t1_c53 string,
+    t1_c54 timestamp,
+    t1_c55 string,
+    t1_c56 bigint,
+    t1_c57 bigint,
+    t1_c58 string,
+    t1_c59 double,
+    t1_c60 string,
+    t1_c61 double,
+    t1_c62 bigint,
+    t1_c63 bigint,
+    t1_c64 date,
+    t1_c65 double,
+    t1_c66 string,
+    t1_c67 double,
+    t1_c68 string,
+    t1_c69 string,
+    t1_c70 string,
+    t1_c71 string,
+    t1_c72 string,
+    t1_c73 string,
+    t1_c74 string,
+    t1_c75 string,
+    t1_c76 bigint,
+    t1_c77 double,
+    t1_c78 string,
+    t1_c79 double,
+    t1_c80 double,
+    t1_c81 double,
+    t1_c82 double,
+    t1_c83 double,
+    t1_c84 double,
+    t1_c85 double,
+    t1_c86 double,
+    t1_c87 double,
+    t1_c88 string,
+    t1_c89 string,
+    t1_c90 string,
+    t1_c91 bigint,
+      t1_c135 bigint,
+    t1_c136 bigint,
+    t1_c137 bigint,
+    t1_c138 string,
+    t1_c139 string,
+    t1_c140 double,
+    t1_c141 double,
+    t1_c142 double,
+    t1_c143 string,
+    t1_c144 string,
+    t1_c145 string,
+    t1_c146 date,
+    t1_c147 double,
+    t1_c148 date,
+    t1_c196 string,
+    t1_c197 string,
+    t1_c198 string,
+    t1_c199 string,
+    t1_c200 bigint,
+    t1_c201 string,
+    t1_c256 double,
+    t1_c257 string,
+    t1_c258 string,
+    t1_c259 string,
+    t1_c260 string,
+    t1_c347 string,
+    t1_c348 string,
+    t1_c349 int
+) PARTITIONED BY (
+   `p1` string)
+ ROW FORMAT SERDE
+   'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
+ STORED AS INPUTFORMAT
+   'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
+ OUTPUTFORMAT
+   'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat';
+
+CREATE TABLE t2 (
+    pli bigint,
+    pdi bigint,
+    dtpi bigint,
+    t2_c0 string,
+    t2_c1 string,
+    t2_c2 string,
+    t2_c3 string,
+    t2_c4 string,
+    t2_c5 bigint,
+    t2_c6 string,
+    t2_c7 bigint,
+    t2_c8 timestamp,
+    t2_c9 bigint,
+    t2_c10 timestamp,
+    t2_c11 bigint,
+    t2_c12 double,
+    t2_c464 string,
+    t2_c465 string,
+    t2_c466 string,
+    t2_c467 int
+)
+PARTITIONED BY (
+  `p1` string)
+ROW FORMAT SERDE
+  'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat';
+
+--
+-- Partitions and stats
+--
+
+alter table t0 add partition(p1='P30');
+alter table t1 add partition(p1='P30');
+alter table t2 add partition(p1='P30');
+
+alter table t0 partition(p1='P30') update statistics set('numRows'='8146725','rawDataSize'='46331126445');
+alter table t1 partition(p1='P30') update statistics set('numRows'='15680439','rawDataSize'='56180088521');
+alter table t2 partition(p1='P30') update statistics set('numRows'='15390381','rawDataSize'='116471238533');
+
+--
+-- Query
+--
+
+set hive.explain.user=false;
+set hive.auto.convert.join=true;
+set hive.optimize.dynamic.partition.hashjoin=true;
+set hive.auto.convert.join.noconditionaltask.size=858783744;
+set hive.stats.fetch.column.stats=false;
+
+set hive.cbo.enable=false;
+
+explain
+select
+t0.p1,
+t0.vn,
+t1.pli,
+t2.dtpi,
+t0.vn
+from t0
+  JOIN t1
+    ON ( (t0.phi = t1.phi AND t0.p1 = t1.p1))
+  JOIN t2
+    ON ( (t1.pli = t2.pli) AND (t1.p1 = t2.p1))
+WHERE
+t0.p1 = 'P30'
+;
+
+select
+t0.p1,
+t0.vn,
+t1.pli,
+t2.dtpi,
+t0.vn
+from t0
+  JOIN t1
+    ON ( (t0.phi = t1.phi AND t0.p1 = t1.p1))
+  JOIN t2
+    ON ( (t1.pli = t2.pli) AND (t1.p1 = t2.p1))
+WHERE
+t0.p1 = 'P30'
+;
+
+DROP TABLE t0;
+DROP TABLE t1;
+DROP TABLE t3;
+
+set hive.optimize.index.filter=true;
+set hive.cbo.enable=false;
+
+set hive.auto.convert.sortmerge.join.to.mapjoin=false;
+
+set hive.exec.dynamic.partition=true;
+set hive.enforce.sortmergebucketmapjoin=true;
+
+set hive.map.aggr=true;
+
+set hive.auto.convert.join=true;
+set hive.optimize.dynamic.partition.hashjoin=true;
+set hive.auto.convert.join.noconditionaltask.size=2000;
+set hive.exec.reducers.bytes.per.reducer=200000;
+set hive.tez.dynamic.partition.pruning=false;
+set hive.vectorized.execution.enabled=true;
+
+-- trigger stats are complete bug
+set hive.stats.fetch.column.stats=true;
+
+set hive.auto.convert.join.noconditionaltask.size=858783744;
+
+CREATE TABLE `table1`(
+col5679 bigint,
+t0_col1 double,
+t0_col2 double,
+t0_col3 double,
+t0_col4 double,
+t0_col5 date,
+t0_col6 date,
+t0_col7 date,
+t0_col8 date,
+col7989 string,
+t0_col10 bigint,
+t0_col11 string,
+t0_col12 bigint,
+t0_col13 date,
+t0_col14 bigint,
+t0_col15 string,
+t0_col16 string,
+t0_col17 string,
+t0_col18 string,
+t0_col19 string,
+t0_col20 string,
+t0_col21 double,
+t0_col22 double,
+t0_col23 double,
+t0_col24 double,
+t0_col25 double,
+t0_col26 string,
+t0_col27 timestamp,
+t0_col28 bigint,
+t0_col29 string,
+col7890 bigint,
+t0_col31 string,
+t0_col32 bigint,
+t0_col33 string,
+t0_col34 string,
+t0_col35 double,
+t0_col36 double,
+t0_col37 bigint,
+t0_col38 double,
+t0_col39 double,
+t0_col40 date,
+t0_col41 string,
+t0_col42 string,
+t0_col43 string,
+t0_col44 double,
+t0_col45 bigint,
+t0_col46 date,
+t0_col47 string,
+t0_col48 string,
+t0_col49 bigint,
+t0_col50 string,
+t0_col51 timestamp,
+t0_col52 bigint,
+t0_col53 string,
+t0_col54 string,
+t0_col55 date,
+t0_col56 double,
+t0_col57 double,
+t0_col58 string,
+t0_col59 date,
+t0_col60 date,
+t0_col61 string,
+t0_col62 string,
+t0_col63 string,
+t0_col64 string,
+t0_col65 string,
+t0_col66 string,
+t0_col67 string,
+t0_col68 string,
+t0_col69 string,
+t0_col70 string,
+t0_col71 string,
+t0_col72 string,
+t0_col73 string,
+t0_col74 string,
+t0_col75 string,
+t0_col76 string,
+t0_col77 string,
+t0_col78 date,
+t0_col79 bigint,
+t0_col80 double,
+t0_col81 double,
+t0_col82 bigint,
+t0_col83 bigint,
+t0_col84 string,
+t0_col85 bigint,
+col23455 bigint,
+t0_col87 double,
+t0_col88 string,
+t0_col89 double,
+t0_col90 double,
+t0_col91 string,
+t0_col92 bigint,
+t0_col93 string,
+t0_col94 bigint,
+t0_col95 bigint,
+t0_col96 bigint,
+t0_col97 string,
+t0_col98 bigint,
+t0_col99 double,
+t0_col100 string,
+t0_col101 bigint,
+t0_col102 string,
+t0_col103 bigint,
+t0_col104 string,
+t0_col105 string,
+t0_col106 bigint,
+t0_col107 string,
+t0_col108 double,
+t0_col109 double,
+t0_col110 double,
+t0_col111 string,
+t0_col112 bigint,
+t0_col113 string,
+t0_col114 string,
+t0_col115 bigint,
+t0_col116 double,
+t0_col117 double,
+t0_col118 double,
+t0_col119 double,
+t0_col120 double,
+t0_col121 double,
+t0_col122 double,
+t0_col123 double,
+t0_col124 double,
+t0_col125 double,
+t0_col126 double,
+t0_col127 string,
+col11 string,
+t0_col129 string,
+t0_col130 double,
+t0_col131 string,
+t0_col132 bigint,
+t0_col133 bigint,
+t0_col134 string,
+t0_col135 string,
+t0_col136 bigint,
+t0_col137 double,
+t0_col138 double,
+t0_col139 double,
+t0_col140 double,
+t0_col141 double,
+t0_col142 double,
+t0_col143 string,
+t0_col144 string,
+t0_col145 string,
+t0_col146 string,
+t0_col147 string,
+t0_col148 string,
+t0_col149 string,
+t0_col150 bigint,
+t0_col151 string,
+t0_col152 string,
+t0_col153 string,
+t0_col154 string,
+t0_col155 string,
+t0_col156 date,
+t0_col157 string,
+t0_col158 bigint,
+t0_col159 double,
+t0_col160 bigint,
+t0_col161 string,
+t0_col162 string,
+t0_col163 string,
+t0_col164 string,
+t0_col165 string,
+t0_col166 string,
+t0_col167 string,
+t0_col168 date,
+t0_col169 date,
+t0_col170 date,
+t0_col171 string,
+t0_col172 string,
+t0_col173 string,
+t0_col174 string,
+t0_col175 string,
+t0_col176 string,
+t0_col177 string,
+t0_col178 string,
+t0_col179 string,
+t0_col180 string,
+t0_col181 bigint,
+t0_col182 string,
+t0_col183 string,
+t0_col184 date,
+t0_col185 string,
+t0_col186 string,
+t0_col187 string,
+t0_col188 bigint,
+t0_col189 bigint,
+t0_col190 string,
+t0_col191 string,
+t0_col192 string,
+t0_col193 timestamp,
+t0_col194 bigint,
+t0_col195 string,
+t0_col196 string,
+t0_col197 double,
+t0_col198 bigint,
+t0_col199 timestamp,
+t0_col200 bigint,
+t0_col201 string,
+t0_col202 bigint,
+t0_col203 bigint,
+t0_col204 string,
+t0_col205 string,
+t0_col206 string,
+t0_col207 timestamp,
+t0_col208 double,
+t0_col209 string,
+t0_col210 bigint,
+t0_col211 bigint,
+t0_col212 timestamp,
+t0_col213 string,
+t0_col214 string,
+t0_col215 string,
+t0_col216 string,
+t0_col217 bigint,
+t0_col218 string,
+t0_col219 string,
+t0_col220 string,
+t0_col221 string,
+t0_col222 string,
+t0_col223 string,
+t0_col224 string,
+t0_col225 string,
+t0_col226 string,
+t0_col227 string,
+t0_col228 string,
+t0_col229 string,
+t0_col230 string,
+t0_col231 string,
+t0_col232 string,
+t0_col233 bigint,
+t0_col234 bigint,
+t0_col235 timestamp,
+t0_col236 timestamp,
+t0_col237 timestamp,
+t0_col238 int,
+t0_col239 string,
+t0_col240 bigint,
+t0_col241 string,
+t0_col242 string,
+t0_col243 string,
+t0_col244 string,
+t0_col245 string,
+t0_col246 string,
+t0_col247 string,
+t0_col248 string,
+t0_col249 string,
+t0_col250 string,
+t0_col251 string,
+t0_col252 string,
+t0_col253 string,
+t0_col254 string,
+t0_col255 string,
+t0_col256 string,
+t0_col257 string,
+t0_col258 string,
+t0_col259 string,
+t0_col260 string,
+t0_col261 string,
+t0_col262 string,
+t0_col263 string,
+t0_col264 string,
+t0_col265 string,
+t0_col266 string,
+t0_col267 string,
+t0_col268 string,
+t0_col269 string,
+t0_col270 string,
+t0_col271 string,
+t0_col272 string,
+t0_col273 string,
+t0_col274 string,
+t0_col275 string,
+t0_col276 string,
+t0_col277 string,
+t0_col278 string,
+t0_col279 string,
+t0_col280 string,
+t0_col281 string,
+t0_col282 string,
+t0_col283 string,
+t0_col284 string,
+t0_col285 string,
+t0_col286 string,
+t0_col287 string,
+t0_col288 string,
+t0_col289 string,
+t0_col290 string,
+t0_col291 string,
+t0_col292 string,
+t0_col293 string,
+t0_col294 string,
+t0_col295 string,
+t0_col296 string,
+t0_col297 string,
+t0_col298 string,
+t0_col299 string,
+t0_col300 string,
+t0_col301 string,
+t0_col302 string,
+t0_col303 string,
+t0_col304 string,
+t0_col305 string,
+t0_col306 string,
+t0_col307 int)
+PARTITIONED BY (
+ `col567` string) ;
+
+alter table table1 add partition (col567='P1');
+ alter table table1 add partition (col567='P2'); 
+ alter table table1 add partition (col567='P3'); 
+ alter table table1 add partition (col567='P4'); 
+ alter table table1 add partition (col567='P5'); 
+ alter table table1 add partition (col567='P6'); 
+ alter table table1 add partition (col567='P7'); 
+ alter table table1 add partition (col567='P8'); 
+ alter table table1 add partition (col567='P9'); 
+ alter table table1 add partition (col567='P10'); 
+ alter table table1 add partition (col567='P11'); 
+ alter table table1 add partition (col567='P12'); 
+ alter table table1 add partition (col567='P13'); 
+ alter table table1 add partition (col567='P14'); 
+ alter table table1 add partition (col567='P15'); 
+ alter table table1 add partition (col567='P16'); 
+ alter table table1 add partition (col567='P17'); 
+ alter table table1 add partition (col567='P18'); 
+ alter table table1 add partition (col567='P19'); 
+ alter table table1 add partition (col567='P20'); 
+ alter table table1 add partition (col567='P21'); 
+ alter table table1 add partition (col567='P22'); 
+ alter table table1 add partition (col567='P23'); 
+ alter table table1 add partition (col567='P24'); 
+ alter table table1 add partition (col567='P25'); 
+ alter table table1 add partition (col567='P26'); 
+ alter table table1 add partition (col567='P27'); 
+ alter table table1 add partition (col567='P28'); 
+ alter table table1 add partition (col567='P29'); 
+ alter table table1 add partition (col567='P30'); 
+ alter table table1 add partition (col567='P31'); 
+alter table table1 partition (col567='P1') update statistics set ('numRows'='160283','rawDataSize'='1191150770'); 
+ alter table table1 partition (col567='P2') update statistics set ('numRows'='46857','rawDataSize'='333427299'); 
+ alter table table1 partition (col567='P3') update statistics set ('numRows'='21628','rawDataSize'='149670319'); 
+ alter table table1 partition (col567='P4') update statistics set ('numRows'='924440','rawDataSize'='6385372507'); 
+ alter table table1 partition (col567='P5') update statistics set ('numRows'='188089','rawDataSize'='1423388499'); 
+ alter table table1 partition (col567='P6') update statistics set ('numRows'='605445','rawDataSize'='4188617257'); 
+ alter table table1 partition (col567='P7') update statistics set ('numRows'='327586','rawDataSize'='2230975824'); 
+ alter table table1 partition (col567='P8') update statistics set ('numRows'='1079473','rawDataSize'='8021737529'); 
+alter table table1 partition (col567='P9') update statistics set ('numRows'='8548736','rawDataSize'='59100718821'); 
+ alter table table1 partition (col567='P10') update statistics set ('numRows'='1842502','rawDataSize'='14504102485'); 
+ alter table table1 partition (col567='P11') update statistics set ('numRows'='316827','rawDataSize'='2409031012'); 
+ alter table table1 partition (col567='P12') update statistics set ('numRows'='2687018','rawDataSize'='19556055666'); 
+ alter table table1 partition (col567='P13') update statistics set ('numRows'='366471','rawDataSize'='3000668900'); 
+ alter table table1 partition (col567='P14') update statistics set ('numRows'='7427078','rawDataSize'='51187870845'); 
+ alter table table1 partition (col567='P15') update statistics set ('numRows'='3064439','rawDataSize'='23684630509'); 
+ alter table table1 partition (col567='P16') update statistics set ('numRows'='2302174','rawDataSize'='16123647091'); 
+ alter table table1 partition (col567='P17') update statistics set ('numRows'='35272071','rawDataSize'='251644717123'); 
+ alter table table1 partition (col567='P18') update statistics set ('numRows'='138996','rawDataSize'='642244515'); 
+ alter table table1 partition (col567='P19') update statistics set ('numRows'='4175562','rawDataSize'='29104904755'); 
+ alter table table1 partition (col567='P20') update statistics set ('numRows'='1980023','rawDataSize'='15682172155'); 
+ alter table table1 partition (col567='P21') update statistics set ('numRows'='10613','rawDataSize'='89905809'); 
+ alter table table1 partition (col567='P22') update statistics set ('numRows'='4610001','rawDataSize'='33417771653'); 
+ alter table table1 partition (col567='P23') update statistics set ('numRows'='8271868','rawDataSize'='58560413484'); 
+ alter table table1 partition (col567='P24') update statistics set ('numRows'='1669199','rawDataSize'='12759258078'); 
+ alter table table1 partition (col567='P25') update statistics set ('numRows'='672876','rawDataSize'='5391184213'); 
+ alter table table1 partition (col567='P26') update statistics set ('numRows'='2714115','rawDataSize'='21510143308'); 
+ alter table table1 partition (col567='P27') update statistics set ('numRows'='812436','rawDataSize'='6424764043'); 
+ alter table table1 partition (col567='P28') update statistics set ('numRows'='2125751','rawDataSize'='15952425816'); 
+ alter table table1 partition (col567='P29') update statistics set ('numRows'='4600990','rawDataSize'='20044992026'); 
+ alter table table1 partition (col567='P30') update statistics set ('numRows'='16065311','rawDataSize'='130078317934'); 
+ alter table table1 partition (col567='P31') update statistics set ('numRows'='20887917','rawDataSize'='155056977744'); 
+ 
+CREATE TABLE `table2_25`(
+ `col79` string, 
+ `col567` string, 
+ `col81` string,
+ `col82` bigint,
+ `col23455` bigint, 
+ `col84` string,
+ `col85` string,
+ `col86` string,
+ `col87` string,
+ `col88` int) ;
+
+CREATE TABLE `table2_28`(
+ `col7890` bigint, 
+ `col56` string,
+ `col57` string,
+ `col58` string,
+ `col59` string,
+ `col60` string,
+ `col61` string,
+ `col62` bigint,
+ `col63` string,
+ `col64` string,
+ `col65` string,
+ `col66` string,
+ `col67` string,
+ `col68` double,
+ `col69` string,
+ `col11` string, 
+ `col70` int)
+ PARTITIONED BY ( 
+ `col567` string) ;
+ 
+CREATE TABLE `table2_23`( 
+ `col1` bigint,
+ `col5679` bigint, 
+ `col2` string,
+ `col7989` string, 
+ `col3` int)
+ PARTITIONED BY ( 
+ `col567` string) ;
+ 
+
+ explain
+SELECT t0.col7989,
+ s0.col11,
+ s0.col11
+FROM table1 t0
+ JOIN table2_23 t1
+ ON (( t0.col567 = t1.col567
+ AND t0.col5679 = t1.col5679
+ AND t0.col567 = 'P30' ))
+ JOIN (SELECT DISTINCT t2.col79 AS col79,
+ t2.col567 AS col567,
+ t3.col23455 AS col23455
+ FROM table2_25 t2
+ JOIN table1 t3
+ ON (( t2.col567 = t3.col567 ))
+ ) s2
+ ON (( t0.col567 = s2.col567
+ AND t0.col23455 = s2.col23455 ))
+ JOIN (SELECT t4.col7890 AS col7890,
+ t4.col11 AS col11,
+ t4.col567 AS col567
+ FROM table2_28 t4
+ ) s0
+ ON (( 'P30' = s0.col567
+ AND t0.col7890 = s0.col7890
+ ));
+
+SELECT t0.col7989,
+ s0.col11,
+ s0.col11
+FROM table1 t0
+ JOIN table2_23 t1
+ ON (( t0.col567 = t1.col567
+ AND t0.col5679 = t1.col5679
+ AND t0.col567 = 'P30' ))
+ JOIN (SELECT DISTINCT t2.col79 AS col79,
+ t2.col567 AS col567,
+ t3.col23455 AS col23455
+ FROM table2_25 t2
+ JOIN table1 t3
+ ON (( t2.col567 = t3.col567 ))
+ ) s2
+ ON (( t0.col567 = s2.col567
+ AND t0.col23455 = s2.col23455 ))
+ JOIN (SELECT t4.col7890 AS col7890,
+ t4.col11 AS col11,
+ t4.col567 AS col567
+ FROM table2_28 t4
+ ) s0
+ ON (( 'P30' = s0.col567
+ AND t0.col7890 = s0.col7890
+ ));
+
+ DROP TABLE table1;
+ DROP TABLE table2_23;
+ DROP TABLE table2_25;
+ DROP TABLE table2_28;
+
+