You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2009/03/18 22:52:48 UTC
svn commit: r755752 - in /hadoop/hive/trunk: ./
ql/src/java/org/apache/hadoop/hive/ql/exec/
ql/src/java/org/apache/hadoop/hive/ql/parse/
ql/src/java/org/apache/hadoop/hive/ql/udf/
ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/ ...
Author: namit
Date: Wed Mar 18 21:52:48 2009
New Revision: 755752
URL: http://svn.apache.org/viewvc?rev=755752&view=rev
Log:
HIVE-253. Fix to disallow computation of rand() at compilation stage.
(Raghotham Murthy via namit
Added:
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java
hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner1.q
hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner2.q
hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner3.q
hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out
hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out
hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDF.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/PartitionPruner.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFRand.java
hadoop/hive/trunk/ql/src/test/templates/TestCliDriver.vm
hadoop/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm
Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=755752&r1=755751&r2=755752&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Mar 18 21:52:48 2009
@@ -52,6 +52,9 @@
HIVE-285. Fix to disallow union of different schemas.
(Raghotham Murthy via namit)
+ HIVE-253. Fix to disallow computation of rand() at compilation stage.
+ (Raghotham Murthy via namit)
+
Release 0.2.0 - Unreleased
INCOMPATIBLE CHANGES
Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDF.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDF.java?rev=755752&r1=755751&r2=755752&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDF.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UDF.java Wed Mar 18 21:52:48 2009
@@ -18,6 +18,8 @@
package org.apache.hadoop.hive.ql.exec;
+import org.apache.hadoop.hive.ql.udf.UDFType;
+
/**
* A User-defined function (UDF) for the use with Hive.
*
@@ -33,6 +35,7 @@
*
* "evaluate" should never be a void method. However it can return "null" if needed.
*/
+@UDFType(deterministic=true)
public class UDF {
/**
Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/PartitionPruner.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/PartitionPruner.java?rev=755752&r1=755751&r2=755752&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/PartitionPruner.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/PartitionPruner.java Wed Mar 18 21:52:48 2009
@@ -35,6 +35,7 @@
import org.apache.hadoop.hive.ql.udf.UDFOPAnd;
import org.apache.hadoop.hive.ql.udf.UDFOPNot;
import org.apache.hadoop.hive.ql.udf.UDFOPOr;
+import org.apache.hadoop.hive.ql.udf.UDFType;
import org.apache.hadoop.hive.serde2.SerDeException;
import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
@@ -164,13 +165,14 @@
// NOTE: In the future all UDFs that treats null value as UNKNOWN (both in parameters and return
// values) should derive from a common base class UDFNullAsUnknown, so instead of listing the classes
// here we would test whether a class is derived from that base class.
- } else {
- // If any child is null, set this node to null
- if (mightBeUnknown(desc)) {
- LOG.trace("Pruner function might be unknown: " + expr.toStringTree());
- desc = new exprNodeConstantDesc(desc.getTypeInfo(), null);
- }
- }
+ } else if ((desc instanceof exprNodeFuncDesc &&
+ ((exprNodeFuncDesc)desc).getUDFClass().getAnnotation(UDFType.class) != null &&
+ ((exprNodeFuncDesc)desc).getUDFClass().getAnnotation(UDFType.class).deterministic() == false) ||
+ mightBeUnknown(desc)) {
+ // If its a non-deterministic UDF or if any child is null, set this node to null
+ LOG.trace("Pruner function might be unknown: " + expr.toStringTree());
+ desc = new exprNodeConstantDesc(desc.getTypeInfo(), null);
+ }
break;
}
}
Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFRand.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFRand.java?rev=755752&r1=755751&r2=755752&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFRand.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFRand.java Wed Mar 18 21:52:48 2009
@@ -22,7 +22,9 @@
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.ql.exec.UDF;
import java.util.Random;
+import org.apache.hadoop.hive.ql.udf.UDFType;
+@UDFType(deterministic=false)
public class UDFRand extends UDF {
private static Log LOG = LogFactory.getLog(UDFRand.class.getName());
Added: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java (added)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFType.java Wed Mar 18 21:52:48 2009
@@ -0,0 +1,11 @@
+package org.apache.hadoop.hive.ql.udf;
+
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface UDFType {
+ boolean deterministic() default true;
+}
Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner1.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner1.q?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner1.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner1.q Wed Mar 18 21:52:48 2009
@@ -0,0 +1,3 @@
+-- scanning un-partitioned data
+explain extended select * from src where rand(1) < 0.1;
+select * from src where rand(1) < 0.1;
Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner2.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner2.q?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner2.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner2.q Wed Mar 18 21:52:48 2009
@@ -0,0 +1,3 @@
+-- scanning partitioned data
+explain extended select a.* from srcpart a where rand(1) < 0.1 and a.ds = '2008-04-08';
+select a.* from srcpart a where rand(1) < 0.1 and a.ds = '2008-04-08';
Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner3.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner3.q?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner3.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/rand_partitionpruner3.q Wed Mar 18 21:52:48 2009
@@ -0,0 +1,7 @@
+-- complex predicates in the where clause
+explain extended select a.* from srcpart a where rand(1) < 0.1 and a.ds = '2008-04-08' and not(key > 50 or key < 10) and a.hr like '%2';
+select a.* from srcpart a where rand(1) < 0.1 and a.ds = '2008-04-08' and not(key > 50 or key < 10) and a.hr like '%2';
+
+-- without rand for comparison
+explain extended select a.* from srcpart a where a.ds = '2008-04-08' and not(key > 50 or key < 10) and a.hr like '%2';
+select a.* from srcpart a where a.ds = '2008-04-08' and not(key > 50 or key < 10) and a.hr like '%2';
Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner1.q.out Wed Mar 18 21:52:48 2009
@@ -0,0 +1,116 @@
+ABSTRACT SYNTAX TREE:
+ (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (< (TOK_FUNCTION rand 1) 0.1))))
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-1
+ Map Reduce
+ Alias -> Map Operator Tree:
+ src
+ Filter Operator
+ predicate:
+ expr: (rand(UDFToLong(1)) < 0.1)
+ type: boolean
+ Select Operator
+ expressions:
+ expr: key
+ type: string
+ expr: value
+ type: string
+ File Output Operator
+ compressed: false
+ GlobalTableId: 0
+ directory: /Users/rmurthy/workspace/hive-latest/ql/../build/ql/tmp/254997074/280412486.10001.insclause-0
+ table:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ columns src.key,src.value
+ serialization.format 1
+ Needs Tagging: false
+ Path -> Alias:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/src
+ Path -> Partition:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/src
+ Partition
+
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ name src
+ columns.types string:string
+ serialization.ddl struct src { string key, string value}
+ serialization.format 1
+ columns key,value
+ bucket_count -1
+ serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ file.inputformat org.apache.hadoop.mapred.TextInputFormat
+ file.outputformat org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ location file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/src
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ name: src
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+
+
+409 val_409
+429 val_429
+209 val_209
+153 val_153
+203 val_203
+170 val_170
+489 val_489
+378 val_378
+221 val_221
+498 val_498
+469 val_469
+176 val_176
+176 val_176
+384 val_384
+217 val_217
+431 val_431
+51 val_51
+288 val_288
+457 val_457
+197 val_197
+77 val_77
+138 val_138
+277 val_277
+224 val_224
+309 val_309
+389 val_389
+331 val_331
+317 val_317
+336 val_336
+42 val_42
+458 val_458
+78 val_78
+453 val_453
+74 val_74
+103 val_103
+467 val_467
+202 val_202
+469 val_469
+44 val_44
+454 val_454
+70 val_70
+491 val_491
+199 val_199
+169 val_169
+310 val_310
+233 val_233
+133 val_133
+26 val_26
+134 val_134
+18 val_18
+298 val_298
+348 val_348
+469 val_469
+37 val_37
+152 val_152
+400 val_400
Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner2.q.out Wed Mar 18 21:52:48 2009
@@ -0,0 +1,203 @@
+ABSTRACT SYNTAX TREE:
+ (TOK_QUERY (TOK_FROM (TOK_TABREF srcpart a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF a))) (TOK_WHERE (and (< (TOK_FUNCTION rand 1) 0.1) (= (TOK_COLREF a ds) '2008-04-08')))))
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-1
+ Map Reduce
+ Alias -> Map Operator Tree:
+ a
+ Filter Operator
+ predicate:
+ expr: ((rand(UDFToLong(1)) < 0.1) and (ds = '2008-04-08'))
+ type: boolean
+ Select Operator
+ expressions:
+ expr: key
+ type: string
+ expr: value
+ type: string
+ expr: ds
+ type: string
+ expr: hr
+ type: string
+ File Output Operator
+ compressed: false
+ GlobalTableId: 0
+ directory: /Users/rmurthy/workspace/hive-latest/ql/../build/ql/tmp/1173098600/505441477.10001.insclause-0
+ table:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ columns a.key,a.value,a.ds,a.hr
+ serialization.format 1
+ Needs Tagging: false
+ Path -> Alias:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=11/ds=2008-04-08
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08
+ Path -> Partition:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=11/ds=2008-04-08
+ Partition
+ partition values:
+ ds 2008-04-08
+ hr 11
+
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ name srcpart
+ columns.types string:string
+ serialization.ddl struct srcpart { string key, string value}
+ serialization.format 1
+ columns key,value
+ partition_columns ds/hr
+ bucket_count -1
+ serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ file.inputformat org.apache.hadoop.mapred.TextInputFormat
+ file.outputformat org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ location file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ name: srcpart
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08
+ Partition
+ partition values:
+ ds 2008-04-08
+ hr 12
+
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ name srcpart
+ columns.types string:string
+ serialization.ddl struct srcpart { string key, string value}
+ serialization.format 1
+ columns key,value
+ partition_columns ds/hr
+ bucket_count -1
+ serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ file.inputformat org.apache.hadoop.mapred.TextInputFormat
+ file.outputformat org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ location file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ name: srcpart
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+
+
+409 val_409 2008-04-08 11
+429 val_429 2008-04-08 11
+209 val_209 2008-04-08 11
+153 val_153 2008-04-08 11
+203 val_203 2008-04-08 11
+170 val_170 2008-04-08 11
+489 val_489 2008-04-08 11
+378 val_378 2008-04-08 11
+221 val_221 2008-04-08 11
+498 val_498 2008-04-08 11
+469 val_469 2008-04-08 11
+176 val_176 2008-04-08 11
+176 val_176 2008-04-08 11
+384 val_384 2008-04-08 11
+217 val_217 2008-04-08 11
+431 val_431 2008-04-08 11
+51 val_51 2008-04-08 11
+288 val_288 2008-04-08 11
+457 val_457 2008-04-08 11
+197 val_197 2008-04-08 11
+77 val_77 2008-04-08 11
+138 val_138 2008-04-08 11
+277 val_277 2008-04-08 11
+224 val_224 2008-04-08 11
+309 val_309 2008-04-08 11
+389 val_389 2008-04-08 11
+331 val_331 2008-04-08 11
+317 val_317 2008-04-08 11
+336 val_336 2008-04-08 11
+42 val_42 2008-04-08 11
+458 val_458 2008-04-08 11
+78 val_78 2008-04-08 11
+453 val_453 2008-04-08 11
+74 val_74 2008-04-08 11
+103 val_103 2008-04-08 11
+467 val_467 2008-04-08 11
+202 val_202 2008-04-08 11
+469 val_469 2008-04-08 11
+44 val_44 2008-04-08 11
+454 val_454 2008-04-08 11
+70 val_70 2008-04-08 11
+491 val_491 2008-04-08 11
+199 val_199 2008-04-08 11
+169 val_169 2008-04-08 11
+310 val_310 2008-04-08 11
+233 val_233 2008-04-08 11
+133 val_133 2008-04-08 11
+26 val_26 2008-04-08 11
+134 val_134 2008-04-08 11
+18 val_18 2008-04-08 11
+298 val_298 2008-04-08 11
+348 val_348 2008-04-08 11
+469 val_469 2008-04-08 11
+37 val_37 2008-04-08 11
+152 val_152 2008-04-08 11
+400 val_400 2008-04-08 11
+409 val_409 2008-04-08 12
+429 val_429 2008-04-08 12
+209 val_209 2008-04-08 12
+153 val_153 2008-04-08 12
+203 val_203 2008-04-08 12
+170 val_170 2008-04-08 12
+489 val_489 2008-04-08 12
+378 val_378 2008-04-08 12
+221 val_221 2008-04-08 12
+498 val_498 2008-04-08 12
+469 val_469 2008-04-08 12
+176 val_176 2008-04-08 12
+176 val_176 2008-04-08 12
+384 val_384 2008-04-08 12
+217 val_217 2008-04-08 12
+431 val_431 2008-04-08 12
+51 val_51 2008-04-08 12
+288 val_288 2008-04-08 12
+457 val_457 2008-04-08 12
+197 val_197 2008-04-08 12
+77 val_77 2008-04-08 12
+138 val_138 2008-04-08 12
+277 val_277 2008-04-08 12
+224 val_224 2008-04-08 12
+309 val_309 2008-04-08 12
+389 val_389 2008-04-08 12
+331 val_331 2008-04-08 12
+317 val_317 2008-04-08 12
+336 val_336 2008-04-08 12
+42 val_42 2008-04-08 12
+458 val_458 2008-04-08 12
+78 val_78 2008-04-08 12
+453 val_453 2008-04-08 12
+74 val_74 2008-04-08 12
+103 val_103 2008-04-08 12
+467 val_467 2008-04-08 12
+202 val_202 2008-04-08 12
+469 val_469 2008-04-08 12
+44 val_44 2008-04-08 12
+454 val_454 2008-04-08 12
+70 val_70 2008-04-08 12
+491 val_491 2008-04-08 12
+199 val_199 2008-04-08 12
+169 val_169 2008-04-08 12
+310 val_310 2008-04-08 12
+233 val_233 2008-04-08 12
+133 val_133 2008-04-08 12
+26 val_26 2008-04-08 12
+134 val_134 2008-04-08 12
+18 val_18 2008-04-08 12
+298 val_298 2008-04-08 12
+348 val_348 2008-04-08 12
+469 val_469 2008-04-08 12
+37 val_37 2008-04-08 12
+152 val_152 2008-04-08 12
+400 val_400 2008-04-08 12
Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out?rev=755752&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out (added)
+++ hadoop/hive/trunk/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out Wed Mar 18 21:52:48 2009
@@ -0,0 +1,172 @@
+ABSTRACT SYNTAX TREE:
+ (TOK_QUERY (TOK_FROM (TOK_TABREF srcpart a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF a))) (TOK_WHERE (and (and (and (< (TOK_FUNCTION rand 1) 0.1) (= (TOK_COLREF a ds) '2008-04-08')) (not (or (> (TOK_COLREF key) 50) (< (TOK_COLREF key) 10)))) (like (TOK_COLREF a hr) '%2')))))
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-1
+ Map Reduce
+ Alias -> Map Operator Tree:
+ a
+ Filter Operator
+ predicate:
+ expr: ((((rand(UDFToLong(1)) < 0.1) and (ds = '2008-04-08')) and not ((UDFToDouble(key) > UDFToDouble(50)) or (UDFToDouble(key) < UDFToDouble(10)))) and (hr like '%2'))
+ type: boolean
+ Select Operator
+ expressions:
+ expr: key
+ type: string
+ expr: value
+ type: string
+ expr: ds
+ type: string
+ expr: hr
+ type: string
+ File Output Operator
+ compressed: false
+ GlobalTableId: 0
+ directory: /Users/rmurthy/workspace/hive-latest/ql/../build/ql/tmp/799628213/115876330.10001.insclause-0
+ table:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ columns a.key,a.value,a.ds,a.hr
+ serialization.format 1
+ Needs Tagging: false
+ Path -> Alias:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08
+ Path -> Partition:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08
+ Partition
+ partition values:
+ ds 2008-04-08
+ hr 12
+
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ name srcpart
+ columns.types string:string
+ serialization.ddl struct srcpart { string key, string value}
+ serialization.format 1
+ columns key,value
+ partition_columns ds/hr
+ bucket_count -1
+ serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ file.inputformat org.apache.hadoop.mapred.TextInputFormat
+ file.outputformat org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ location file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ name: srcpart
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+
+
+42 val_42 2008-04-08 12
+44 val_44 2008-04-08 12
+26 val_26 2008-04-08 12
+18 val_18 2008-04-08 12
+37 val_37 2008-04-08 12
+ABSTRACT SYNTAX TREE:
+ (TOK_QUERY (TOK_FROM (TOK_TABREF srcpart a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF a))) (TOK_WHERE (and (and (= (TOK_COLREF a ds) '2008-04-08') (not (or (> (TOK_COLREF key) 50) (< (TOK_COLREF key) 10)))) (like (TOK_COLREF a hr) '%2')))))
+
+STAGE DEPENDENCIES:
+ Stage-1 is a root stage
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-1
+ Map Reduce
+ Alias -> Map Operator Tree:
+ a
+ Filter Operator
+ predicate:
+ expr: (((ds = '2008-04-08') and not ((UDFToDouble(key) > UDFToDouble(50)) or (UDFToDouble(key) < UDFToDouble(10)))) and (hr like '%2'))
+ type: boolean
+ Select Operator
+ expressions:
+ expr: key
+ type: string
+ expr: value
+ type: string
+ expr: ds
+ type: string
+ expr: hr
+ type: string
+ File Output Operator
+ compressed: false
+ GlobalTableId: 0
+ directory: /Users/rmurthy/workspace/hive-latest/ql/../build/ql/tmp/189451537/14108352.10001.insclause-0
+ table:
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ columns a.key,a.value,a.ds,a.hr
+ serialization.format 1
+ Needs Tagging: false
+ Path -> Alias:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08
+ Path -> Partition:
+ file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart/hr=12/ds=2008-04-08
+ Partition
+ partition values:
+ ds 2008-04-08
+ hr 12
+
+ input format: org.apache.hadoop.mapred.TextInputFormat
+ output format: org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ properties:
+ name srcpart
+ columns.types string:string
+ serialization.ddl struct srcpart { string key, string value}
+ serialization.format 1
+ columns key,value
+ partition_columns ds/hr
+ bucket_count -1
+ serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ file.inputformat org.apache.hadoop.mapred.TextInputFormat
+ file.outputformat org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat
+ location file:/Users/rmurthy/workspace/hive-latest/build/ql/test/data/warehouse/srcpart
+ serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ name: srcpart
+
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+
+
+27 val_27 2008-04-08 12
+37 val_37 2008-04-08 12
+15 val_15 2008-04-08 12
+17 val_17 2008-04-08 12
+20 val_20 2008-04-08 12
+47 val_47 2008-04-08 12
+35 val_35 2008-04-08 12
+12 val_12 2008-04-08 12
+24 val_24 2008-04-08 12
+42 val_42 2008-04-08 12
+26 val_26 2008-04-08 12
+43 val_43 2008-04-08 12
+15 val_15 2008-04-08 12
+19 val_19 2008-04-08 12
+10 val_10 2008-04-08 12
+35 val_35 2008-04-08 12
+11 val_11 2008-04-08 12
+34 val_34 2008-04-08 12
+42 val_42 2008-04-08 12
+41 val_41 2008-04-08 12
+30 val_30 2008-04-08 12
+33 val_33 2008-04-08 12
+35 val_35 2008-04-08 12
+44 val_44 2008-04-08 12
+12 val_12 2008-04-08 12
+24 val_24 2008-04-08 12
+26 val_26 2008-04-08 12
+18 val_18 2008-04-08 12
+18 val_18 2008-04-08 12
+28 val_28 2008-04-08 12
+37 val_37 2008-04-08 12
Modified: hadoop/hive/trunk/ql/src/test/templates/TestCliDriver.vm
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/templates/TestCliDriver.vm?rev=755752&r1=755751&r2=755752&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/templates/TestCliDriver.vm (original)
+++ hadoop/hive/trunk/ql/src/test/templates/TestCliDriver.vm Wed Mar 18 21:52:48 2009
@@ -85,7 +85,7 @@
ecode = qt.checkCliDriverResults("$fname");
if (ecode != 0) {
- fail("Client execution results dailed with error code = " + ecode);
+ fail("Client execution results failed with error code = " + ecode);
}
}
catch (Throwable e) {
Modified: hadoop/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm?rev=755752&r1=755751&r2=755752&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm (original)
+++ hadoop/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm Wed Mar 18 21:52:48 2009
@@ -64,7 +64,7 @@
ecode = qt.checkCliDriverResults("$fname");
if (ecode != 0) {
- fail("Client execution results dailed with error code = " + ecode);
+ fail("Client execution results failed with error code = " + ecode);
}
}
catch (Throwable e) {