You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2014/09/02 21:57:07 UTC
svn commit: r1622108 [18/27] - in /hive/branches/tez: ./
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/
beeline/src/java/org/apache/hive/beeline/
beeline/src/test/org/apache/hive/beeline/ bin/ bin/ext/ checkstyle/
common/src/java/...
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseTrim.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseTrim.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseTrim.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseTrim.java Tue Sep 2 19:56:56 2014
@@ -40,14 +40,14 @@ public abstract class GenericUDFBaseTrim
public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {
if (arguments.length != 1) {
throw new UDFArgumentException(udfName + " requires one value argument. Found :"
- + arguments.length);
+ + arguments.length);
}
PrimitiveObjectInspector argumentOI;
if(arguments[0] instanceof PrimitiveObjectInspector) {
argumentOI = (PrimitiveObjectInspector) arguments[0];
} else {
throw new UDFArgumentException(udfName + " takes only primitive types. found "
- + arguments[0].getTypeName());
+ + arguments[0].getTypeName());
}
switch (argumentOI.getPrimitiveCategory()) {
case STRING:
@@ -56,7 +56,7 @@ public abstract class GenericUDFBaseTrim
break;
default:
throw new UDFArgumentException(udfName + " takes only STRING/CHAR/VARCHAR types. Found "
- + argumentOI.getPrimitiveCategory());
+ + argumentOI.getPrimitiveCategory());
}
converter = new TextConverter(argumentOI);
return PrimitiveObjectInspectorFactory.writableStringObjectInspector;
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java Tue Sep 2 19:56:56 2014
@@ -51,7 +51,7 @@ public class GenericUDFBetween extends G
@Override
public Object evaluate(DeferredObject[] arguments) throws HiveException {
boolean invert = (Boolean) ((PrimitiveObjectInspector) argumentOIs[0])
- .getPrimitiveJavaObject(arguments[0].get());
+ .getPrimitiveJavaObject(arguments[0].get());
BooleanWritable left = ((BooleanWritable)egt.evaluate(new DeferredObject[] {arguments[1], arguments[2]}));
if (left == null) {
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCase.java Tue Sep 2 19:56:56 2014
@@ -18,6 +18,7 @@
package org.apache.hadoop.hive.ql.udf.generic;
+import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
@@ -31,6 +32,23 @@ import org.apache.hadoop.hive.serde2.obj
* thrown. 2. c and f should be compatible types, or an exception will be
* thrown.
*/
+@Description(
+ name = "case",
+ value = "CASE a WHEN b THEN c [WHEN d THEN e]* [ELSE f] END - "
+ + "When a = b, returns c; when a = d, return e; else return f",
+ extended = "Example:\n "
+ + "SELECT\n"
+ + " CASE deptno\n"
+ + " WHEN 1 THEN Engineering\n"
+ + " WHEN 2 THEN Finance\n"
+ + " ELSE admin\n"
+ + " END,\n"
+ + " CASE zone\n"
+ + " WHEN 7 THEN Americas\n"
+ + " ELSE Asia-Pac\n"
+ + " END\n"
+ + " FROM emp_details")
+
public class GenericUDFCase extends GenericUDF {
private transient ObjectInspector[] argumentOIs;
private transient GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java Tue Sep 2 19:56:56 2014
@@ -68,7 +68,7 @@ public class GenericUDFDateDiff extends
private transient PrimitiveCategory inputType1;
private transient PrimitiveCategory inputType2;
private IntWritable result = new IntWritable();
-
+
public GenericUDFDateDiff() {
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
}
@@ -89,8 +89,8 @@ public class GenericUDFDateDiff extends
@Override
public IntWritable evaluate(DeferredObject[] arguments) throws HiveException {
- output = evaluate(convertToDate(inputType1, inputConverter1, arguments[0]),
- convertToDate(inputType2, inputConverter2, arguments[1]));
+ output = evaluate(convertToDate(inputType1, inputConverter1, arguments[0]),
+ convertToDate(inputType2, inputConverter2, arguments[1]));
return output;
}
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDecode.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDecode.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDecode.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDecode.java Tue Sep 2 19:56:56 2014
@@ -44,8 +44,8 @@ import org.apache.hadoop.io.Text;
@Description(name = "decode",
value = "_FUNC_(bin, str) - Decode the first argument using the second argument character set",
extended = "Possible options for the character set are 'US_ASCII', 'ISO-8859-1',\n" +
- "'UTF-8', 'UTF-16BE', 'UTF-16LE', and 'UTF-16'. If either argument\n" +
- "is null, the result will also be null")
+ "'UTF-8', 'UTF-16BE', 'UTF-16LE', and 'UTF-16'. If either argument\n" +
+ "is null, the result will also be null")
public class GenericUDFDecode extends GenericUDF {
private transient CharsetDecoder decoder = null;
private transient BinaryObjectInspector bytesOI = null;
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLag.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLag.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLag.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLag.java Tue Sep 2 19:56:56 2014
@@ -18,8 +18,17 @@
package org.apache.hadoop.hive.ql.udf.generic;
+import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.udf.UDFType;
+@Description(
+ name = "lag",
+ value = "LAG (scalar_expression [,offset] [,default]) OVER ([query_partition_clause] order_by_clause); "
+ + "The LAG function is used to access data from a previous row.",
+ extended = "Example:\n "
+ + "select p1.p_mfgr, p1.p_name, p1.p_size,\n"
+ + " p1.p_size - lag(p1.p_size,1,p1.p_size) over( distribute by p1.p_mfgr sort by p1.p_name) as deltaSz\n"
+ + " from part p1 join part p2 on p1.p_partkey = p2.p_partkey")
@UDFType(impliesOrder = true)
public class GenericUDFLag extends GenericUDFLeadLag {
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLead.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLead.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLead.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLead.java Tue Sep 2 19:56:56 2014
@@ -18,8 +18,19 @@
package org.apache.hadoop.hive.ql.udf.generic;
+import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.udf.UDFType;
+@Description(
+ name = "lead",
+ value = "LEAD (scalar_expression [,offset] [,default]) OVER ([query_partition_clause] order_by_clause); "
+ + "The LEAD function is used to return data from the next row. ",
+ extended = "Example:\n "
+ + "select p_name, p_retailprice, lead(p_retailprice) over() as l1,\n"
+ + " lag(p_retailprice) over() as l2\n"
+ + " from part\n"
+ + " where p_retailprice = 1173.15")
+
@UDFType(impliesOrder = true)
public class GenericUDFLead extends GenericUDFLeadLag {
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLpad.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLpad.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLpad.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLpad.java Tue Sep 2 19:56:56 2014
@@ -46,7 +46,7 @@ public class GenericUDFLpad extends Gene
// Copy the padding
for (int i = 0; i < pos; i += pad.getLength()) {
for (int j = 0; j < pad.getLength() && j < pos - i; j++) {
- data[i + j] = padTxt[j];
+ data[i + j] = padTxt[j];
}
}
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRpad.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRpad.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRpad.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRpad.java Tue Sep 2 19:56:56 2014
@@ -48,7 +48,7 @@ public class GenericUDFRpad extends Gene
// Copy the padding
while (pos < len) {
for (int i = 0; i < pad.getLength() && i < len - pos; i++) {
- data[pos + i] = padTxt[i];
+ data[pos + i] = padTxt[i];
}
pos += pad.getLength();
}
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToBinary.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToBinary.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToBinary.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToBinary.java Tue Sep 2 19:56:56 2014
@@ -59,7 +59,7 @@ public class GenericUDFToBinary extends
|| (argumentOI instanceof StringObjectInspector)
|| (argumentOI instanceof VoidObjectInspector))){
throw new UDFArgumentException("Only string, char, varchar or binary data can be cast into binary " +
- "data types.");
+ "data types.");
}
baConverter = new BinaryConverter(argumentOI,
PrimitiveObjectInspectorFactory.writableBinaryObjectInspector);
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFWhen.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFWhen.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFWhen.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFWhen.java Tue Sep 2 19:56:56 2014
@@ -18,6 +18,7 @@
package org.apache.hadoop.hive.ql.udf.generic;
+import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.serde.serdeConstants;
@@ -31,6 +32,23 @@ import org.apache.hadoop.hive.serde2.obj
* NOTES: 1. a and c should be boolean, or an exception will be thrown. 2. b, d
* and f should be common types, or an exception will be thrown.
*/
+@Description(
+ name = "when",
+ value = "CASE WHEN a THEN b [WHEN c THEN d]* [ELSE e] END - "
+ + "When a = true, returns b; when c = true, return d; else return e",
+ extended = "Example:\n "
+ + "SELECT\n"
+ + " CASE\n"
+ + " WHEN deptno=1 THEN Engineering\n"
+ + " WHEN deptno=2 THEN Finance\n"
+ + " ELSE admin\n"
+ + " END,\n"
+ + " CASE\n"
+ + " WHEN zone=7 THEN Americas\n"
+ + " ELSE Asia-Pac\n"
+ + " END\n"
+ + " FROM emp_details")
+
public class GenericUDFWhen extends GenericUDF {
private transient ObjectInspector[] argumentOIs;
private transient GenericUDFUtils.ReturnObjectInspectorResolver returnOIResolver;
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFJSONTuple.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFJSONTuple.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFJSONTuple.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFJSONTuple.java Tue Sep 2 19:56:56 2014
@@ -47,7 +47,7 @@ import org.codehaus.jackson.type.JavaTyp
*/
@Description(name = "json_tuple",
value = "_FUNC_(jsonStr, p1, p2, ..., pn) - like get_json_object, but it takes multiple names and return a tuple. " +
- "All the input parameters and output column types are string.")
+ "All the input parameters and output column types are string.")
public class GenericUDTFJSONTuple extends GenericUDTF {
@@ -106,7 +106,7 @@ public class GenericUDTFJSONTuple extend
if (numCols < 1) {
throw new UDFArgumentException("json_tuple() takes at least two arguments: " +
- "the json string and a path expression");
+ "the json string and a path expression");
}
for (int i = 0; i < args.length; ++i) {
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFParseUrlTuple.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFParseUrlTuple.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFParseUrlTuple.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFParseUrlTuple.java Tue Sep 2 19:56:56 2014
@@ -86,7 +86,7 @@ public class GenericUDTFParseUrlTuple ex
if (numCols < 1) {
throw new UDFArgumentException("parse_url_tuple() takes at least two arguments: " +
- "the url string and a part name");
+ "the url string and a part name");
}
for (int i = 0; i < args.length; ++i) {
Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java Tue Sep 2 19:56:56 2014
@@ -225,7 +225,7 @@ public class MatchPath extends TableFunc
if ( symbolArgsSz % 2 != 0)
{
throwErrorWithSignature("Symbol Name, Expression need to be specified in pairs: " +
- "there are odd number of symbol args");
+ "there are odd number of symbol args");
}
evaluator.symInfo = new SymbolsInfo(symbolArgsSz/2);
@@ -253,7 +253,7 @@ public class MatchPath extends TableFunc
PrimitiveObjectInspector.PrimitiveCategory.BOOLEAN )
{
throwErrorWithSignature(String.format("Currently a Symbol Expression(%s) " +
- "must be a boolean expression", symolExprArg.getExpressionTreeString()));
+ "must be a boolean expression", symolExprArg.getExpressionTreeString()));
}
evaluator.symInfo.add(symbolName, symolExprArg);
}
Modified: hive/branches/tez/ql/src/protobuf/org/apache/hadoop/hive/ql/io/orc/orc_proto.proto
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/protobuf/org/apache/hadoop/hive/ql/io/orc/orc_proto.proto?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/protobuf/org/apache/hadoop/hive/ql/io/orc/orc_proto.proto (original)
+++ hive/branches/tez/ql/src/protobuf/org/apache/hadoop/hive/ql/io/orc/orc_proto.proto Tue Sep 2 19:56:56 2014
@@ -53,6 +53,12 @@ message DateStatistics {
optional sint32 maximum = 2;
}
+message TimestampStatistics {
+ // min,max values saved as milliseconds since epoch
+ optional sint64 minimum = 1;
+ optional sint64 maximum = 2;
+}
+
message BinaryStatistics {
// sum will store the total binary blob length in a stripe
optional sint64 sum = 1;
@@ -67,6 +73,7 @@ message ColumnStatistics {
optional DecimalStatistics decimalStatistics = 6;
optional DateStatistics dateStatistics = 7;
optional BinaryStatistics binaryStatistics = 8;
+ optional TimestampStatistics timestampStatistics = 9;
}
message RowIndexEntry {
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/exec/TestUtilities.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/exec/TestUtilities.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/exec/TestUtilities.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/exec/TestUtilities.java Tue Sep 2 19:56:56 2014
@@ -118,14 +118,13 @@ public class TestUtilities extends TestC
}
private void checkFSUMaskReset(boolean recursiveArg) throws IllegalArgumentException, IOException {
- final String FS_MASK_PARAM = "fs.permissions.umask-mode";
final String FS_MASK_VAL = "055";
HiveConf conf = new HiveConf();
String dir = System.getProperty("test.tmp.dir") + "/testUtilitiesUMaskReset";
- conf.set(FS_MASK_PARAM, FS_MASK_VAL);
+ conf.set(FsPermission.UMASK_LABEL, FS_MASK_VAL);
Utilities.createDirsWithPermission(conf, new Path(dir), new FsPermission((short) 00777),
recursiveArg);
- assertEquals(conf.get(FS_MASK_PARAM), FS_MASK_VAL);
+ assertEquals(conf.get(FsPermission.UMASK_LABEL), FS_MASK_VAL);
}
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java Tue Sep 2 19:56:56 2014
@@ -92,7 +92,7 @@ public class TestFileDump {
}
conf.set(HiveConf.ConfVars.HIVE_ORC_ENCODING_STRATEGY.varname, "COMPRESSION");
Writer writer = OrcFile.createWriter(fs, testFilePath, conf, inspector,
- 100000, CompressionKind.ZLIB, 10000, 10000);
+ 100000, CompressionKind.ZLIB, 10000, 1000);
Random r1 = new Random(1);
String[] words = new String[]{"It", "was", "the", "best", "of", "times,",
"it", "was", "the", "worst", "of", "times,", "it", "was", "the", "age",
@@ -116,7 +116,7 @@ public class TestFileDump {
// replace stdout and run command
System.setOut(new PrintStream(myOut));
- FileDump.main(new String[]{testFilePath.toString()});
+ FileDump.main(new String[]{testFilePath.toString(), "--rowindex=1,2,3"});
System.out.flush();
System.setOut(origOut);
@@ -138,7 +138,7 @@ public class TestFileDump {
conf.set(HiveConf.ConfVars.HIVE_ORC_ENCODING_STRATEGY.varname, "COMPRESSION");
conf.setFloat(HiveConf.ConfVars.HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD.varname, 0.49f);
Writer writer = OrcFile.createWriter(fs, testFilePath, conf, inspector,
- 100000, CompressionKind.ZLIB, 10000, 10000);
+ 100000, CompressionKind.ZLIB, 10000, 1000);
Random r1 = new Random(1);
String[] words = new String[]{"It", "was", "the", "best", "of", "times,",
"it", "was", "the", "worst", "of", "times,", "it", "was", "the", "age",
@@ -171,7 +171,7 @@ public class TestFileDump {
// replace stdout and run command
System.setOut(new PrintStream(myOut));
- FileDump.main(new String[]{testFilePath.toString()});
+ FileDump.main(new String[]{testFilePath.toString(), "--rowindex=1,2,3"});
System.out.flush();
System.setOut(origOut);
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcRecordUpdater.java Tue Sep 2 19:56:56 2014
@@ -24,6 +24,7 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.ql.io.AcidOutputFormat;
import org.apache.hadoop.hive.ql.io.AcidUtils;
import org.apache.hadoop.hive.ql.io.RecordUpdater;
+import org.apache.hadoop.hive.serde2.SerDeStats;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
import org.apache.hadoop.io.IntWritable;
@@ -95,6 +96,10 @@ public class TestOrcRecordUpdater {
updater.insert(12, new MyRow("fourth"));
updater.insert(12, new MyRow("fifth"));
updater.flush();
+
+ // Check the stats
+ assertEquals(5L, updater.getStats().getRowCount());
+
Path bucketPath = AcidUtils.createFilename(root, options);
Path sidePath = OrcRecordUpdater.getSideFile(bucketPath);
DataInputStream side = fs.open(sidePath);
@@ -158,6 +163,8 @@ public class TestOrcRecordUpdater {
reader = OrcFile.createReader(bucketPath,
new OrcFile.ReaderOptions(conf).filesystem(fs));
assertEquals(6, reader.getNumberOfRows());
+ assertEquals(6L, updater.getStats().getRowCount());
+
assertEquals(false, fs.exists(sidePath));
}
@@ -182,6 +189,7 @@ public class TestOrcRecordUpdater {
RecordUpdater updater = new OrcRecordUpdater(root, options);
updater.update(100, 10, 30, new MyRow("update"));
updater.delete(100, 40, 60);
+ assertEquals(-1L, updater.getStats().getRowCount());
updater.close(false);
Path bucketPath = AcidUtils.createFilename(root, options);
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/parquet/TestHiveSchemaConverter.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/parquet/TestHiveSchemaConverter.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/parquet/TestHiveSchemaConverter.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/io/parquet/TestHiveSchemaConverter.java Tue Sep 2 19:56:56 2014
@@ -88,6 +88,26 @@ public class TestHiveSchemaConverter {
}
@Test
+ public void testCharType() throws Exception {
+ testConversion(
+ "a",
+ "char(5)",
+ "message hive_schema {\n"
+ + " optional binary a (UTF8);\n"
+ + "}\n");
+ }
+
+ @Test
+ public void testVarcharType() throws Exception {
+ testConversion(
+ "a",
+ "varchar(10)",
+ "message hive_schema {\n"
+ + " optional binary a (UTF8);\n"
+ + "}\n");
+ }
+
+ @Test
public void testArray() throws Exception {
testConversion("arrayCol",
"array<int>",
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager.java Tue Sep 2 19:56:56 2014
@@ -21,12 +21,12 @@ import junit.framework.Assert;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
-import org.apache.hadoop.hive.metastore.txn.TxnDbUtil;
+import org.apache.hadoop.hive.metastore.api.ShowLocksResponse;import org.apache.hadoop.hive.metastore.api.ShowLocksResponseElement;import org.apache.hadoop.hive.metastore.txn.TxnDbUtil;
import org.apache.hadoop.hive.ql.Context;
import org.apache.hadoop.hive.ql.QueryPlan;
import org.apache.hadoop.hive.ql.hooks.ReadEntity;
import org.apache.hadoop.hive.ql.hooks.WriteEntity;
-import org.apache.hadoop.hive.ql.metadata.Partition;
+import org.apache.hadoop.hive.ql.metadata.DummyPartition;import org.apache.hadoop.hive.ql.metadata.Partition;
import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.log4j.Level;
@@ -137,6 +137,43 @@ public class TestDbTxnManager {
Assert.assertEquals(0, locks.size());
}
+
+ @Test
+ public void testSingleWritePartition() throws Exception {
+ WriteEntity we = addPartitionOutput(newTable(true), WriteEntity.WriteType.INSERT);
+ QueryPlan qp = new MockQueryPlan(this);
+ txnMgr.openTxn("fred");
+ txnMgr.acquireLocks(qp, ctx, "fred");
+ List<HiveLock> locks = ctx.getHiveLocks();
+ Assert.assertEquals(1, locks.size());
+ Assert.assertEquals(1,
+ TxnDbUtil.countLockComponents(((DbLockManager.DbHiveLock) locks.get(0)).lockId));
+ txnMgr.commitTxn();
+ locks = txnMgr.getLockManager().getLocks(false, false);
+ Assert.assertEquals(0, locks.size());
+ }
+
+ @Test
+ public void testWriteDynamicPartition() throws Exception {
+ WriteEntity we = addDynamicPartitionedOutput(newTable(true), WriteEntity.WriteType.INSERT);
+ QueryPlan qp = new MockQueryPlan(this);
+ txnMgr.openTxn("fred");
+ txnMgr.acquireLocks(qp, ctx, "fred");
+ List<HiveLock> locks = ctx.getHiveLocks();
+ Assert.assertEquals(1, locks.size());
+ /*Assert.assertEquals(1,
+ TxnDbUtil.countLockComponents(((DbLockManager.DbHiveLock) locks.get(0)).lockId));
+ */// Make sure we're locking the whole table, since this is dynamic partitioning
+ ShowLocksResponse rsp = ((DbLockManager)txnMgr.getLockManager()).getLocks();
+ List<ShowLocksResponseElement> elms = rsp.getLocks();
+ Assert.assertEquals(1, elms.size());
+ Assert.assertNotNull(elms.get(0).getTablename());
+ Assert.assertNull(elms.get(0).getPartname());
+ txnMgr.commitTxn();
+ locks = txnMgr.getLockManager().getLocks(false, false);
+ Assert.assertEquals(0, locks.size());
+ }
+
@Test
public void testReadWrite() throws Exception {
Table t = newTable(true);
@@ -252,6 +289,7 @@ public class TestDbTxnManager {
@After
public void tearDown() throws Exception {
+ if (txnMgr != null) txnMgr.closeTxnManager();
TxnDbUtil.cleanDb();
}
@@ -318,4 +356,12 @@ public class TestDbTxnManager {
writeEntities.add(we);
return we;
}
+
+ private WriteEntity addDynamicPartitionedOutput(Table t, WriteEntity.WriteType writeType)
+ throws Exception {
+ DummyPartition dp = new DummyPartition(t, "no clue what I should call this");
+ WriteEntity we = new WriteEntity(dp, writeType, false);
+ writeEntities.add(we);
+ return we;
+ }
}
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBCompact.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBCompact.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBCompact.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/parse/TestQBCompact.java Tue Sep 2 19:56:56 2014
@@ -65,7 +65,6 @@ public class TestQBCompact {
private AlterTableSimpleDesc parseAndAnalyze(String query) throws Exception {
ParseDriver hd = new ParseDriver();
ASTNode head = (ASTNode)hd.parse(query).getChild(0);
- System.out.println("HERE " + head.dump());
BaseSemanticAnalyzer a = SemanticAnalyzerFactory.get(conf, head);
a.analyze(head, new Context(conf));
List<Task<? extends Serializable>> roots = a.getRootTasks();
Modified: hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java (original)
+++ hive/branches/tez/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java Tue Sep 2 19:56:56 2014
@@ -30,6 +30,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.TimeUnit;
/**
* Tests for the compactor Initiator thread.
@@ -89,7 +90,7 @@ public class TestInitiator extends Compa
txnHandler.findNextToCompact("nosuchhost-193892");
HiveConf conf = new HiveConf();
- HiveConf.setLongVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_WORKER_TIMEOUT, 1L);
+ conf.setTimeVar(HiveConf.ConfVars.HIVE_COMPACTOR_WORKER_TIMEOUT, 1L, TimeUnit.MILLISECONDS);
startInitiator(conf);
Modified: hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_create.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_create.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_create.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_create.q Tue Sep 2 19:56:56 2014
@@ -1 +1 @@
-create role PUBLIC;
+create role public;
Modified: hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_drop.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_drop.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_drop.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientnegative/authorization_public_drop.q Tue Sep 2 19:56:56 2014
@@ -1 +1 @@
-drop role PUBLIC;
+drop role public;
Modified: hive/branches/tez/ql/src/test/queries/clientnegative/authorize_grant_public.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientnegative/authorize_grant_public.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientnegative/authorize_grant_public.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientnegative/authorize_grant_public.q Tue Sep 2 19:56:56 2014
@@ -1 +1 @@
-grant role PUBLIC to user hive_test_user;
+grant role public to user hive_test_user;
Modified: hive/branches/tez/ql/src/test/queries/clientnegative/authorize_revoke_public.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientnegative/authorize_revoke_public.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientnegative/authorize_revoke_public.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientnegative/authorize_revoke_public.q Tue Sep 2 19:56:56 2014
@@ -1 +1 @@
-revoke role PUBLIC from user hive_test_user;
+revoke role public from user hive_test_user;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/add_part_exist.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/add_part_exist.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/add_part_exist.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/add_part_exist.q Tue Sep 2 19:56:56 2014
@@ -18,20 +18,21 @@ SHOW TABLES;
-- Test ALTER TABLE ADD PARTITION in non-default Database
CREATE DATABASE add_part_test_db;
-USE add_part_test_db;
-SHOW TABLES;
-CREATE TABLE add_part_test (key STRING, value STRING) PARTITIONED BY (ds STRING);
-SHOW PARTITIONS add_part_test;
+CREATE TABLE add_part_test_db.add_part_test (key STRING, value STRING) PARTITIONED BY (ds STRING);
+SHOW PARTITIONS add_part_test_db.add_part_test;
-ALTER TABLE add_part_test ADD PARTITION (ds='2010-01-01');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_db.add_part_test ADD PARTITION (ds='2010-01-01');
+SHOW PARTITIONS add_part_test_db.add_part_test;
-ALTER TABLE add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-01');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_db.add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-01');
+SHOW PARTITIONS add_part_test_db.add_part_test;
-ALTER TABLE add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-02');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_db.add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-02');
+SHOW PARTITIONS add_part_test_db.add_part_test;
-ALTER TABLE add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-01') PARTITION (ds='2010-01-02') PARTITION (ds='2010-01-03');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_db.add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-01') PARTITION (ds='2010-01-02') PARTITION (ds='2010-01-03');
+SHOW PARTITIONS add_part_test_db.add_part_test;
+
+DROP TABLE add_part_test_db.add_part_test;
+DROP DATABASE add_part_test_db;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter1.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter1.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter1.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter1.q Tue Sep 2 19:56:56 2014
@@ -32,40 +32,38 @@ SHOW TABLES;
-- With non-default Database
CREATE DATABASE alter1_db;
-USE alter1_db;
-SHOW TABLES;
+SHOW TABLES alter1_db;
-CREATE TABLE alter1(a INT, b INT);
-DESCRIBE EXTENDED alter1;
+CREATE TABLE alter1_db.alter1(a INT, b INT);
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET TBLPROPERTIES ('a'='1', 'c'='3');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET TBLPROPERTIES ('a'='1', 'c'='3');
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET TBLPROPERTIES ('a'='1', 'c'='4', 'd'='3');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET TBLPROPERTIES ('a'='1', 'c'='4', 'd'='3');
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET TBLPROPERTIES ('EXTERNAL'='TRUE');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET TBLPROPERTIES ('EXTERNAL'='TRUE');
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET TBLPROPERTIES ('EXTERNAL'='FALSE');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET TBLPROPERTIES ('EXTERNAL'='FALSE');
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET SERDEPROPERTIES('s1'='9');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET SERDEPROPERTIES('s1'='9');
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET SERDEPROPERTIES('s1'='10', 's2' ='20');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET SERDEPROPERTIES('s1'='10', 's2' ='20');
+DESCRIBE EXTENDED alter1_db.alter1;
add jar ${system:maven.local.repository}/org/apache/hive/hive-it-test-serde/${system:hive.version}/hive-it-test-serde-${system:hive.version}.jar;
-ALTER TABLE alter1 SET SERDE 'org.apache.hadoop.hive.serde2.TestSerDe' WITH SERDEPROPERTIES ('s1'='9');
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET SERDE 'org.apache.hadoop.hive.serde2.TestSerDe' WITH SERDEPROPERTIES ('s1'='9');
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 SET SERDE 'org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe';
-DESCRIBE EXTENDED alter1;
+ALTER TABLE alter1_db.alter1 SET SERDE 'org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe';
+DESCRIBE EXTENDED alter1_db.alter1;
-ALTER TABLE alter1 REPLACE COLUMNS (a int, b int, c string);
-DESCRIBE alter1;
+ALTER TABLE alter1_db.alter1 REPLACE COLUMNS (a int, b int, c string);
+DESCRIBE alter1_db.alter1;
-DROP TABLE alter1;
-USE default;
+DROP TABLE alter1_db.alter1;
DROP DATABASE alter1_db;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_char1.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_char1.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_char1.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_char1.q Tue Sep 2 19:56:56 2014
@@ -1,34 +1,35 @@
-- SORT_QUERY_RESULTS
-drop table alter_char_1;
+create database ac;
-create table alter_char_1 (key string, value string);
-insert overwrite table alter_char_1
+create table ac.alter_char_1 (key string, value string);
+insert overwrite table ac.alter_char_1
select key, value from src order by key limit 5;
-select * from alter_char_1;
+select * from ac.alter_char_1;
-- change column to char
-alter table alter_char_1 change column value value char(20);
+alter table ac.alter_char_1 change column value value char(20);
-- contents should still look the same
-select * from alter_char_1;
+select * from ac.alter_char_1;
-- change column to smaller char
-alter table alter_char_1 change column value value char(3);
+alter table ac.alter_char_1 change column value value char(3);
-- value column should be truncated now
-select * from alter_char_1;
+select * from ac.alter_char_1;
-- change back to bigger char
-alter table alter_char_1 change column value value char(20);
+alter table ac.alter_char_1 change column value value char(20);
-- column values should be full size again
-select * from alter_char_1;
+select * from ac.alter_char_1;
-- add char column
-alter table alter_char_1 add columns (key2 int, value2 char(10));
-select * from alter_char_1;
+alter table ac.alter_char_1 add columns (key2 int, value2 char(10));
+select * from ac.alter_char_1;
-insert overwrite table alter_char_1
+insert overwrite table ac.alter_char_1
select key, value, key, value from src order by key limit 5;
-select * from alter_char_1;
+select * from ac.alter_char_1;
-drop table alter_char_1;
+drop table ac.alter_char_1;
+drop database ac;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_index.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_index.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_index.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_index.q Tue Sep 2 19:56:56 2014
@@ -1,11 +1,11 @@
drop index src_index_8 on src;
-create index src_index_8 on table src(key) as 'compact' WITH DEFERRED REBUILD IDXPROPERTIES ("prop1"="val1", "prop2"="val2");
+create index src_index_8 on table default.src(key) as 'compact' WITH DEFERRED REBUILD IDXPROPERTIES ("prop1"="val1", "prop2"="val2");
desc extended default__src_src_index_8__;
-alter index src_index_8 on src set IDXPROPERTIES ("prop1"="val1_new", "prop3"="val3");
+alter index src_index_8 on default.src set IDXPROPERTIES ("prop1"="val1_new", "prop3"="val3");
desc extended default__src_src_index_8__;
-drop index src_index_8 on src;
+drop index src_index_8 on default.src;
show tables;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_partition_coltype.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_partition_coltype.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_partition_coltype.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_partition_coltype.q Tue Sep 2 19:56:56 2014
@@ -51,18 +51,23 @@ desc alter_coltype partition (dt='100',
drop table alter_coltype;
-create table alterdynamic_part_table(intcol string) partitioned by (partcol1 string, partcol2 string);
+create database pt;
+
+create table pt.alterdynamic_part_table(intcol string) partitioned by (partcol1 string, partcol2 string);
set hive.exec.dynamic.partition.mode=nonstrict;
-insert into table alterdynamic_part_table partition(partcol1, partcol2) select '1', '1', '1' from src where key=150 limit 5;
+insert into table pt.alterdynamic_part_table partition(partcol1, partcol2) select '1', '1', '1' from src where key=150 limit 5;
+
+insert into table pt.alterdynamic_part_table partition(partcol1, partcol2) select '1', '2', '1' from src where key=150 limit 5;
+insert into table pt.alterdynamic_part_table partition(partcol1, partcol2) select NULL, '1', '1' from src where key=150 limit 5;
-insert into table alterdynamic_part_table partition(partcol1, partcol2) select '1', '2', '1' from src where key=150 limit 5;
-insert into table alterdynamic_part_table partition(partcol1, partcol2) select NULL, '1', '1' from src where key=150 limit 5;
+alter table pt.alterdynamic_part_table partition column (partcol1 int);
-alter table alterdynamic_part_table partition column (partcol1 int);
+explain extended select intcol from pt.alterdynamic_part_table where partcol1='1' and partcol2='1';
-explain extended select intcol from alterdynamic_part_table where partcol1='1' and partcol2='1';
+explain extended select intcol from pt.alterdynamic_part_table where (partcol1='2' and partcol2='1')or (partcol1='1' and partcol2='__HIVE_DEFAULT_PARTITION__');
+select intcol from pt.alterdynamic_part_table where (partcol1='2' and partcol2='1')or (partcol1='1' and partcol2='__HIVE_DEFAULT_PARTITION__');
-explain extended select intcol from alterdynamic_part_table where (partcol1='2' and partcol2='1')or (partcol1='1' and partcol2='__HIVE_DEFAULT_PARTITION__');
-select intcol from alterdynamic_part_table where (partcol1='2' and partcol2='1')or (partcol1='1' and partcol2='__HIVE_DEFAULT_PARTITION__');
\ No newline at end of file
+drop table pt.alterdynamic_part_table;
+drop database pt;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_skewed_table.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_skewed_table.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_skewed_table.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_skewed_table.q Tue Sep 2 19:56:56 2014
@@ -1,6 +1,6 @@
set hive.mapred.supports.subdirectories=true;
-create table original (key STRING, value STRING);
+create table original (key STRING, value STRING);
describe formatted original;
@@ -10,23 +10,27 @@ describe formatted original;
drop table original;
-create table original2 (key STRING, value STRING) ;
+create database skew_test;
-describe formatted original2;
+create table skew_test.original2 (key STRING, value STRING) ;
-alter table original2 SKEWED BY (key, value) ON ((1,1),(5,6));
+describe formatted skew_test.original2;
-describe formatted original2;
+alter table skew_test.original2 SKEWED BY (key, value) ON ((1,1),(5,6));
-drop table original2;
+describe formatted skew_test.original2;
-create table original3 (key STRING, value STRING) SKEWED BY (key, value) ON ((1,1),(5,6));
+drop table skew_test.original2;
-describe formatted original3;
+create table skew_test.original3 (key STRING, value STRING) SKEWED BY (key, value) ON ((1,1),(5,6));
-alter table original3 not skewed;
+describe formatted skew_test.original3;
-describe formatted original3;
+alter table skew_test.original3 not skewed;
-drop table original3;
+describe formatted skew_test.original3;
+
+drop table skew_test.original3;
+
+drop database skew_test;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_varchar1.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_varchar1.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_varchar1.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_varchar1.q Tue Sep 2 19:56:56 2014
@@ -1,34 +1,35 @@
-- SORT_QUERY_RESULTS
-drop table alter_varchar_1;
+create database avc;
-create table alter_varchar_1 (key string, value string);
-insert overwrite table alter_varchar_1
+create table avc.alter_varchar_1 (key string, value string);
+insert overwrite table avc.alter_varchar_1
select key, value from src order by key limit 5;
-select * from alter_varchar_1;
+select * from avc.alter_varchar_1;
-- change column to varchar
-alter table alter_varchar_1 change column value value varchar(20);
+alter table avc.alter_varchar_1 change column value value varchar(20);
-- contents should still look the same
-select * from alter_varchar_1;
+select * from avc.alter_varchar_1;
-- change column to smaller varchar
-alter table alter_varchar_1 change column value value varchar(3);
+alter table avc.alter_varchar_1 change column value value varchar(3);
-- value column should be truncated now
-select * from alter_varchar_1;
+select * from avc.alter_varchar_1;
-- change back to bigger varchar
-alter table alter_varchar_1 change column value value varchar(20);
+alter table avc.alter_varchar_1 change column value value varchar(20);
-- column values should be full size again
-select * from alter_varchar_1;
+select * from avc.alter_varchar_1;
-- add varchar column
-alter table alter_varchar_1 add columns (key2 int, value2 varchar(10));
-select * from alter_varchar_1;
+alter table avc.alter_varchar_1 add columns (key2 int, value2 varchar(10));
+select * from avc.alter_varchar_1;
-insert overwrite table alter_varchar_1
+insert overwrite table avc.alter_varchar_1
select key, value, key, value from src order by key limit 5;
-select * from alter_varchar_1;
+select * from avc.alter_varchar_1;
-drop table alter_varchar_1;
+drop table avc.alter_varchar_1;
+drop database avc;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_as_select.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_as_select.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_as_select.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_as_select.q Tue Sep 2 19:56:56 2014
@@ -1,13 +1,16 @@
-DROP VIEW testView;
-CREATE VIEW testView as SELECT * FROM srcpart;
-DESCRIBE FORMATTED testView;
+CREATE DATABASE tv;
+CREATE VIEW tv.testView as SELECT * FROM srcpart;
+DESCRIBE FORMATTED tv.testView;
-ALTER VIEW testView AS SELECT value FROM src WHERE key=86;
-DESCRIBE FORMATTED testView;
+ALTER VIEW tv.testView AS SELECT value FROM src WHERE key=86;
+DESCRIBE FORMATTED tv.testView;
-ALTER VIEW testView AS
+ALTER VIEW tv.testView AS
SELECT * FROM src
WHERE key > 80 AND key < 100
ORDER BY key, value
LIMIT 10;
-DESCRIBE FORMATTED testView;
+DESCRIBE FORMATTED tv.testView;
+
+DROP VIEW tv.testView;
+DROP DATABASE tv;
\ No newline at end of file
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_rename.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_rename.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_rename.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/alter_view_rename.q Tue Sep 2 19:56:56 2014
@@ -1,10 +1,16 @@
+CREATE DATABASE tv1;
+CREATE DATABASE tv2;
+
CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);
-CREATE VIEW view1 as SELECT * FROM invites;
-DESCRIBE EXTENDED view1;
+CREATE VIEW tv1.view1 as SELECT * FROM invites;
+DESCRIBE EXTENDED tv1.view1;
-ALTER VIEW view1 RENAME TO view2;
-DESCRIBE EXTENDED view2;
-SELECT * FROM view2;
+ALTER VIEW tv1.view1 RENAME TO tv2.view2;
+DESCRIBE EXTENDED tv2.view2;
+SELECT * FROM tv2.view2;
DROP TABLE invites;
-DROP VIEW view2;
\ No newline at end of file
+DROP VIEW tv2.view2;
+
+DROP DATABASE tv1;
+DROP DATABASE tv2;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/archive_multi.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/archive_multi.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/archive_multi.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/archive_multi.q Tue Sep 2 19:56:56 2014
@@ -1,42 +1,41 @@
set hive.archive.enabled = true;
set hive.enforce.bucketing = true;
-drop table tstsrc;
-drop table tstsrcpart;
+create database ac_test;
-create table tstsrc like src;
-insert overwrite table tstsrc select key, value from src;
+create table ac_test.tstsrc like default.src;
+insert overwrite table ac_test.tstsrc select key, value from default.src;
-create table tstsrcpart like srcpart;
+create table ac_test.tstsrcpart like default.srcpart;
-insert overwrite table tstsrcpart partition (ds='2008-04-08', hr='11')
-select key, value from srcpart where ds='2008-04-08' and hr='11';
+insert overwrite table ac_test.tstsrcpart partition (ds='2008-04-08', hr='11')
+select key, value from default.srcpart where ds='2008-04-08' and hr='11';
-insert overwrite table tstsrcpart partition (ds='2008-04-08', hr='12')
-select key, value from srcpart where ds='2008-04-08' and hr='12';
+insert overwrite table ac_test.tstsrcpart partition (ds='2008-04-08', hr='12')
+select key, value from default.srcpart where ds='2008-04-08' and hr='12';
-insert overwrite table tstsrcpart partition (ds='2008-04-09', hr='11')
-select key, value from srcpart where ds='2008-04-09' and hr='11';
+insert overwrite table ac_test.tstsrcpart partition (ds='2008-04-09', hr='11')
+select key, value from default.srcpart where ds='2008-04-09' and hr='11';
-insert overwrite table tstsrcpart partition (ds='2008-04-09', hr='12')
-select key, value from srcpart where ds='2008-04-09' and hr='12';
+insert overwrite table ac_test.tstsrcpart partition (ds='2008-04-09', hr='12')
+select key, value from default.srcpart where ds='2008-04-09' and hr='12';
-- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.17, 0.18, 0.19)
SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
-FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
+FROM (SELECT * FROM ac_test.tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
-ALTER TABLE tstsrcpart ARCHIVE PARTITION (ds='2008-04-08');
+ALTER TABLE ac_test.tstsrcpart ARCHIVE PARTITION (ds='2008-04-08');
SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
-FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
+FROM (SELECT * FROM ac_test.tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
-SELECT key, count(1) FROM tstsrcpart WHERE ds='2008-04-08' AND hr='12' AND key='0' GROUP BY key;
+SELECT key, count(1) FROM ac_test.tstsrcpart WHERE ds='2008-04-08' AND hr='12' AND key='0' GROUP BY key;
-SELECT * FROM tstsrcpart a JOIN tstsrc b ON a.key=b.key
+SELECT * FROM ac_test.tstsrcpart a JOIN ac_test.tstsrc b ON a.key=b.key
WHERE a.ds='2008-04-08' AND a.hr='12' AND a.key='0';
-ALTER TABLE tstsrcpart UNARCHIVE PARTITION (ds='2008-04-08');
+ALTER TABLE ac_test.tstsrcpart UNARCHIVE PARTITION (ds='2008-04-08');
SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
-FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
+FROM (SELECT * FROM ac_test.tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/authorization_1.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/authorization_1.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/authorization_1.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/authorization_1.q Tue Sep 2 19:56:56 2014
@@ -57,33 +57,33 @@ show grant group hive_test_group1 on tab
show grant group hive_test_group1 on table src_autho_test(key);
--role
-create role src_role;
-grant role src_role to user hive_test_user;
+create role sRc_roLE;
+grant role sRc_roLE to user hive_test_user;
show role grant user hive_test_user;
--column grant to role
-grant select(key) on table src_autho_test to role src_role;
+grant select(key) on table src_autho_test to role sRc_roLE;
-show grant role src_role on table src_autho_test;
-show grant role src_role on table src_autho_test(key);
+show grant role sRc_roLE on table src_autho_test;
+show grant role sRc_roLE on table src_autho_test(key);
select key from src_autho_test order by key limit 20;
-revoke select(key) on table src_autho_test from role src_role;
+revoke select(key) on table src_autho_test from role sRc_roLE;
--table grant to role
-grant select on table src_autho_test to role src_role;
+grant select on table src_autho_test to role sRc_roLE;
select key from src_autho_test order by key limit 20;
-show grant role src_role on table src_autho_test;
-show grant role src_role on table src_autho_test(key);
-revoke select on table src_autho_test from role src_role;
+show grant role sRc_roLE on table src_autho_test;
+show grant role sRc_roLE on table src_autho_test(key);
+revoke select on table src_autho_test from role sRc_roLE;
-- drop role
-drop role src_role;
+drop role sRc_roLE;
set hive.security.authorization.enabled=false;
drop table src_autho_test;
\ No newline at end of file
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/authorization_5.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/authorization_5.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/authorization_5.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/authorization_5.q Tue Sep 2 19:56:56 2014
@@ -8,13 +8,13 @@ GRANT select ON DATABASE test_db TO USER
SHOW GRANT USER hive_test_user ON DATABASE test_db;
-CREATE ROLE db_test_role;
-GRANT ROLE db_test_role TO USER hive_test_user;
+CREATE ROLE db_TEST_Role;
+GRANT ROLE db_TEST_Role TO USER hive_test_user;
SHOW ROLE GRANT USER hive_test_user;
-GRANT drop ON DATABASE test_db TO ROLE db_test_role;
-GRANT select ON DATABASE test_db TO ROLE db_test_role;
+GRANT drop ON DATABASE test_db TO ROLE db_TEST_Role;
+GRANT select ON DATABASE test_db TO ROLE db_TEST_Role;
-SHOW GRANT ROLE db_test_role ON DATABASE test_db;
+SHOW GRANT ROLE db_TEST_Role ON DATABASE test_db;
DROP DATABASE IF EXISTS test_db;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/authorization_grant_public_role.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/authorization_grant_public_role.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/authorization_grant_public_role.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/authorization_grant_public_role.q Tue Sep 2 19:56:56 2014
@@ -9,10 +9,10 @@ CREATE TABLE t_gpr1(i int);
-- all privileges should have been set for user
-GRANT ALL ON t_gpr1 TO ROLE public;
+GRANT ALL ON t_gpr1 TO ROLE pubLic;
SHOW GRANT USER user1 ON TABLE t_gpr1;
-SHOW GRANT ROLE public ON TABLE t_gpr1;
+SHOW GRANT ROLE pubLic ON TABLE t_gpr1;
set user.name=user2;
SHOW CURRENT ROLES;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/authorization_role_grant2.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/authorization_role_grant2.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/authorization_role_grant2.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/authorization_role_grant2.q Tue Sep 2 19:56:56 2014
@@ -31,7 +31,7 @@ set user.name=user2;
grant src_role_wadmin to role sRc_role2;
set user.name=hive_admin_user;
-set role ADMIN;
+set role ADMIn;
grant src_role2 to user user3;
set user.name=user3;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/create_or_replace_view.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/create_or_replace_view.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/create_or_replace_view.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/create_or_replace_view.q Tue Sep 2 19:56:56 2014
@@ -1,32 +1,39 @@
-drop view v;
-create view v as select * from srcpart;
-describe formatted v;
+create database vt;
+
+create view vt.v as select * from srcpart;
+describe formatted vt.v;
-- modifying definition of unpartitioned view
-create or replace view v partitioned on (ds, hr) as select * from srcpart;
-alter view v add partition (ds='2008-04-08',hr='11');
-alter view v add partition (ds='2008-04-08',hr='12');
-select * from v where value='val_409' and ds='2008-04-08' and hr='11';
-describe formatted v;
-show partitions v;
+create or replace view vt.v partitioned on (ds, hr) as select * from srcpart;
+alter view vt.v add partition (ds='2008-04-08',hr='11');
+alter view vt.v add partition (ds='2008-04-08',hr='12');
+select * from vt.v where value='val_409' and ds='2008-04-08' and hr='11';
+describe formatted vt.v;
+show partitions vt.v;
+
+alter view vt.v drop partition (ds='2008-04-08',hr='11');
+alter view vt.v drop partition (ds='2008-04-08',hr='12');
+show partitions vt.v;
-- altering partitioned view 1
-create or replace view v partitioned on (ds, hr) as select value, ds, hr from srcpart;
-select * from v where value='val_409' and ds='2008-04-08' and hr='11';
-describe formatted v;
-show partitions v;
+create or replace view vt.v partitioned on (ds, hr) as select value, ds, hr from srcpart;
+select * from vt.v where value='val_409' and ds='2008-04-08' and hr='11';
+describe formatted vt.v;
+show partitions vt.v;
-- altering partitioned view 2
-create or replace view v partitioned on (ds, hr) as select key, value, ds, hr from srcpart;
-select * from v where value='val_409' and ds='2008-04-08' and hr='11';
-describe formatted v;
-show partitions v;
-drop view v;
+create or replace view vt.v partitioned on (ds, hr) as select key, value, ds, hr from srcpart;
+select * from vt.v where value='val_409' and ds='2008-04-08' and hr='11';
+describe formatted vt.v;
+show partitions vt.v;
+drop view vt.v;
-- updating to fix view with invalid definition
create table srcpart_temp like srcpart;
-create view v partitioned on (ds, hr) as select * from srcpart_temp;
-drop table srcpart_temp; -- v is now invalid
-create or replace view v partitioned on (ds, hr) as select * from srcpart;
-describe formatted v;
-drop view v;
\ No newline at end of file
+create view vt.v partitioned on (ds, hr) as select * from srcpart_temp;
+drop table srcpart_temp; -- vt.v is now invalid
+create or replace view vt.v partitioned on (ds, hr) as select * from srcpart;
+describe formatted vt.v;
+drop view vt.v;
+
+drop database vt;
\ No newline at end of file
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/drop_multi_partitions.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/drop_multi_partitions.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/drop_multi_partitions.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/drop_multi_partitions.q Tue Sep 2 19:56:56 2014
@@ -1,17 +1,23 @@
-create table mp (a string) partitioned by (b string, c string);
+create database dmp;
-alter table mp add partition (b='1', c='1');
-alter table mp add partition (b='1', c='2');
-alter table mp add partition (b='2', c='2');
+create table dmp.mp (a string) partitioned by (b string, c string);
-show partitions mp;
+alter table dmp.mp add partition (b='1', c='1');
+alter table dmp.mp add partition (b='1', c='2');
+alter table dmp.mp add partition (b='2', c='2');
-explain extended alter table mp drop partition (b='1');
-alter table mp drop partition (b='1');
+show partitions dmp.mp;
-show partitions mp;
+explain extended alter table dmp.mp drop partition (b='1');
+alter table dmp.mp drop partition (b='1');
+
+show partitions dmp.mp;
set hive.exec.drop.ignorenonexistent=false;
-alter table mp drop if exists partition (b='3');
+alter table dmp.mp drop if exists partition (b='3');
+
+show partitions dmp.mp;
+
+drop table dmp.mp;
-show partitions mp;
+drop database dmp;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/exchange_partition.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/exchange_partition.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/exchange_partition.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/exchange_partition.q Tue Sep 2 19:56:56 2014
@@ -1,12 +1,15 @@
-CREATE TABLE exchange_part_test1 (f1 string) PARTITIONED BY (ds STRING);
-CREATE TABLE exchange_part_test2 (f1 string) PARTITIONED BY (ds STRING);
-SHOW PARTITIONS exchange_part_test1;
-SHOW PARTITIONS exchange_part_test2;
+create database ex1;
+create database ex2;
-ALTER TABLE exchange_part_test2 ADD PARTITION (ds='2013-04-05');
-SHOW PARTITIONS exchange_part_test1;
-SHOW PARTITIONS exchange_part_test2;
+CREATE TABLE ex1.exchange_part_test1 (f1 string) PARTITIONED BY (ds STRING);
+CREATE TABLE ex2.exchange_part_test2 (f1 string) PARTITIONED BY (ds STRING);
+SHOW PARTITIONS ex1.exchange_part_test1;
+SHOW PARTITIONS ex2.exchange_part_test2;
-ALTER TABLE exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH TABLE exchange_part_test2;
-SHOW PARTITIONS exchange_part_test1;
-SHOW PARTITIONS exchange_part_test2;
+ALTER TABLE ex2.exchange_part_test2 ADD PARTITION (ds='2013-04-05');
+SHOW PARTITIONS ex1.exchange_part_test1;
+SHOW PARTITIONS ex2.exchange_part_test2;
+
+ALTER TABLE ex1.exchange_part_test1 EXCHANGE PARTITION (ds='2013-04-05') WITH TABLE ex2.exchange_part_test2;
+SHOW PARTITIONS ex1.exchange_part_test1;
+SHOW PARTITIONS ex2.exchange_part_test2;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/index_auto_empty.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/index_auto_empty.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/index_auto_empty.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/index_auto_empty.q Tue Sep 2 19:56:56 2014
@@ -1,22 +1,25 @@
-- Test to ensure that an empty index result is propagated correctly
+CREATE DATABASE it;
-- Create temp, and populate it with some values in src.
-CREATE TABLE temp(key STRING, val STRING) STORED AS TEXTFILE;
+CREATE TABLE it.temp(key STRING, val STRING) STORED AS TEXTFILE;
set hive.stats.dbclass=fs;
--- Build an index on temp.
-CREATE INDEX temp_index ON TABLE temp(key) as 'COMPACT' WITH DEFERRED REBUILD;
-ALTER INDEX temp_index ON temp REBUILD;
+-- Build an index on it.temp.
+CREATE INDEX temp_index ON TABLE it.temp(key) as 'COMPACT' WITH DEFERRED REBUILD;
+ALTER INDEX temp_index ON it.temp REBUILD;
SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
SET hive.optimize.index.filter=true;
SET hive.optimize.index.filter.compact.minsize=0;
-- query should not return any values
-SELECT * FROM default__temp_temp_index__ WHERE key = 86;
-EXPLAIN SELECT * FROM temp WHERE key = 86;
-SELECT * FROM temp WHERE key = 86;
+SELECT * FROM it.it__temp_temp_index__ WHERE key = 86;
+EXPLAIN SELECT * FROM it.temp WHERE key = 86;
+SELECT * FROM it.temp WHERE key = 86;
SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
SET hive.optimize.index.filter=false;
-DROP table temp;
+DROP table it.temp;
+
+DROP DATABASE it;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/input46.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/input46.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/input46.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/input46.q Tue Sep 2 19:56:56 2014
@@ -1,6 +1,6 @@
create database if not exists table_in_database_creation;
create table table_in_database_creation.test1 as select * from src limit 1;
-create table `table_in_database_creation.test2` as select * from src limit 1;
+create table `table_in_database_creation`.`test2` as select * from src limit 1;
create table table_in_database_creation.test3 (a string);
-create table `table_in_database_creation.test4` (a string);
+create table `table_in_database_creation`.`test4` (a string);
drop database table_in_database_creation cascade;
\ No newline at end of file
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/optimize_nullscan.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/optimize_nullscan.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/optimize_nullscan.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/optimize_nullscan.q Tue Sep 2 19:56:56 2014
@@ -1,3 +1,5 @@
+-- SORT_BEFORE_DIFF
+
explain extended
select key from src where false;
select key from src where false;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/parquet_types.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/parquet_types.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/parquet_types.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/parquet_types.q Tue Sep 2 19:56:56 2014
@@ -8,7 +8,9 @@ CREATE TABLE parquet_types_staging (
cfloat float,
cdouble double,
cstring1 string,
- t timestamp
+ t timestamp,
+ cchar char(5),
+ cvarchar varchar(10)
) ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|';
@@ -19,7 +21,9 @@ CREATE TABLE parquet_types (
cfloat float,
cdouble double,
cstring1 string,
- t timestamp
+ t timestamp,
+ cchar char(5),
+ cvarchar varchar(10)
) STORED AS PARQUET;
LOAD DATA LOCAL INPATH '../../data/files/parquet_types.txt' OVERWRITE INTO TABLE parquet_types_staging;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q Tue Sep 2 19:56:56 2014
@@ -1,4 +1,4 @@
-set hive.stats.dbclass=counter;
+set hive.stats.dbclass=fs;
set hive.stats.autogather=true;
DROP TABLE lineitem;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/touch.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/touch.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/touch.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/touch.q Tue Sep 2 19:56:56 2014
@@ -1,17 +1,17 @@
-drop table tstsrc;
-drop table tstsrcpart;
+create database tc;
-create table tstsrc like src;
-insert overwrite table tstsrc select key, value from src;
+create table tc.tstsrc like default.src;
+insert overwrite table tc.tstsrc select key, value from default.src;
-create table tstsrcpart like srcpart;
-insert overwrite table tstsrcpart partition (ds='2008-04-08', hr='12')
-select key, value from srcpart where ds='2008-04-08' and hr='12';
+create table tc.tstsrcpart like default.srcpart;
+insert overwrite table tc.tstsrcpart partition (ds='2008-04-08', hr='12')
+select key, value from default.srcpart where ds='2008-04-08' and hr='12';
+ALTER TABLE tc.tstsrc TOUCH;
+ALTER TABLE tc.tstsrcpart TOUCH;
+ALTER TABLE tc.tstsrcpart TOUCH PARTITION (ds='2008-04-08', hr='12');
-ALTER TABLE tstsrc TOUCH;
-ALTER TABLE tstsrcpart TOUCH;
-ALTER TABLE tstsrcpart TOUCH PARTITION (ds='2008-04-08', hr='12');
+drop table tc.tstsrc;
+drop table tc.tstsrcpart;
-drop table tstsrc;
-drop table tstsrcpart;
+drop database tc;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/union_null.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/union_null.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/union_null.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/union_null.q Tue Sep 2 19:56:56 2014
@@ -1,7 +1,7 @@
-- SORT_BEFORE_DIFF
-- HIVE-2901
-select x from (select value as x from src union all select NULL as x from src)a limit 10;
+select x from (select value as x from src order by x limit 5 union all select NULL as x from src limit 5) a;
-- HIVE-4837
select * from (select null as N from src1 group by key UNION ALL select null as N from src1 group by key ) a;
Modified: hive/branches/tez/ql/src/test/queries/clientpositive/unset_table_view_property.q
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/test/queries/clientpositive/unset_table_view_property.q?rev=1622108&r1=1622107&r2=1622108&view=diff
==============================================================================
--- hive/branches/tez/ql/src/test/queries/clientpositive/unset_table_view_property.q (original)
+++ hive/branches/tez/ql/src/test/queries/clientpositive/unset_table_view_property.q Tue Sep 2 19:56:56 2014
@@ -1,64 +1,71 @@
-CREATE TABLE testTable(col1 INT, col2 INT);
-SHOW TBLPROPERTIES testTable;
+CREATE DATABASE vt;
+
+CREATE TABLE vt.testTable(col1 INT, col2 INT);
+SHOW TBLPROPERTIES vt.testTable;
-- UNSET TABLE PROPERTIES
-ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable SET TBLPROPERTIES ('a'='1', 'c'='3');
+SHOW TBLPROPERTIES vt.testTable;
-- UNSET all the properties
-ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'c');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable UNSET TBLPROPERTIES ('a', 'c');
+SHOW TBLPROPERTIES vt.testTable;
-ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'c'='3', 'd'='4');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable SET TBLPROPERTIES ('a'='1', 'c'='3', 'd'='4');
+SHOW TBLPROPERTIES vt.testTable;
-- UNSET a subset of the properties
-ALTER TABLE testTable UNSET TBLPROPERTIES ('a', 'd');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable UNSET TBLPROPERTIES ('a', 'd');
+SHOW TBLPROPERTIES vt.testTable;
-- the same property being UNSET multiple times
-ALTER TABLE testTable UNSET TBLPROPERTIES ('c', 'c', 'c');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable UNSET TBLPROPERTIES ('c', 'c', 'c');
+SHOW TBLPROPERTIES vt.testTable;
-ALTER TABLE testTable SET TBLPROPERTIES ('a'='1', 'b' = '2', 'c'='3', 'd'='4');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable SET TBLPROPERTIES ('a'='1', 'b' = '2', 'c'='3', 'd'='4');
+SHOW TBLPROPERTIES vt.testTable;
-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
-ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'b', 'f');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'b', 'f');
+SHOW TBLPROPERTIES vt.testTable;
-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
-ALTER TABLE testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'c', 'f', 'x', 'y', 'z');
-SHOW TBLPROPERTIES testTable;
+ALTER TABLE vt.testTable UNSET TBLPROPERTIES IF EXISTS ('b', 'd', 'c', 'f', 'x', 'y', 'z');
+SHOW TBLPROPERTIES vt.testTable;
+
+DROP TABLE vt.testTable;
-- UNSET VIEW PROPERTIES
-CREATE VIEW testView AS SELECT value FROM src WHERE key=86;
-ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB'='200');
-SHOW TBLPROPERTIES testView;
+CREATE VIEW vt.testView AS SELECT value FROM src WHERE key=86;
+ALTER VIEW vt.testView SET TBLPROPERTIES ('propA'='100', 'propB'='200');
+SHOW TBLPROPERTIES vt.testView;
-- UNSET all the properties
-ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propB');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView UNSET TBLPROPERTIES ('propA', 'propB');
+SHOW TBLPROPERTIES vt.testView;
-ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propC'='300', 'propD'='400');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView SET TBLPROPERTIES ('propA'='100', 'propC'='300', 'propD'='400');
+SHOW TBLPROPERTIES vt.testView;
-- UNSET a subset of the properties
-ALTER VIEW testView UNSET TBLPROPERTIES ('propA', 'propC');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView UNSET TBLPROPERTIES ('propA', 'propC');
+SHOW TBLPROPERTIES vt.testView;
-- the same property being UNSET multiple times
-ALTER VIEW testView UNSET TBLPROPERTIES ('propD', 'propD', 'propD');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView UNSET TBLPROPERTIES ('propD', 'propD', 'propD');
+SHOW TBLPROPERTIES vt.testView;
-ALTER VIEW testView SET TBLPROPERTIES ('propA'='100', 'propB' = '200', 'propC'='300', 'propD'='400');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView SET TBLPROPERTIES ('propA'='100', 'propB' = '200', 'propC'='300', 'propD'='400');
+SHOW TBLPROPERTIES vt.testView;
-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
-ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propC', 'propD', 'propD', 'propC', 'propZ');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView UNSET TBLPROPERTIES IF EXISTS ('propC', 'propD', 'propD', 'propC', 'propZ');
+SHOW TBLPROPERTIES vt.testView;
-- UNSET a subset of the properties and some non-existed properties using IF EXISTS
-ALTER VIEW testView UNSET TBLPROPERTIES IF EXISTS ('propB', 'propC', 'propD', 'propF');
-SHOW TBLPROPERTIES testView;
+ALTER VIEW vt.testView UNSET TBLPROPERTIES IF EXISTS ('propB', 'propC', 'propD', 'propF');
+SHOW TBLPROPERTIES vt.testView;
+
+DROP VIEW vt.testView;
+DROP DATABASE vt;
\ No newline at end of file