diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml
index 93cdb8668726..060a8795b6a7 100644
--- a/.github/workflows/test_report.yml
+++ b/.github/workflows/test_report.yml
@@ -15,7 +15,16 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: ${{ github.event.workflow_run.workflow_id }}
commit: ${{ github.event.workflow_run.head_commit.id }}
+ - name: Check if JUnit report XML files exist
+ run: |
+ if ls **/target/test-reports/*.xml > /dev/null 2>&1; then
+ echo '::set-output name=FILE_EXISTS::true'
+ else
+ echo '::set-output name=FILE_EXISTS::false'
+ fi
+ id: check-junit-file
- name: Publish test report
+ if: steps.check-junit-file.outputs.FILE_EXISTS == 'true'
uses: scacap/action-surefire-report@v1
with:
check_name: Report test results
diff --git a/R/pkg/NAMESPACE b/R/pkg/NAMESPACE
index 4ea05b25ecc9..25162f3e23b3 100644
--- a/R/pkg/NAMESPACE
+++ b/R/pkg/NAMESPACE
@@ -427,6 +427,7 @@ exportMethods("%<=>%",
"variance",
"var_pop",
"var_samp",
+ "vector_to_array",
"weekofyear",
"when",
"window",
diff --git a/R/pkg/R/functions.R b/R/pkg/R/functions.R
index b216f404a3ca..959edf29e242 100644
--- a/R/pkg/R/functions.R
+++ b/R/pkg/R/functions.R
@@ -345,6 +345,22 @@ NULL
#' head(tmp)}
NULL
+#' ML functions for Column operations
+#'
+#' ML functions defined for \code{Column}.
+#'
+#' @param x Column to compute on.
+#' @param ... additional argument(s).
+#' @name column_ml_functions
+#' @rdname column_ml_functions
+#' @family ml functions
+#' @examples
+#' \dontrun{
+#' df <- read.df("data/mllib/sample_libsvm_data.txt", source = "libsvm")
+#' head(select(df, vector_to_array(df$features)))
+#' }
+NULL
+
#' @details
#' \code{lit}: A new Column is created to represent the literal value.
#' If the parameter is a Column, it is returned unchanged.
@@ -4458,3 +4474,25 @@ setMethod("timestamp_seconds",
)
column(jc)
})
+
+#' @details
+#' \code{vector_to_array} Converts a column of MLlib sparse/dense vectors into
+#' a column of dense arrays.
+#'
+#' @param dtype The data type of the output array. Valid values: "float64" or "float32".
+#'
+#' @rdname column_ml_functions
+#' @aliases vector_to_array vector_to_array,Column-method
+#' @note vector_to_array since 3.1.0
+setMethod("vector_to_array",
+ signature(x = "Column"),
+ function(x, dtype = c("float64", "float32")) {
+ dtype <- match.arg(dtype)
+ jc <- callJStatic(
+ "org.apache.spark.ml.functions",
+ "vector_to_array",
+ x@jc,
+ dtype
+ )
+ column(jc)
+ })
diff --git a/R/pkg/R/generics.R b/R/pkg/R/generics.R
index 985678679dec..993fc758adbe 100644
--- a/R/pkg/R/generics.R
+++ b/R/pkg/R/generics.R
@@ -1449,6 +1449,10 @@ setGeneric("var_pop", function(x) { standardGeneric("var_pop") })
#' @name NULL
setGeneric("var_samp", function(x) { standardGeneric("var_samp") })
+#' @rdname column_ml_functions
+#' @name NULL
+setGeneric("vector_to_array", function(x, ...) { standardGeneric("vector_to_array") })
+
#' @rdname column_datetime_functions
#' @name NULL
setGeneric("weekofyear", function(x) { standardGeneric("weekofyear") })
diff --git a/R/pkg/tests/fulltests/test_sparkSQL.R b/R/pkg/tests/fulltests/test_sparkSQL.R
index c36620227593..c3b271b1205c 100644
--- a/R/pkg/tests/fulltests/test_sparkSQL.R
+++ b/R/pkg/tests/fulltests/test_sparkSQL.R
@@ -1424,7 +1424,8 @@ test_that("column functions", {
date_trunc("quarter", c) + current_date() + current_timestamp()
c25 <- overlay(c1, c2, c3, c3) + overlay(c1, c2, c3) + overlay(c1, c2, 1) +
overlay(c1, c2, 3, 4)
- c26 <- timestamp_seconds(c1)
+ c26 <- timestamp_seconds(c1) + vector_to_array(c) +
+ vector_to_array(c, "float32") + vector_to_array(c, "float64")
c27 <- nth_value("x", 1L) + nth_value("y", 2, TRUE) +
nth_value(column("v"), 3) + nth_value(column("z"), 4L, FALSE)
diff --git a/dev/run-tests.py b/dev/run-tests.py
index 3e118dcbc160..48191e9bb024 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -325,7 +325,6 @@ def get_hive_profiles(hive_version):
"""
sbt_maven_hive_profiles = {
- "hive1.2": ["-Phive-1.2"],
"hive2.3": ["-Phive-2.3"],
}
diff --git a/dev/test-dependencies.sh b/dev/test-dependencies.sh
index 129b073d7525..e9e9227d239e 100755
--- a/dev/test-dependencies.sh
+++ b/dev/test-dependencies.sh
@@ -32,7 +32,6 @@ export LC_ALL=C
HADOOP_MODULE_PROFILES="-Phive-thriftserver -Pmesos -Pkubernetes -Pyarn -Phive"
MVN="build/mvn"
HADOOP_HIVE_PROFILES=(
- hadoop-2.7-hive-1.2
hadoop-2.7-hive-2.3
hadoop-3.2-hive-2.3
)
@@ -71,12 +70,9 @@ for HADOOP_HIVE_PROFILE in "${HADOOP_HIVE_PROFILES[@]}"; do
if [[ $HADOOP_HIVE_PROFILE == **hadoop-3.2-hive-2.3** ]]; then
HADOOP_PROFILE=hadoop-3.2
HIVE_PROFILE=hive-2.3
- elif [[ $HADOOP_HIVE_PROFILE == **hadoop-2.7-hive-2.3** ]]; then
- HADOOP_PROFILE=hadoop-2.7
- HIVE_PROFILE=hive-2.3
else
HADOOP_PROFILE=hadoop-2.7
- HIVE_PROFILE=hive-1.2
+ HIVE_PROFILE=hive-2.3
fi
echo "Performing Maven install for $HADOOP_HIVE_PROFILE"
$MVN $HADOOP_MODULE_PROFILES -P$HADOOP_PROFILE -P$HIVE_PROFILE jar:jar jar:test-jar install:install clean -q
diff --git a/docs/sql-migration-guide.md b/docs/sql-migration-guide.md
index de60aed7483c..feff2c7e9f54 100644
--- a/docs/sql-migration-guide.md
+++ b/docs/sql-migration-guide.md
@@ -42,6 +42,8 @@ license: |
- In Spark 3.1, incomplete interval literals, e.g. `INTERVAL '1'`, `INTERVAL '1 DAY 2'` will fail with IllegalArgumentException. In Spark 3.0, they result `NULL`s.
+ - In Spark 3.1, we remove the built-in Hive 1.2. You need to migrate your custom SerDes to Hive 2.3. See [HIVE-15167](https://issues.apache.org/jira/browse/HIVE-15167) for more details.
+
## Upgrading from Spark SQL 3.0 to 3.0.1
- In Spark 3.0, JSON datasource and JSON function `schema_of_json` infer TimestampType from string values if they match to the pattern defined by the JSON option `timestampFormat`. Since version 3.0.1, the timestamp type inference is disabled by default. Set the JSON option `inferTimestamp` to `true` to enable such type inference.
diff --git a/pom.xml b/pom.xml
index 5d6b0511ce45..b13d5ab81856 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2970,13 +2970,9 @@
${basedir}/src/main/java
${basedir}/src/main/scala
- ${basedir}/v${hive.version.short}/src/main/java
- ${basedir}/v${hive.version.short}/src/main/scala
${basedir}/src/test/java
- ${basedir}/v${hive.version.short}/src/test/java
- ${basedir}/v${hive.version.short}/src/test/scala
dev/checkstyle.xml
${basedir}/target/checkstyle-output.xml
@@ -3148,27 +3144,6 @@
-
- hive-1.2
-
- org.spark-project.hive
-
-
- 1.2.1.spark2
-
- 1.2
- ${hive.deps.scope}
- 2.6.0
- provided
- provided
- provided
- provided
- provided
- nohive
- 3.2.10
-
-
-
hive-2.3
diff --git a/python/pyspark/__init__.py b/python/pyspark/__init__.py
index fb05819e7412..19269e446650 100644
--- a/python/pyspark/__init__.py
+++ b/python/pyspark/__init__.py
@@ -50,7 +50,6 @@
import types
from pyspark.conf import SparkConf
-from pyspark.context import SparkContext
from pyspark.rdd import RDD, RDDBarrier
from pyspark.files import SparkFiles
from pyspark.status import StatusTracker, SparkJobInfo, SparkStageInfo
@@ -113,6 +112,8 @@ def wrapper(self, *args, **kwargs):
return func(self, **kwargs)
return wrapper
+# To avoid circular dependencies
+from pyspark.context import SparkContext
# for back compatibility
from pyspark.sql import SQLContext, HiveContext, Row # noqa: F401
diff --git a/python/pyspark/context.py b/python/pyspark/context.py
index 55a5657b6405..4213a742a1dc 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -28,7 +28,7 @@
from py4j.protocol import Py4JError
from py4j.java_gateway import is_instance_of
-from pyspark import accumulators
+from pyspark import accumulators, since
from pyspark.accumulators import Accumulator
from pyspark.broadcast import Broadcast, BroadcastPickleRegistry
from pyspark.conf import SparkConf
@@ -956,6 +956,16 @@ def setCheckpointDir(self, dirName):
"""
self._jsc.sc().setCheckpointDir(dirName)
+ @since(3.1)
+ def getCheckpointDir(self):
+ """
+ Return the directory where RDDs are checkpointed. Returns None if no
+ checkpoint directory has been set.
+ """
+ if not self._jsc.sc().getCheckpointDir().isEmpty():
+ return self._jsc.sc().getCheckpointDir().get()
+ return None
+
def _getJavaStorageLevel(self, storageLevel):
"""
Returns a Java StorageLevel based on a pyspark.StorageLevel.
diff --git a/python/pyspark/context.pyi b/python/pyspark/context.pyi
index 76ecf8911471..2789a38b3be9 100644
--- a/python/pyspark/context.pyi
+++ b/python/pyspark/context.pyi
@@ -152,6 +152,7 @@ class SparkContext:
def addFile(self, path: str, recursive: bool = ...) -> None: ...
def addPyFile(self, path: str) -> None: ...
def setCheckpointDir(self, dirName: str) -> None: ...
+ def getCheckpointDir(self) -> Optional[str]: ...
def setJobGroup(
self, groupId: str, description: str, interruptOnCancel: bool = ...
) -> None: ...
diff --git a/python/pyspark/tests/test_context.py b/python/pyspark/tests/test_context.py
index 9b6b74a11128..d86f6c3c1571 100644
--- a/python/pyspark/tests/test_context.py
+++ b/python/pyspark/tests/test_context.py
@@ -43,6 +43,7 @@ def test_basic_checkpointing(self):
self.assertFalse(flatMappedRDD.isCheckpointed())
self.assertTrue(flatMappedRDD.getCheckpointFile() is None)
+ self.assertFalse(self.sc.getCheckpointDir() is None)
flatMappedRDD.checkpoint()
result = flatMappedRDD.collect()
@@ -51,6 +52,8 @@ def test_basic_checkpointing(self):
self.assertEqual(flatMappedRDD.collect(), result)
self.assertEqual("file:" + self.checkpointDir.name,
os.path.dirname(os.path.dirname(flatMappedRDD.getCheckpointFile())))
+ self.assertEqual(self.sc.getCheckpointDir(),
+ os.path.dirname(flatMappedRDD.getCheckpointFile()))
def test_checkpoint_and_restore(self):
parCollection = self.sc.parallelize([1, 2, 3, 4])
diff --git a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtils.scala b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtils.scala
index 77921f6338c7..b2eacca04279 100644
--- a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtils.scala
+++ b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtils.scala
@@ -67,6 +67,7 @@ private[spark] object KubernetesVolumeUtils {
volumeType match {
case KUBERNETES_VOLUMES_HOSTPATH_TYPE =>
val pathKey = s"$volumeType.$volumeName.$KUBERNETES_VOLUMES_OPTIONS_PATH_KEY"
+ verifyOptionKey(options, pathKey, KUBERNETES_VOLUMES_HOSTPATH_TYPE)
KubernetesHostPathVolumeConf(options(pathKey))
case KUBERNETES_VOLUMES_PVC_TYPE =>
@@ -74,6 +75,7 @@ private[spark] object KubernetesVolumeUtils {
val storageClassKey =
s"$volumeType.$volumeName.$KUBERNETES_VOLUMES_OPTIONS_CLAIM_STORAGE_CLASS_KEY"
val sizeLimitKey = s"$volumeType.$volumeName.$KUBERNETES_VOLUMES_OPTIONS_SIZE_LIMIT_KEY"
+ verifyOptionKey(options, claimNameKey, KUBERNETES_VOLUMES_PVC_TYPE)
KubernetesPVCVolumeConf(
options(claimNameKey),
options.get(storageClassKey),
@@ -87,6 +89,8 @@ private[spark] object KubernetesVolumeUtils {
case KUBERNETES_VOLUMES_NFS_TYPE =>
val pathKey = s"$volumeType.$volumeName.$KUBERNETES_VOLUMES_OPTIONS_PATH_KEY"
val serverKey = s"$volumeType.$volumeName.$KUBERNETES_VOLUMES_OPTIONS_SERVER_KEY"
+ verifyOptionKey(options, pathKey, KUBERNETES_VOLUMES_NFS_TYPE)
+ verifyOptionKey(options, serverKey, KUBERNETES_VOLUMES_NFS_TYPE)
KubernetesNFSVolumeConf(
options(pathKey),
options(serverKey))
@@ -95,4 +99,10 @@ private[spark] object KubernetesVolumeUtils {
throw new IllegalArgumentException(s"Kubernetes Volume type `$volumeType` is not supported")
}
}
+
+ private def verifyOptionKey(options: Map[String, String], key: String, msg: String): Unit = {
+ if (!options.isDefinedAt(key)) {
+ throw new NoSuchElementException(key + s" is required for $msg")
+ }
+ }
}
diff --git a/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtilsSuite.scala b/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtilsSuite.scala
index 6596c5e2ad2e..349cbd04f602 100644
--- a/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtilsSuite.scala
+++ b/resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtilsSuite.scala
@@ -118,6 +118,17 @@ class KubernetesVolumeUtilsSuite extends SparkFunSuite {
assert(e.getMessage.contains("hostPath.volumeName.options.path"))
}
+ test("SPARK-33063: Fails on missing option key in persistentVolumeClaim") {
+ val sparkConf = new SparkConf(false)
+ sparkConf.set("test.persistentVolumeClaim.volumeName.mount.path", "/path")
+ sparkConf.set("test.persistentVolumeClaim.volumeName.mount.readOnly", "true")
+
+ val e = intercept[NoSuchElementException] {
+ KubernetesVolumeUtils.parseVolumesWithPrefix(sparkConf, "test.")
+ }
+ assert(e.getMessage.contains("persistentVolumeClaim.volumeName.options.claimName"))
+ }
+
test("Parses read-only nfs volumes correctly") {
val sparkConf = new SparkConf(false)
sparkConf.set("test.nfs.volumeName.mount.path", "/path")
diff --git a/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala b/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala
index 3c9209c29241..d2397504ba14 100644
--- a/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala
+++ b/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/LocalityPlacementStrategySuite.scala
@@ -43,7 +43,7 @@ class LocalityPlacementStrategySuite extends SparkFunSuite {
}
}
- val thread = new Thread(new ThreadGroup("test"), runnable, "test-thread", 32 * 1024)
+ val thread = new Thread(new ThreadGroup("test"), runnable, "test-thread", 256 * 1024)
thread.start()
thread.join()
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
index ce4aa1c2b7c2..35b192cc5544 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
@@ -1060,10 +1060,12 @@ trait ComplexTypeMergingExpression extends Expression {
s" The input types found are\n\t${inputTypesForMerging.mkString("\n\t")}")
}
- override def dataType: DataType = {
+ private lazy val internalDataType: DataType = {
dataTypeCheck
inputTypesForMerging.reduceLeft(TypeCoercion.findCommonTypeDifferentOnlyInNullFlags(_, _).get)
}
+
+ override def dataType: DataType = internalDataType
}
/**
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala
index 3327f4ccf446..2a5275e75d4f 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala
@@ -187,10 +187,12 @@ case class ApproximatePercentile(
override def nullable: Boolean = true
// The result type is the same as the input type.
- override def dataType: DataType = {
+ private lazy val internalDataType: DataType = {
if (returnPercentileArray) ArrayType(child.dataType, false) else child.dataType
}
+ override def dataType: DataType = internalDataType
+
override def prettyName: String =
getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("percentile_approx")
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
index 8555f63df986..8719b2e06566 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
@@ -371,7 +371,7 @@ case class MapEntries(child: Expression)
@transient private lazy val childDataType: MapType = child.dataType.asInstanceOf[MapType]
- override def dataType: DataType = {
+ private lazy val internalDataType: DataType = {
ArrayType(
StructType(
StructField("key", childDataType.keyType, false) ::
@@ -380,6 +380,8 @@ case class MapEntries(child: Expression)
false)
}
+ override def dataType: DataType = internalDataType
+
override protected def nullSafeEval(input: Any): Any = {
val childMap = input.asInstanceOf[MapData]
val keys = childMap.keyArray()
@@ -3504,13 +3506,16 @@ object ArrayUnion {
since = "2.4.0")
case class ArrayIntersect(left: Expression, right: Expression) extends ArrayBinaryLike
with ComplexTypeMergingExpression {
- override def dataType: DataType = {
+
+ private lazy val internalDataType: DataType = {
dataTypeCheck
ArrayType(elementType,
left.dataType.asInstanceOf[ArrayType].containsNull &&
right.dataType.asInstanceOf[ArrayType].containsNull)
}
+ override def dataType: DataType = internalDataType
+
@transient lazy val evalIntersect: (ArrayData, ArrayData) => ArrayData = {
if (TypeUtils.typeWithProperEquals(elementType)) {
(array1, array2) =>
@@ -3747,11 +3752,13 @@ case class ArrayIntersect(left: Expression, right: Expression) extends ArrayBina
case class ArrayExcept(left: Expression, right: Expression) extends ArrayBinaryLike
with ComplexTypeMergingExpression {
- override def dataType: DataType = {
+ private lazy val internalDataType: DataType = {
dataTypeCheck
left.dataType
}
+ override def dataType: DataType = internalDataType
+
@transient lazy val evalExcept: (ArrayData, ArrayData) => ArrayData = {
if (TypeUtils.typeWithProperEquals(elementType)) {
(array1, array2) =>
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizerSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizerSuite.scala
new file mode 100644
index 000000000000..b48555ec2fb2
--- /dev/null
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizerSuite.scala
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.catalyst.optimizer
+
+import org.apache.spark.sql.catalyst.dsl.plans._
+import org.apache.spark.sql.catalyst.errors.TreeNodeException
+import org.apache.spark.sql.catalyst.expressions.{Alias, IntegerLiteral, Literal}
+import org.apache.spark.sql.catalyst.plans.PlanTest
+import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, OneRowRelation, Project}
+import org.apache.spark.sql.catalyst.rules.Rule
+import org.apache.spark.sql.internal.SQLConf
+
+/**
+ * A dummy optimizer rule for testing that decrements integer literals until 0.
+ */
+object DecrementLiterals extends Rule[LogicalPlan] {
+ def apply(plan: LogicalPlan): LogicalPlan = plan transformExpressions {
+ case IntegerLiteral(i) if i > 0 => Literal(i - 1)
+ }
+}
+
+class OptimizerSuite extends PlanTest {
+ test("Optimizer exceeds max iterations") {
+ val iterations = 5
+ val maxIterationsNotEnough = 3
+ val maxIterationsEnough = 10
+ val analyzed = Project(Alias(Literal(iterations), "attr")() :: Nil, OneRowRelation()).analyze
+
+ withSQLConf(SQLConf.OPTIMIZER_MAX_ITERATIONS.key -> maxIterationsNotEnough.toString) {
+ val optimizer = new SimpleTestOptimizer() {
+ override def defaultBatches: Seq[Batch] =
+ Batch("test", fixedPoint,
+ DecrementLiterals) :: Nil
+ }
+
+ val message1 = intercept[TreeNodeException[LogicalPlan]] {
+ optimizer.execute(analyzed)
+ }.getMessage
+ assert(message1.startsWith(s"Max iterations ($maxIterationsNotEnough) reached for batch " +
+ s"test, please set '${SQLConf.OPTIMIZER_MAX_ITERATIONS.key}' to a larger value."))
+
+ withSQLConf(SQLConf.OPTIMIZER_MAX_ITERATIONS.key -> maxIterationsEnough.toString) {
+ try {
+ optimizer.execute(analyzed)
+ } catch {
+ case ex: TreeNodeException[LogicalPlan]
+ if ex.getMessage.contains(SQLConf.OPTIMIZER_MAX_ITERATIONS.key) =>
+ fail("optimizer.execute should not reach max iterations.")
+ }
+ }
+
+ val message2 = intercept[TreeNodeException[LogicalPlan]] {
+ optimizer.execute(analyzed)
+ }.getMessage
+ assert(message2.startsWith(s"Max iterations ($maxIterationsNotEnough) reached for batch " +
+ s"test, please set '${SQLConf.OPTIMIZER_MAX_ITERATIONS.key}' to a larger value."))
+ }
+ }
+}
diff --git a/sql/core/pom.xml b/sql/core/pom.xml
index c2ed4c079d3c..0f5d3fd55c15 100644
--- a/sql/core/pom.xml
+++ b/sql/core/pom.xml
@@ -221,8 +221,6 @@
- v${hive.version.short}/src/main/scala
- v${hive.version.short}/src/main/java
src/main/scala-${scala.binary.version}
@@ -235,7 +233,6 @@
- v${hive.version.short}/src/test/scala
src/test/gen-java
diff --git a/sql/core/v2.3/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java
similarity index 100%
rename from sql/core/v2.3/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java
rename to sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
index 6c197fedd8c5..0e032569bb8a 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
@@ -300,26 +300,40 @@ case class AdaptiveSparkPlanExec(
maxFields,
printNodeId,
indent)
- generateTreeStringWithHeader(
- if (isFinalPlan) "Final Plan" else "Current Plan",
- currentPhysicalPlan,
- depth,
- lastChildren,
- append,
- verbose,
- maxFields,
- printNodeId)
- generateTreeStringWithHeader(
- "Initial Plan",
- initialPlan,
- depth,
- lastChildren,
- append,
- verbose,
- maxFields,
- printNodeId)
+ if (currentPhysicalPlan.fastEquals(initialPlan)) {
+ currentPhysicalPlan.generateTreeString(
+ depth + 1,
+ lastChildren :+ true,
+ append,
+ verbose,
+ prefix = "",
+ addSuffix = false,
+ maxFields,
+ printNodeId,
+ indent)
+ } else {
+ generateTreeStringWithHeader(
+ if (isFinalPlan) "Final Plan" else "Current Plan",
+ currentPhysicalPlan,
+ depth,
+ lastChildren,
+ append,
+ verbose,
+ maxFields,
+ printNodeId)
+ generateTreeStringWithHeader(
+ "Initial Plan",
+ initialPlan,
+ depth,
+ lastChildren,
+ append,
+ verbose,
+ maxFields,
+ printNodeId)
+ }
}
+
private def generateTreeStringWithHeader(
header: String,
plan: SparkPlan,
diff --git a/sql/core/v2.3/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala
similarity index 100%
rename from sql/core/v2.3/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala
rename to sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala
diff --git a/sql/core/v2.3/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala
similarity index 100%
rename from sql/core/v2.3/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala
rename to sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala
diff --git a/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out b/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out
index 3a850160b43e..5435cde050fd 100644
--- a/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out
+++ b/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out
@@ -54,16 +54,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (8)
-+- == Current Plan ==
- Sort (7)
- +- Exchange (6)
- +- HashAggregate (5)
- +- Exchange (4)
- +- HashAggregate (3)
- +- Filter (2)
- +- Scan parquet default.explain_temp1 (1)
-+- == Initial Plan ==
- Sort (7)
++- Sort (7)
+- Exchange (6)
+- HashAggregate (5)
+- Exchange (4)
@@ -126,16 +117,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (8)
-+- == Current Plan ==
- Project (7)
- +- Filter (6)
- +- HashAggregate (5)
- +- Exchange (4)
- +- HashAggregate (3)
- +- Filter (2)
- +- Scan parquet default.explain_temp1 (1)
-+- == Initial Plan ==
- Project (7)
++- Project (7)
+- Filter (6)
+- HashAggregate (5)
+- Exchange (4)
@@ -196,17 +178,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (9)
-+- == Current Plan ==
- HashAggregate (8)
- +- Exchange (7)
- +- HashAggregate (6)
- +- Union (5)
- :- Filter (2)
- : +- Scan parquet default.explain_temp1 (1)
- +- Filter (4)
- +- Scan parquet default.explain_temp1 (3)
-+- == Initial Plan ==
- HashAggregate (8)
++- HashAggregate (8)
+- Exchange (7)
+- HashAggregate (6)
+- Union (5)
@@ -274,15 +246,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (7)
-+- == Current Plan ==
- BroadcastHashJoin Inner BuildRight (6)
- :- Filter (2)
- : +- Scan parquet default.explain_temp1 (1)
- +- BroadcastExchange (5)
- +- Filter (4)
- +- Scan parquet default.explain_temp2 (3)
-+- == Initial Plan ==
- BroadcastHashJoin Inner BuildRight (6)
++- BroadcastHashJoin Inner BuildRight (6)
:- Filter (2)
: +- Scan parquet default.explain_temp1 (1)
+- BroadcastExchange (5)
@@ -337,14 +301,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (6)
-+- == Current Plan ==
- BroadcastHashJoin LeftOuter BuildRight (5)
- :- Scan parquet default.explain_temp1 (1)
- +- BroadcastExchange (4)
- +- Filter (3)
- +- Scan parquet default.explain_temp2 (2)
-+- == Initial Plan ==
- BroadcastHashJoin LeftOuter BuildRight (5)
++- BroadcastHashJoin LeftOuter BuildRight (5)
:- Scan parquet default.explain_temp1 (1)
+- BroadcastExchange (4)
+- Filter (3)
@@ -398,11 +355,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (3)
-+- == Current Plan ==
- Filter (2)
- +- Scan parquet default.explain_temp1 (1)
-+- == Initial Plan ==
- Filter (2)
++- Filter (2)
+- Scan parquet default.explain_temp1 (1)
@@ -438,11 +391,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (3)
-+- == Current Plan ==
- Filter (2)
- +- Scan parquet default.explain_temp1 (1)
-+- == Initial Plan ==
- Filter (2)
++- Filter (2)
+- Scan parquet default.explain_temp1 (1)
@@ -470,11 +419,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (3)
-+- == Current Plan ==
- Project (2)
- +- Scan parquet default.explain_temp1 (1)
-+- == Initial Plan ==
- Project (2)
++- Project (2)
+- Scan parquet default.explain_temp1 (1)
@@ -506,15 +451,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (7)
-+- == Current Plan ==
- BroadcastHashJoin Inner BuildRight (6)
- :- Filter (2)
- : +- Scan parquet default.explain_temp1 (1)
- +- BroadcastExchange (5)
- +- Filter (4)
- +- Scan parquet default.explain_temp1 (3)
-+- == Initial Plan ==
- BroadcastHashJoin Inner BuildRight (6)
++- BroadcastHashJoin Inner BuildRight (6)
:- Filter (2)
: +- Scan parquet default.explain_temp1 (1)
+- BroadcastExchange (5)
@@ -572,21 +509,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (13)
-+- == Current Plan ==
- BroadcastHashJoin Inner BuildRight (12)
- :- HashAggregate (5)
- : +- Exchange (4)
- : +- HashAggregate (3)
- : +- Filter (2)
- : +- Scan parquet default.explain_temp1 (1)
- +- BroadcastExchange (11)
- +- HashAggregate (10)
- +- Exchange (9)
- +- HashAggregate (8)
- +- Filter (7)
- +- Scan parquet default.explain_temp1 (6)
-+- == Initial Plan ==
- BroadcastHashJoin Inner BuildRight (12)
++- BroadcastHashJoin Inner BuildRight (12)
:- HashAggregate (5)
: +- Exchange (4)
: +- HashAggregate (3)
@@ -710,13 +633,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (5)
-+- == Current Plan ==
- HashAggregate (4)
- +- Exchange (3)
- +- HashAggregate (2)
- +- Scan parquet default.explain_temp1 (1)
-+- == Initial Plan ==
- HashAggregate (4)
++- HashAggregate (4)
+- Exchange (3)
+- HashAggregate (2)
+- Scan parquet default.explain_temp1 (1)
@@ -761,13 +678,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (5)
-+- == Current Plan ==
- ObjectHashAggregate (4)
- +- Exchange (3)
- +- ObjectHashAggregate (2)
- +- Scan parquet default.explain_temp4 (1)
-+- == Initial Plan ==
- ObjectHashAggregate (4)
++- ObjectHashAggregate (4)
+- Exchange (3)
+- ObjectHashAggregate (2)
+- Scan parquet default.explain_temp4 (1)
@@ -812,15 +723,7 @@ struct
-- !query output
== Physical Plan ==
AdaptiveSparkPlan (7)
-+- == Current Plan ==
- SortAggregate (6)
- +- Sort (5)
- +- Exchange (4)
- +- SortAggregate (3)
- +- Sort (2)
- +- Scan parquet default.explain_temp4 (1)
-+- == Initial Plan ==
- SortAggregate (6)
++- SortAggregate (6)
+- Sort (5)
+- Exchange (4)
+- SortAggregate (3)
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
index 8799dbb14ef3..0dfb1d2fd9ed 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
@@ -842,8 +842,8 @@ class AdaptiveQueryExecSuite
withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true") {
val df = sql("SELECT * FROM testData join testData2 ON key = a where value = '1'")
val planBefore = df.queryExecution.executedPlan
- assert(planBefore.toString.contains("== Current Plan =="))
- assert(planBefore.toString.contains("== Initial Plan =="))
+ assert(!planBefore.toString.contains("== Current Plan =="))
+ assert(!planBefore.toString.contains("== Initial Plan =="))
df.collect()
val planAfter = df.queryExecution.executedPlan
assert(planAfter.toString.contains("== Final Plan =="))
diff --git a/sql/core/v2.3/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
similarity index 100%
rename from sql/core/v2.3/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
rename to sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
index b308934ba03c..bf71f90779b7 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
@@ -20,7 +20,8 @@ import java.sql.{Connection, DriverManager}
import java.util.Properties
import org.apache.spark.SparkConf
-import org.apache.spark.sql.{QueryTest, Row}
+import org.apache.spark.sql.{AnalysisException, QueryTest, Row}
+import org.apache.spark.sql.catalyst.analysis.NoSuchTableException
import org.apache.spark.sql.test.SharedSparkSession
import org.apache.spark.sql.types._
import org.apache.spark.util.Utils
@@ -63,6 +64,8 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
test("show tables") {
checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+ // Check not existing namespace
+ checkAnswer(sql("SHOW TABLES IN h2.bad_test"), Seq())
}
test("drop a table and test whether the table exists") {
@@ -72,6 +75,11 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "to_drop"), Row("test", "people")))
sql("DROP TABLE h2.test.to_drop")
checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[NoSuchTableException] {
+ sql(s"DROP TABLE $table")
+ }
+ }
}
test("rename a table") {
@@ -87,6 +95,26 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
sql("SHOW TABLES IN h2.test"),
Seq(Row("test", "dst_table"), Row("test", "people")))
}
+ // Rename not existing table or namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[org.h2.jdbc.JdbcSQLException] {
+ sql(s"ALTER TABLE $table RENAME TO test.dst_table")
+ }
+ }
+ // Rename to an existing table
+ withTable("h2.test.dst_table") {
+ withConnection { conn =>
+ conn.prepareStatement("""CREATE TABLE "test"."dst_table" (id INTEGER)""").executeUpdate()
+ }
+ withTable("h2.test.src_table") {
+ withConnection { conn =>
+ conn.prepareStatement("""CREATE TABLE "test"."src_table" (id INTEGER)""").executeUpdate()
+ }
+ intercept[org.h2.jdbc.JdbcSQLException] {
+ sql("ALTER TABLE h2.test.src_table RENAME TO h2.test.dst_table")
+ }
+ }
+ }
}
test("load a table") {
@@ -95,6 +123,11 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
.add("NAME", StringType)
.add("ID", IntegerType)
assert(t.schema === expectedSchema)
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ spark.table(s"h2.$table").schema
+ }
+ }
}
test("create a table") {
@@ -105,6 +138,15 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
sql("SHOW TABLES IN h2.test"),
Seq(Row("test", "people"), Row("test", "new_table")))
}
+ withTable("h2.test.new_table") {
+ sql("CREATE TABLE h2.test.new_table(i INT, j STRING) USING _")
+ intercept[AnalysisException] {
+ sql("CREATE TABLE h2.test.new_table(i INT, j STRING) USING _")
+ }
+ }
+ intercept[org.h2.jdbc.JdbcSQLException] {
+ sql("CREATE TABLE h2.bad_test.new_table(i INT, j STRING) USING _")
+ }
}
test("alter table ... add column") {
@@ -121,16 +163,38 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
t = spark.table("h2.test.alt_table")
expectedSchema = expectedSchema.add("C3", DoubleType)
assert(t.schema === expectedSchema)
+ // Add already existing column
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table ADD COLUMNS (C3 DOUBLE)")
+ }
+ }
+ // Add a column to not existing table and namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ sql(s"ALTER TABLE $table ADD COLUMNS (C4 STRING)")
+ }
}
}
test("alter table ... rename column") {
withTable("h2.test.alt_table") {
- sql("CREATE TABLE h2.test.alt_table (ID INTEGER) USING _")
+ sql("CREATE TABLE h2.test.alt_table (ID INTEGER, C0 INTEGER) USING _")
sql("ALTER TABLE h2.test.alt_table RENAME COLUMN ID TO C")
val t = spark.table("h2.test.alt_table")
- val expectedSchema = new StructType().add("C", IntegerType)
+ val expectedSchema = new StructType()
+ .add("C", IntegerType)
+ .add("C0", IntegerType)
assert(t.schema === expectedSchema)
+ // Rename to already existing column
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table RENAME COLUMN C TO C0")
+ }
+ }
+ // Rename a column in not existing table and namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ sql(s"ALTER TABLE $table RENAME COLUMN ID TO C")
+ }
}
}
@@ -141,6 +205,16 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
val t = spark.table("h2.test.alt_table")
val expectedSchema = new StructType().add("C2", IntegerType)
assert(t.schema === expectedSchema)
+ // Drop not existing column
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table DROP COLUMN bad_column")
+ }
+ }
+ // Drop a column to not existing table and namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ sql(s"ALTER TABLE $table DROP COLUMN C1")
+ }
}
}
@@ -151,6 +225,20 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
val t = spark.table("h2.test.alt_table")
val expectedSchema = new StructType().add("ID", DoubleType)
assert(t.schema === expectedSchema)
+ // Update not existing column
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table ALTER COLUMN bad_column TYPE DOUBLE")
+ }
+ // Update column to wrong type
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table ALTER COLUMN id TYPE bad_type")
+ }
+ }
+ // Update column type in not existing table and namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ sql(s"ALTER TABLE $table ALTER COLUMN id TYPE DOUBLE")
+ }
}
}
@@ -161,6 +249,16 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
val t = spark.table("h2.test.alt_table")
val expectedSchema = new StructType().add("ID", IntegerType, nullable = true)
assert(t.schema === expectedSchema)
+ // Update nullability of not existing column
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table ALTER COLUMN bad_column DROP NOT NULL")
+ }
+ }
+ // Update column nullability in not existing table and namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ sql(s"ALTER TABLE $table ALTER COLUMN ID DROP NOT NULL")
+ }
}
}
@@ -171,6 +269,16 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
sql("ALTER TABLE h2.test.alt_table ALTER COLUMN ID COMMENT 'test'")
}
assert(thrown.getMessage.contains("Unsupported TableChange"))
+ // Update comment for not existing column
+ intercept[AnalysisException] {
+ sql("ALTER TABLE h2.test.alt_table ALTER COLUMN bad_column COMMENT 'test'")
+ }
+ }
+ // Update column comments in not existing table and namespace
+ Seq("h2.test.not_existing_table", "h2.bad_test.not_existing_table").foreach { table =>
+ intercept[AnalysisException] {
+ sql(s"ALTER TABLE $table ALTER COLUMN ID COMMENT 'test'")
+ }
}
}
}
diff --git a/sql/core/v1.2/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java b/sql/core/v1.2/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java
deleted file mode 100644
index 6601bcb9018f..000000000000
--- a/sql/core/v1.2/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnVector.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.sql.execution.datasources.orc;
-
-import java.math.BigDecimal;
-
-import org.apache.orc.storage.ql.exec.vector.*;
-
-import org.apache.spark.sql.catalyst.util.DateTimeUtils;
-import org.apache.spark.sql.catalyst.util.RebaseDateTime;
-import org.apache.spark.sql.types.DataType;
-import org.apache.spark.sql.types.DateType;
-import org.apache.spark.sql.types.Decimal;
-import org.apache.spark.sql.types.TimestampType;
-import org.apache.spark.sql.vectorized.ColumnarArray;
-import org.apache.spark.sql.vectorized.ColumnarMap;
-import org.apache.spark.unsafe.types.UTF8String;
-
-/**
- * A column vector class wrapping Hive's ColumnVector. Because Spark ColumnarBatch only accepts
- * Spark's vectorized.ColumnVector, this column vector is used to adapt Hive ColumnVector with
- * Spark ColumnarVector.
- */
-public class OrcColumnVector extends org.apache.spark.sql.vectorized.ColumnVector {
- private ColumnVector baseData;
- private LongColumnVector longData;
- private DoubleColumnVector doubleData;
- private BytesColumnVector bytesData;
- private DecimalColumnVector decimalData;
- private TimestampColumnVector timestampData;
- private final boolean isTimestamp;
- private final boolean isDate;
-
- private int batchSize;
-
- OrcColumnVector(DataType type, ColumnVector vector) {
- super(type);
-
- if (type instanceof TimestampType) {
- isTimestamp = true;
- } else {
- isTimestamp = false;
- }
-
- if (type instanceof DateType) {
- isDate = true;
- } else {
- isDate = false;
- }
-
- baseData = vector;
- if (vector instanceof LongColumnVector) {
- longData = (LongColumnVector) vector;
- } else if (vector instanceof DoubleColumnVector) {
- doubleData = (DoubleColumnVector) vector;
- } else if (vector instanceof BytesColumnVector) {
- bytesData = (BytesColumnVector) vector;
- } else if (vector instanceof DecimalColumnVector) {
- decimalData = (DecimalColumnVector) vector;
- } else if (vector instanceof TimestampColumnVector) {
- timestampData = (TimestampColumnVector) vector;
- } else {
- throw new UnsupportedOperationException();
- }
- }
-
- public void setBatchSize(int batchSize) {
- this.batchSize = batchSize;
- }
-
- @Override
- public void close() {
-
- }
-
- @Override
- public boolean hasNull() {
- return !baseData.noNulls;
- }
-
- @Override
- public int numNulls() {
- if (baseData.isRepeating) {
- if (baseData.isNull[0]) {
- return batchSize;
- } else {
- return 0;
- }
- } else if (baseData.noNulls) {
- return 0;
- } else {
- int count = 0;
- for (int i = 0; i < batchSize; i++) {
- if (baseData.isNull[i]) count++;
- }
- return count;
- }
- }
-
- /* A helper method to get the row index in a column. */
- private int getRowIndex(int rowId) {
- return baseData.isRepeating ? 0 : rowId;
- }
-
- @Override
- public boolean isNullAt(int rowId) {
- return baseData.isNull[getRowIndex(rowId)];
- }
-
- @Override
- public boolean getBoolean(int rowId) {
- return longData.vector[getRowIndex(rowId)] == 1;
- }
-
- @Override
- public byte getByte(int rowId) {
- return (byte) longData.vector[getRowIndex(rowId)];
- }
-
- @Override
- public short getShort(int rowId) {
- return (short) longData.vector[getRowIndex(rowId)];
- }
-
- @Override
- public int getInt(int rowId) {
- int value = (int) longData.vector[getRowIndex(rowId)];
- if (isDate) {
- return RebaseDateTime.rebaseJulianToGregorianDays(value);
- } else {
- return value;
- }
- }
-
- @Override
- public long getLong(int rowId) {
- int index = getRowIndex(rowId);
- if (isTimestamp) {
- return DateTimeUtils.fromJavaTimestamp(timestampData.asScratchTimestamp(index));
- } else {
- return longData.vector[index];
- }
- }
-
- @Override
- public float getFloat(int rowId) {
- return (float) doubleData.vector[getRowIndex(rowId)];
- }
-
- @Override
- public double getDouble(int rowId) {
- return doubleData.vector[getRowIndex(rowId)];
- }
-
- @Override
- public Decimal getDecimal(int rowId, int precision, int scale) {
- if (isNullAt(rowId)) return null;
- BigDecimal data = decimalData.vector[getRowIndex(rowId)].getHiveDecimal().bigDecimalValue();
- return Decimal.apply(data, precision, scale);
- }
-
- @Override
- public UTF8String getUTF8String(int rowId) {
- if (isNullAt(rowId)) return null;
- int index = getRowIndex(rowId);
- BytesColumnVector col = bytesData;
- return UTF8String.fromBytes(col.vector[index], col.start[index], col.length[index]);
- }
-
- @Override
- public byte[] getBinary(int rowId) {
- if (isNullAt(rowId)) return null;
- int index = getRowIndex(rowId);
- byte[] binary = new byte[bytesData.length[index]];
- System.arraycopy(bytesData.vector[index], bytesData.start[index], binary, 0, binary.length);
- return binary;
- }
-
- @Override
- public ColumnarArray getArray(int rowId) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public ColumnarMap getMap(int rowId) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public org.apache.spark.sql.vectorized.ColumnVector getChild(int ordinal) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/DaysWritable.scala b/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/DaysWritable.scala
deleted file mode 100644
index 1dccf0ca1fae..000000000000
--- a/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/DaysWritable.scala
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.sql.execution.datasources.orc
-
-import java.io.{DataInput, DataOutput, IOException}
-import java.sql.Date
-
-import org.apache.hadoop.io.WritableUtils
-import org.apache.orc.storage.serde2.io.DateWritable
-
-import org.apache.spark.sql.catalyst.util.RebaseDateTime.{rebaseGregorianToJulianDays, rebaseJulianToGregorianDays}
-
-/**
- * The class accepts/returns days in Gregorian calendar and rebase them
- * via conversion to local date in Julian calendar for dates before 1582-10-15
- * in read/write for backward compatibility with Spark 2.4 and earlier versions.
- *
- * This is a clone of `org.apache.spark.sql.execution.datasources.DaysWritable`.
- * The class is cloned because Hive ORC v1.2 uses different `DateWritable`:
- * - v1.2: `org.apache.orc.storage.serde2.io.DateWritable`
- * - v2.3 and `HiveInspectors`: `org.apache.hadoop.hive.serde2.io.DateWritable`
- *
- * @param gregorianDays The number of days since the epoch 1970-01-01 in
- * Gregorian calendar.
- * @param julianDays The number of days since the epoch 1970-01-01 in
- * Julian calendar.
- */
-class DaysWritable(
- var gregorianDays: Int,
- var julianDays: Int)
- extends DateWritable {
-
- def this() = this(0, 0)
- def this(gregorianDays: Int) =
- this(gregorianDays, rebaseGregorianToJulianDays(gregorianDays))
- def this(dateWritable: DateWritable) = {
- this(
- gregorianDays = dateWritable match {
- case daysWritable: DaysWritable => daysWritable.gregorianDays
- case dateWritable: DateWritable =>
- rebaseJulianToGregorianDays(dateWritable.getDays)
- },
- julianDays = dateWritable.getDays)
- }
-
- override def getDays: Int = julianDays
- override def get(): Date = new Date(DateWritable.daysToMillis(julianDays))
-
- override def set(d: Int): Unit = {
- gregorianDays = d
- julianDays = rebaseGregorianToJulianDays(d)
- }
-
- @throws[IOException]
- override def write(out: DataOutput): Unit = {
- WritableUtils.writeVInt(out, julianDays)
- }
-
- @throws[IOException]
- override def readFields(in: DataInput): Unit = {
- julianDays = WritableUtils.readVInt(in)
- gregorianDays = rebaseJulianToGregorianDays(julianDays)
- }
-}
diff --git a/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala b/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala
deleted file mode 100644
index 0e657bfe6623..000000000000
--- a/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.sql.execution.datasources.orc
-
-import java.time.{Instant, LocalDate}
-
-import org.apache.orc.storage.common.`type`.HiveDecimal
-import org.apache.orc.storage.ql.io.sarg.{PredicateLeaf, SearchArgument}
-import org.apache.orc.storage.ql.io.sarg.SearchArgument.Builder
-import org.apache.orc.storage.ql.io.sarg.SearchArgumentFactory.newBuilder
-import org.apache.orc.storage.serde2.io.HiveDecimalWritable
-
-import org.apache.spark.SparkException
-import org.apache.spark.sql.catalyst.util.DateTimeUtils.{instantToMicros, localDateToDays, toJavaDate, toJavaTimestamp}
-import org.apache.spark.sql.internal.SQLConf
-import org.apache.spark.sql.sources.Filter
-import org.apache.spark.sql.types._
-
-/**
- * Helper object for building ORC `SearchArgument`s, which are used for ORC predicate push-down.
- *
- * Due to limitation of ORC `SearchArgument` builder, we had to implement separate checking and
- * conversion passes through the Filter to make sure we only convert predicates that are known
- * to be convertible.
- *
- * An ORC `SearchArgument` must be built in one pass using a single builder. For example, you can't
- * build `a = 1` and `b = 2` first, and then combine them into `a = 1 AND b = 2`. This is quite
- * different from the cases in Spark SQL or Parquet, where complex filters can be easily built using
- * existing simpler ones.
- *
- * The annoying part is that, `SearchArgument` builder methods like `startAnd()`, `startOr()`, and
- * `startNot()` mutate internal state of the builder instance. This forces us to translate all
- * convertible filters with a single builder instance. However, if we try to translate a filter
- * before checking whether it can be converted or not, we may end up with a builder whose internal
- * state is inconsistent in the case of an inconvertible filter.
- *
- * For example, to convert an `And` filter with builder `b`, we call `b.startAnd()` first, and then
- * try to convert its children. Say we convert `left` child successfully, but find that `right`
- * child is inconvertible. Alas, `b.startAnd()` call can't be rolled back, and `b` is inconsistent
- * now.
- *
- * The workaround employed here is to trim the Spark filters before trying to convert them. This
- * way, we can only do the actual conversion on the part of the Filter that is known to be
- * convertible.
- *
- * P.S.: Hive seems to use `SearchArgument` together with `ExprNodeGenericFuncDesc` only. Usage of
- * builder methods mentioned above can only be found in test code, where all tested filters are
- * known to be convertible.
- */
-private[sql] object OrcFilters extends OrcFiltersBase {
-
- /**
- * Create ORC filter as a SearchArgument instance.
- */
- def createFilter(schema: StructType, filters: Seq[Filter]): Option[SearchArgument] = {
- val dataTypeMap = OrcFilters.getSearchableTypeMap(schema, SQLConf.get.caseSensitiveAnalysis)
- // Combines all convertible filters using `And` to produce a single conjunction
- val conjunctionOptional = buildTree(convertibleFilters(schema, dataTypeMap, filters))
- conjunctionOptional.map { conjunction =>
- // Then tries to build a single ORC `SearchArgument` for the conjunction predicate.
- // The input predicate is fully convertible. There should not be any empty result in the
- // following recursive method call `buildSearchArgument`.
- buildSearchArgument(dataTypeMap, conjunction, newBuilder).build()
- }
- }
-
- def convertibleFilters(
- schema: StructType,
- dataTypeMap: Map[String, OrcPrimitiveField],
- filters: Seq[Filter]): Seq[Filter] = {
- import org.apache.spark.sql.sources._
-
- def convertibleFiltersHelper(
- filter: Filter,
- canPartialPushDown: Boolean): Option[Filter] = filter match {
- // At here, it is not safe to just convert one side and remove the other side
- // if we do not understand what the parent filters are.
- //
- // Here is an example used to explain the reason.
- // Let's say we have NOT(a = 2 AND b in ('1')) and we do not understand how to
- // convert b in ('1'). If we only convert a = 2, we will end up with a filter
- // NOT(a = 2), which will generate wrong results.
- //
- // Pushing one side of AND down is only safe to do at the top level or in the child
- // AND before hitting NOT or OR conditions, and in this case, the unsupported predicate
- // can be safely removed.
- case And(left, right) =>
- val leftResultOptional = convertibleFiltersHelper(left, canPartialPushDown)
- val rightResultOptional = convertibleFiltersHelper(right, canPartialPushDown)
- (leftResultOptional, rightResultOptional) match {
- case (Some(leftResult), Some(rightResult)) => Some(And(leftResult, rightResult))
- case (Some(leftResult), None) if canPartialPushDown => Some(leftResult)
- case (None, Some(rightResult)) if canPartialPushDown => Some(rightResult)
- case _ => None
- }
-
- // The Or predicate is convertible when both of its children can be pushed down.
- // That is to say, if one/both of the children can be partially pushed down, the Or
- // predicate can be partially pushed down as well.
- //
- // Here is an example used to explain the reason.
- // Let's say we have
- // (a1 AND a2) OR (b1 AND b2),
- // a1 and b1 is convertible, while a2 and b2 is not.
- // The predicate can be converted as
- // (a1 OR b1) AND (a1 OR b2) AND (a2 OR b1) AND (a2 OR b2)
- // As per the logical in And predicate, we can push down (a1 OR b1).
- case Or(left, right) =>
- for {
- lhs <- convertibleFiltersHelper(left, canPartialPushDown)
- rhs <- convertibleFiltersHelper(right, canPartialPushDown)
- } yield Or(lhs, rhs)
- case Not(pred) =>
- val childResultOptional = convertibleFiltersHelper(pred, canPartialPushDown = false)
- childResultOptional.map(Not)
- case other =>
- for (_ <- buildLeafSearchArgument(dataTypeMap, other, newBuilder())) yield other
- }
- filters.flatMap { filter =>
- convertibleFiltersHelper(filter, true)
- }
- }
-
- /**
- * Get PredicateLeafType which is corresponding to the given DataType.
- */
- def getPredicateLeafType(dataType: DataType): PredicateLeaf.Type = dataType match {
- case BooleanType => PredicateLeaf.Type.BOOLEAN
- case ByteType | ShortType | IntegerType | LongType => PredicateLeaf.Type.LONG
- case FloatType | DoubleType => PredicateLeaf.Type.FLOAT
- case StringType => PredicateLeaf.Type.STRING
- case DateType => PredicateLeaf.Type.DATE
- case TimestampType => PredicateLeaf.Type.TIMESTAMP
- case _: DecimalType => PredicateLeaf.Type.DECIMAL
- case _ => throw new UnsupportedOperationException(s"DataType: ${dataType.catalogString}")
- }
-
- /**
- * Cast literal values for filters.
- *
- * We need to cast to long because ORC raises exceptions
- * at 'checkLiteralType' of SearchArgumentImpl.java.
- */
- private def castLiteralValue(value: Any, dataType: DataType): Any = dataType match {
- case ByteType | ShortType | IntegerType | LongType =>
- value.asInstanceOf[Number].longValue
- case FloatType | DoubleType =>
- value.asInstanceOf[Number].doubleValue()
- case _: DecimalType =>
- new HiveDecimalWritable(HiveDecimal.create(value.asInstanceOf[java.math.BigDecimal]))
- case _: DateType if value.isInstanceOf[LocalDate] =>
- toJavaDate(localDateToDays(value.asInstanceOf[LocalDate]))
- case _: TimestampType if value.isInstanceOf[Instant] =>
- toJavaTimestamp(instantToMicros(value.asInstanceOf[Instant]))
- case _ => value
- }
-
- /**
- * Build a SearchArgument and return the builder so far.
- *
- * @param dataTypeMap a map from the attribute name to its data type.
- * @param expression the input predicates, which should be fully convertible to SearchArgument.
- * @param builder the input SearchArgument.Builder.
- * @return the builder so far.
- */
- private def buildSearchArgument(
- dataTypeMap: Map[String, OrcPrimitiveField],
- expression: Filter,
- builder: Builder): Builder = {
- import org.apache.spark.sql.sources._
-
- expression match {
- case And(left, right) =>
- val lhs = buildSearchArgument(dataTypeMap, left, builder.startAnd())
- val rhs = buildSearchArgument(dataTypeMap, right, lhs)
- rhs.end()
-
- case Or(left, right) =>
- val lhs = buildSearchArgument(dataTypeMap, left, builder.startOr())
- val rhs = buildSearchArgument(dataTypeMap, right, lhs)
- rhs.end()
-
- case Not(child) =>
- buildSearchArgument(dataTypeMap, child, builder.startNot()).end()
-
- case other =>
- buildLeafSearchArgument(dataTypeMap, other, builder).getOrElse {
- throw new SparkException(
- "The input filter of OrcFilters.buildSearchArgument should be fully convertible.")
- }
- }
- }
-
- /**
- * Build a SearchArgument for a leaf predicate and return the builder so far.
- *
- * @param dataTypeMap a map from the attribute name to its data type.
- * @param expression the input filter predicates.
- * @param builder the input SearchArgument.Builder.
- * @return the builder so far.
- */
- private def buildLeafSearchArgument(
- dataTypeMap: Map[String, OrcPrimitiveField],
- expression: Filter,
- builder: Builder): Option[Builder] = {
- def getType(attribute: String): PredicateLeaf.Type =
- getPredicateLeafType(dataTypeMap(attribute).fieldType)
-
- import org.apache.spark.sql.sources._
-
- // NOTE: For all case branches dealing with leaf predicates below, the additional `startAnd()`
- // call is mandatory. ORC `SearchArgument` builder requires that all leaf predicates must be
- // wrapped by a "parent" predicate (`And`, `Or`, or `Not`).
- expression match {
- case EqualTo(name, value) if dataTypeMap.contains(name) =>
- val castedValue = castLiteralValue(value, dataTypeMap(name).fieldType)
- Some(builder.startAnd()
- .equals(dataTypeMap(name).fieldName, getType(name), castedValue).end())
-
- case EqualNullSafe(name, value) if dataTypeMap.contains(name) =>
- val castedValue = castLiteralValue(value, dataTypeMap(name).fieldType)
- Some(builder.startAnd()
- .nullSafeEquals(dataTypeMap(name).fieldName, getType(name), castedValue).end())
-
- case LessThan(name, value) if dataTypeMap.contains(name) =>
- val castedValue = castLiteralValue(value, dataTypeMap(name).fieldType)
- Some(builder.startAnd()
- .lessThan(dataTypeMap(name).fieldName, getType(name), castedValue).end())
-
- case LessThanOrEqual(name, value) if dataTypeMap.contains(name) =>
- val castedValue = castLiteralValue(value, dataTypeMap(name).fieldType)
- Some(builder.startAnd()
- .lessThanEquals(dataTypeMap(name).fieldName, getType(name), castedValue).end())
-
- case GreaterThan(name, value) if dataTypeMap.contains(name) =>
- val castedValue = castLiteralValue(value, dataTypeMap(name).fieldType)
- Some(builder.startNot()
- .lessThanEquals(dataTypeMap(name).fieldName, getType(name), castedValue).end())
-
- case GreaterThanOrEqual(name, value) if dataTypeMap.contains(name) =>
- val castedValue = castLiteralValue(value, dataTypeMap(name).fieldType)
- Some(builder.startNot()
- .lessThan(dataTypeMap(name).fieldName, getType(name), castedValue).end())
-
- case IsNull(name) if dataTypeMap.contains(name) =>
- Some(builder.startAnd().isNull(dataTypeMap(name).fieldName, getType(name)).end())
-
- case IsNotNull(name) if dataTypeMap.contains(name) =>
- Some(builder.startNot().isNull(dataTypeMap(name).fieldName, getType(name)).end())
-
- case In(name, values) if dataTypeMap.contains(name) =>
- val castedValues = values.map(v => castLiteralValue(v, dataTypeMap(name).fieldType))
- Some(builder.startAnd().in(dataTypeMap(name).fieldName, getType(name),
- castedValues.map(_.asInstanceOf[AnyRef]): _*).end())
-
- case _ => None
- }
- }
-}
-
diff --git a/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala b/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala
deleted file mode 100644
index 7fbc1cd205b1..000000000000
--- a/sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcShimUtils.scala
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.sql.execution.datasources.orc
-
-import org.apache.orc.storage.common.`type`.HiveDecimal
-import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch
-import org.apache.orc.storage.ql.io.sarg.{SearchArgument => OrcSearchArgument}
-import org.apache.orc.storage.ql.io.sarg.PredicateLeaf.{Operator => OrcOperator}
-import org.apache.orc.storage.serde2.io.{DateWritable, HiveDecimalWritable}
-
-import org.apache.spark.sql.catalyst.expressions.SpecializedGetters
-import org.apache.spark.sql.types.Decimal
-
-/**
- * Various utilities for ORC used to upgrade the built-in Hive.
- */
-private[sql] object OrcShimUtils {
-
- class VectorizedRowBatchWrap(val batch: VectorizedRowBatch) {}
-
- private[sql] type Operator = OrcOperator
- private[sql] type SearchArgument = OrcSearchArgument
-
- def getGregorianDays(value: Any): Int = {
- new DaysWritable(value.asInstanceOf[DateWritable]).gregorianDays
- }
-
- def getDecimal(value: Any): Decimal = {
- val decimal = value.asInstanceOf[HiveDecimalWritable].getHiveDecimal()
- Decimal(decimal.bigDecimalValue, decimal.precision(), decimal.scale())
- }
-
- def getDateWritable(reuseObj: Boolean): (SpecializedGetters, Int) => DateWritable = {
- if (reuseObj) {
- val result = new DaysWritable()
- (getter, ordinal) =>
- result.set(getter.getInt(ordinal))
- result
- } else {
- (getter: SpecializedGetters, ordinal: Int) =>
- new DaysWritable(getter.getInt(ordinal))
- }
- }
-
- def getHiveDecimalWritable(precision: Int, scale: Int):
- (SpecializedGetters, Int) => HiveDecimalWritable = {
- (getter, ordinal) =>
- val d = getter.getDecimal(ordinal, precision, scale)
- new HiveDecimalWritable(HiveDecimal.create(d.toJavaBigDecimal))
- }
-}
diff --git a/sql/core/v1.2/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala b/sql/core/v1.2/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
deleted file mode 100644
index e159a0588dff..000000000000
--- a/sql/core/v1.2/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
+++ /dev/null
@@ -1,676 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.sql.execution.datasources.orc
-
-import java.math.MathContext
-import java.nio.charset.StandardCharsets
-import java.sql.{Date, Timestamp}
-
-import scala.collection.JavaConverters._
-
-import org.apache.orc.storage.ql.io.sarg.{PredicateLeaf, SearchArgument}
-import org.apache.orc.storage.ql.io.sarg.SearchArgumentFactory.newBuilder
-
-import org.apache.spark.{SparkConf, SparkException}
-import org.apache.spark.sql.{AnalysisException, Column, DataFrame, Row}
-import org.apache.spark.sql.catalyst.dsl.expressions._
-import org.apache.spark.sql.catalyst.expressions._
-import org.apache.spark.sql.catalyst.planning.PhysicalOperation
-import org.apache.spark.sql.execution.datasources.v2.DataSourceV2ScanRelation
-import org.apache.spark.sql.execution.datasources.v2.orc.OrcScan
-import org.apache.spark.sql.internal.SQLConf
-import org.apache.spark.sql.test.SharedSparkSession
-import org.apache.spark.sql.types._
-
-/**
- * A test suite that tests Apache ORC filter API based filter pushdown optimization.
- * OrcFilterSuite and HiveOrcFilterSuite is logically duplicated to provide the same test coverage.
- * The difference are the packages containing 'Predicate' and 'SearchArgument' classes.
- * - OrcFilterSuite uses 'org.apache.orc.storage.ql.io.sarg' package.
- * - HiveOrcFilterSuite uses 'org.apache.hadoop.hive.ql.io.sarg' package.
- */
-class OrcFilterSuite extends OrcTest with SharedSparkSession {
-
- override protected def sparkConf: SparkConf =
- super
- .sparkConf
- .set(SQLConf.USE_V1_SOURCE_LIST, "")
-
- protected def checkFilterPredicate(
- df: DataFrame,
- predicate: Predicate,
- checker: (SearchArgument) => Unit): Unit = {
- val output = predicate.collect { case a: Attribute => a }.distinct
- val query = df
- .select(output.map(e => Column(e)): _*)
- .where(Column(predicate))
-
- query.queryExecution.optimizedPlan match {
- case PhysicalOperation(_, filters, DataSourceV2ScanRelation(_, o: OrcScan, _)) =>
- assert(filters.nonEmpty, "No filter is analyzed from the given query")
- assert(o.pushedFilters.nonEmpty, "No filter is pushed down")
- val maybeFilter = OrcFilters.createFilter(query.schema, o.pushedFilters)
- assert(maybeFilter.isDefined, s"Couldn't generate filter predicate for ${o.pushedFilters}")
- checker(maybeFilter.get)
-
- case _ =>
- throw new AnalysisException("Can not match OrcTable in the query.")
- }
- }
-
- protected def checkFilterPredicate
- (predicate: Predicate, filterOperator: PredicateLeaf.Operator)
- (implicit df: DataFrame): Unit = {
- def checkComparisonOperator(filter: SearchArgument) = {
- val operator = filter.getLeaves.asScala
- assert(operator.map(_.getOperator).contains(filterOperator))
- }
- checkFilterPredicate(df, predicate, checkComparisonOperator)
- }
-
- protected def checkFilterPredicate
- (predicate: Predicate, stringExpr: String)
- (implicit df: DataFrame): Unit = {
- def checkLogicalOperator(filter: SearchArgument) = {
- assert(filter.toString == stringExpr)
- }
- checkFilterPredicate(df, predicate, checkLogicalOperator)
- }
-
- test("filter pushdown - integer") {
- withNestedOrcDataFrame((1 to 4).map(i => Tuple1(Option(i)))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val intAttr = df(colName).expr
- assert(df(colName).expr.dataType === IntegerType)
-
- checkFilterPredicate(intAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(intAttr === 1, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(intAttr <=> 1, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(intAttr < 2, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(intAttr > 3, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(intAttr <= 1, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(intAttr >= 4, PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal(1) === intAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(Literal(1) <=> intAttr, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal(2) > intAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(Literal(3) < intAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(1) >= intAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(4) <= intAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - long") {
- withNestedOrcDataFrame(
- (1 to 4).map(i => Tuple1(Option(i.toLong)))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val longAttr = df(colName).expr
- assert(df(colName).expr.dataType === LongType)
-
- checkFilterPredicate(longAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(longAttr === 1, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(longAttr <=> 1, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(longAttr < 2, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(longAttr > 3, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(longAttr <= 1, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(longAttr >= 4, PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal(1) === longAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(Literal(1) <=> longAttr, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal(2) > longAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(Literal(3) < longAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(1) >= longAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(4) <= longAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - float") {
- withNestedOrcDataFrame(
- (1 to 4).map(i => Tuple1(Option(i.toFloat)))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val floatAttr = df(colName).expr
- assert(df(colName).expr.dataType === FloatType)
-
- checkFilterPredicate(floatAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(floatAttr === 1, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(floatAttr <=> 1, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(floatAttr < 2, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(floatAttr > 3, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(floatAttr <= 1, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(floatAttr >= 4, PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal(1) === floatAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(Literal(1) <=> floatAttr, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal(2) > floatAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(Literal(3) < floatAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(1) >= floatAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(4) <= floatAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - double") {
- withNestedOrcDataFrame(
- (1 to 4).map(i => Tuple1(Option(i.toDouble)))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val doubleAttr = df(colName).expr
- assert(df(colName).expr.dataType === DoubleType)
-
- checkFilterPredicate(doubleAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(doubleAttr === 1, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(doubleAttr <=> 1, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(doubleAttr < 2, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(doubleAttr > 3, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(doubleAttr <= 1, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(doubleAttr >= 4, PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal(1) === doubleAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(Literal(1) <=> doubleAttr, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal(2) > doubleAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(Literal(3) < doubleAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(1) >= doubleAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(4) <= doubleAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - string") {
- withNestedOrcDataFrame((1 to 4).map(i => Tuple1(i.toString))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val strAttr = df(colName).expr
- assert(df(colName).expr.dataType === StringType)
-
- checkFilterPredicate(strAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(strAttr === "1", PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(strAttr <=> "1", PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(strAttr < "2", PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(strAttr > "3", PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(strAttr <= "1", PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(strAttr >= "4", PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal("1") === strAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(Literal("1") <=> strAttr, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal("2") > strAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(Literal("3") < strAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal("1") >= strAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal("4") <= strAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - boolean") {
- withNestedOrcDataFrame(
- (true :: false :: Nil).map(b => Tuple1.apply(Option(b)))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val booleanAttr = df(colName).expr
- assert(df(colName).expr.dataType === BooleanType)
-
- checkFilterPredicate(booleanAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(booleanAttr === true, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(booleanAttr <=> true, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(booleanAttr < true, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(booleanAttr > false, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(booleanAttr <= false, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(booleanAttr >= false, PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal(false) === booleanAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(Literal(false) <=> booleanAttr,
- PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal(false) > booleanAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(Literal(true) < booleanAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(true) >= booleanAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(true) <= booleanAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - decimal") {
- withNestedOrcDataFrame(
- (1 to 4).map(i => Tuple1.apply(BigDecimal.valueOf(i)))) { case (inputDF, colName, _) =>
- implicit val df: DataFrame = inputDF
-
- val decimalAttr = df(colName).expr
- assert(df(colName).expr.dataType === DecimalType(38, 18))
-
- checkFilterPredicate(decimalAttr.isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate(decimalAttr === BigDecimal.valueOf(1), PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(decimalAttr <=> BigDecimal.valueOf(1),
- PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate(decimalAttr < BigDecimal.valueOf(2), PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(decimalAttr > BigDecimal.valueOf(3),
- PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(decimalAttr <= BigDecimal.valueOf(1),
- PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(decimalAttr >= BigDecimal.valueOf(4), PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(
- Literal(BigDecimal.valueOf(1)) === decimalAttr, PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(
- Literal(BigDecimal.valueOf(1)) <=> decimalAttr, PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(
- Literal(BigDecimal.valueOf(2)) > decimalAttr, PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(
- Literal(BigDecimal.valueOf(3)) < decimalAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(
- Literal(BigDecimal.valueOf(1)) >= decimalAttr, PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(
- Literal(BigDecimal.valueOf(4)) <= decimalAttr, PredicateLeaf.Operator.LESS_THAN)
- }
- }
-
- test("filter pushdown - timestamp") {
- val input = Seq(
- "1000-01-01 01:02:03",
- "1582-10-01 00:11:22",
- "1900-01-01 23:59:59",
- "2020-05-25 10:11:12").map(Timestamp.valueOf)
-
- withOrcFile(input.map(Tuple1(_))) { path =>
- Seq(false, true).foreach { java8Api =>
- withSQLConf(SQLConf.DATETIME_JAVA8API_ENABLED.key -> java8Api.toString) {
- readFile(path) { implicit df =>
- val timestamps = input.map(Literal(_))
- checkFilterPredicate($"_1".isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate($"_1" === timestamps(0), PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate($"_1" <=> timestamps(0), PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate($"_1" < timestamps(1), PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate($"_1" > timestamps(2), PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate($"_1" <= timestamps(0), PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate($"_1" >= timestamps(3), PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(Literal(timestamps(0)) === $"_1", PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(
- Literal(timestamps(0)) <=> $"_1", PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(Literal(timestamps(1)) > $"_1", PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(
- Literal(timestamps(2)) < $"_1",
- PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(
- Literal(timestamps(0)) >= $"_1",
- PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(Literal(timestamps(3)) <= $"_1", PredicateLeaf.Operator.LESS_THAN)
- }
- }
- }
- }
- }
-
- test("filter pushdown - combinations with logical operators") {
- withOrcDataFrame((1 to 4).map(i => Tuple1(Option(i)))) { implicit df =>
- checkFilterPredicate(
- $"_1".isNotNull,
- "leaf-0 = (IS_NULL _1), expr = (not leaf-0)"
- )
- checkFilterPredicate(
- $"_1" =!= 1,
- "leaf-0 = (IS_NULL _1), leaf-1 = (EQUALS _1 1), expr = (and (not leaf-0) (not leaf-1))"
- )
- checkFilterPredicate(
- !($"_1" < 4),
- "leaf-0 = (IS_NULL _1), leaf-1 = (LESS_THAN _1 4), expr = (and (not leaf-0) (not leaf-1))"
- )
- checkFilterPredicate(
- $"_1" < 2 || $"_1" > 3,
- "leaf-0 = (LESS_THAN _1 2), leaf-1 = (LESS_THAN_EQUALS _1 3), " +
- "expr = (or leaf-0 (not leaf-1))"
- )
- checkFilterPredicate(
- $"_1" < 2 && $"_1" > 3,
- "leaf-0 = (IS_NULL _1), leaf-1 = (LESS_THAN _1 2), leaf-2 = (LESS_THAN_EQUALS _1 3), " +
- "expr = (and (not leaf-0) leaf-1 (not leaf-2))"
- )
- }
- }
-
- test("filter pushdown - date") {
- val input = Seq("2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21").map { day =>
- Date.valueOf(day)
- }
- withOrcFile(input.map(Tuple1(_))) { path =>
- Seq(false, true).foreach { java8Api =>
- withSQLConf(SQLConf.DATETIME_JAVA8API_ENABLED.key -> java8Api.toString) {
- readFile(path) { implicit df =>
- val dates = input.map(Literal(_))
- checkFilterPredicate($"_1".isNull, PredicateLeaf.Operator.IS_NULL)
-
- checkFilterPredicate($"_1" === dates(0), PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate($"_1" <=> dates(0), PredicateLeaf.Operator.NULL_SAFE_EQUALS)
-
- checkFilterPredicate($"_1" < dates(1), PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate($"_1" > dates(2), PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate($"_1" <= dates(0), PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate($"_1" >= dates(3), PredicateLeaf.Operator.LESS_THAN)
-
- checkFilterPredicate(dates(0) === $"_1", PredicateLeaf.Operator.EQUALS)
- checkFilterPredicate(dates(0) <=> $"_1", PredicateLeaf.Operator.NULL_SAFE_EQUALS)
- checkFilterPredicate(dates(1) > $"_1", PredicateLeaf.Operator.LESS_THAN)
- checkFilterPredicate(dates(2) < $"_1", PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(dates(0) >= $"_1", PredicateLeaf.Operator.LESS_THAN_EQUALS)
- checkFilterPredicate(dates(3) <= $"_1", PredicateLeaf.Operator.LESS_THAN)
- }
- }
- }
- }
- }
-
- test("no filter pushdown - non-supported types") {
- implicit class IntToBinary(int: Int) {
- def b: Array[Byte] = int.toString.getBytes(StandardCharsets.UTF_8)
- }
- // ArrayType
- withOrcDataFrame((1 to 4).map(i => Tuple1(Array(i)))) { implicit df =>
- checkNoFilterPredicate($"_1".isNull, noneSupported = true)
- }
- // BinaryType
- withOrcDataFrame((1 to 4).map(i => Tuple1(i.b))) { implicit df =>
- checkNoFilterPredicate($"_1" <=> 1.b, noneSupported = true)
- }
- // MapType
- withOrcDataFrame((1 to 4).map(i => Tuple1(Map(i -> i)))) { implicit df =>
- checkNoFilterPredicate($"_1".isNotNull, noneSupported = true)
- }
- }
-
- test("SPARK-12218 and SPARK-25699 Converting conjunctions into ORC SearchArguments") {
- import org.apache.spark.sql.sources._
- // The `LessThan` should be converted while the `StringContains` shouldn't
- val schema = new StructType(
- Array(
- StructField("a", IntegerType, nullable = true),
- StructField("b", StringType, nullable = true)))
- assertResult("leaf-0 = (LESS_THAN a 10), expr = leaf-0") {
- OrcFilters.createFilter(schema, Array(
- LessThan("a", 10),
- StringContains("b", "prefix")
- )).get.toString
- }
-
- // The `LessThan` should be converted while the whole inner `And` shouldn't
- assertResult("leaf-0 = (LESS_THAN a 10), expr = leaf-0") {
- OrcFilters.createFilter(schema, Array(
- LessThan("a", 10),
- Not(And(
- GreaterThan("a", 1),
- StringContains("b", "prefix")
- ))
- )).get.toString
- }
-
- // Safely remove unsupported `StringContains` predicate and push down `LessThan`
- assertResult("leaf-0 = (LESS_THAN a 10), expr = leaf-0") {
- OrcFilters.createFilter(schema, Array(
- And(
- LessThan("a", 10),
- StringContains("b", "prefix")
- )
- )).get.toString
- }
-
- // Safely remove unsupported `StringContains` predicate, push down `LessThan` and `GreaterThan`.
- assertResult("leaf-0 = (LESS_THAN a 10), leaf-1 = (LESS_THAN_EQUALS a 1)," +
- " expr = (and leaf-0 (not leaf-1))") {
- OrcFilters.createFilter(schema, Array(
- And(
- And(
- LessThan("a", 10),
- StringContains("b", "prefix")
- ),
- GreaterThan("a", 1)
- )
- )).get.toString
- }
- }
-
- test("SPARK-27699 Converting disjunctions into ORC SearchArguments") {
- import org.apache.spark.sql.sources._
- // The `LessThan` should be converted while the `StringContains` shouldn't
- val schema = new StructType(
- Array(
- StructField("a", IntegerType, nullable = true),
- StructField("b", StringType, nullable = true)))
-
- // The predicate `StringContains` predicate is not able to be pushed down.
- assertResult("leaf-0 = (LESS_THAN_EQUALS a 10), leaf-1 = (LESS_THAN a 1)," +
- " expr = (or (not leaf-0) leaf-1)") {
- OrcFilters.createFilter(schema, Array(
- Or(
- GreaterThan("a", 10),
- And(
- StringContains("b", "prefix"),
- LessThan("a", 1)
- )
- )
- )).get.toString
- }
-
- assertResult("leaf-0 = (LESS_THAN_EQUALS a 10), leaf-1 = (LESS_THAN a 1)," +
- " expr = (or (not leaf-0) leaf-1)") {
- OrcFilters.createFilter(schema, Array(
- Or(
- And(
- GreaterThan("a", 10),
- StringContains("b", "foobar")
- ),
- And(
- StringContains("b", "prefix"),
- LessThan("a", 1)
- )
- )
- )).get.toString
- }
-
- assert(OrcFilters.createFilter(schema, Array(
- Or(
- StringContains("b", "foobar"),
- And(
- StringContains("b", "prefix"),
- LessThan("a", 1)
- )
- )
- )).isEmpty)
- }
-
- test("SPARK-27160: Fix casting of the DecimalType literal") {
- import org.apache.spark.sql.sources._
- val schema = StructType(Array(StructField("a", DecimalType(3, 2))))
- assertResult("leaf-0 = (LESS_THAN a 3.14), expr = leaf-0") {
- OrcFilters.createFilter(schema, Array(
- LessThan(
- "a",
- new java.math.BigDecimal(3.14, MathContext.DECIMAL64).setScale(2)))
- ).get.toString
- }
- }
-
- test("SPARK-32622: case sensitivity in predicate pushdown") {
- withTempPath { dir =>
- val count = 10
- val tableName = "spark_32622"
- val tableDir1 = dir.getAbsoluteFile + "/table1"
-
- // Physical ORC files have both `A` and `a` fields.
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true") {
- spark.range(count).repartition(count).selectExpr("id - 1 as A", "id as a")
- .write.mode("overwrite").orc(tableDir1)
- }
-
- // Metastore table has both `A` and `a` fields too.
- withTable(tableName) {
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true") {
- sql(
- s"""
- |CREATE TABLE $tableName (A LONG, a LONG) USING ORC LOCATION '$tableDir1'
- """.stripMargin)
-
- checkAnswer(sql(s"select a, A from $tableName"), (0 until count).map(c => Row(c, c - 1)))
-
- val actual1 = stripSparkFilter(sql(s"select A from $tableName where A < 0"))
- assert(actual1.count() == 1)
-
- val actual2 = stripSparkFilter(sql(s"select A from $tableName where a < 0"))
- assert(actual2.count() == 0)
- }
-
- // Exception thrown for ambiguous case.
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "false") {
- val e = intercept[AnalysisException] {
- sql(s"select a from $tableName where a < 0").collect()
- }
- assert(e.getMessage.contains(
- "Reference 'a' is ambiguous"))
- }
- }
-
- // Metastore table has only `A` field.
- withTable(tableName) {
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "false") {
- sql(
- s"""
- |CREATE TABLE $tableName (A LONG) USING ORC LOCATION '$tableDir1'
- """.stripMargin)
-
- val e = intercept[SparkException] {
- sql(s"select A from $tableName where A < 0").collect()
- }
- assert(e.getCause.isInstanceOf[RuntimeException] && e.getCause.getMessage.contains(
- """Found duplicate field(s) "A": [A, a] in case-insensitive mode"""))
- }
- }
-
- // Physical ORC files have only `A` field.
- val tableDir2 = dir.getAbsoluteFile + "/table2"
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true") {
- spark.range(count).repartition(count).selectExpr("id - 1 as A")
- .write.mode("overwrite").orc(tableDir2)
- }
-
- withTable(tableName) {
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "false") {
- sql(
- s"""
- |CREATE TABLE $tableName (a LONG) USING ORC LOCATION '$tableDir2'
- """.stripMargin)
-
- checkAnswer(sql(s"select a from $tableName"), (0 until count).map(c => Row(c - 1)))
-
- val actual = stripSparkFilter(sql(s"select a from $tableName where a < 0"))
- assert(actual.count() == 1)
- }
- }
-
- withTable(tableName) {
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true") {
- sql(
- s"""
- |CREATE TABLE $tableName (A LONG) USING ORC LOCATION '$tableDir2'
- """.stripMargin)
-
- checkAnswer(sql(s"select A from $tableName"), (0 until count).map(c => Row(c - 1)))
-
- val actual = stripSparkFilter(sql(s"select A from $tableName where A < 0"))
- assert(actual.count() == 1)
- }
- }
- }
- }
-
- test("SPARK-32646: Case-insensitive field resolution for pushdown when reading ORC") {
- import org.apache.spark.sql.sources._
-
- def getOrcFilter(
- schema: StructType,
- filters: Seq[Filter],
- caseSensitive: String): Option[SearchArgument] = {
- var orcFilter: Option[SearchArgument] = None
- withSQLConf(SQLConf.CASE_SENSITIVE.key -> caseSensitive) {
- orcFilter =
- OrcFilters.createFilter(schema, filters)
- }
- orcFilter
- }
-
- def testFilter(
- schema: StructType,
- filters: Seq[Filter],
- expected: SearchArgument): Unit = {
- val caseSensitiveFilters = getOrcFilter(schema, filters, "true")
- val caseInsensitiveFilters = getOrcFilter(schema, filters, "false")
-
- assert(caseSensitiveFilters.isEmpty)
- assert(caseInsensitiveFilters.isDefined)
-
- assert(caseInsensitiveFilters.get.getLeaves().size() > 0)
- assert(caseInsensitiveFilters.get.getLeaves().size() == expected.getLeaves().size())
- (0 until expected.getLeaves().size()).foreach { index =>
- assert(caseInsensitiveFilters.get.getLeaves().get(index) == expected.getLeaves().get(index))
- }
- }
-
- val schema1 = StructType(Seq(StructField("cint", IntegerType)))
- testFilter(schema1, Seq(GreaterThan("CINT", 1)),
- newBuilder.startNot()
- .lessThanEquals("cint", OrcFilters.getPredicateLeafType(IntegerType), 1L).`end`().build())
- testFilter(schema1, Seq(
- And(GreaterThan("CINT", 1), EqualTo("Cint", 2))),
- newBuilder.startAnd()
- .startNot()
- .lessThanEquals("cint", OrcFilters.getPredicateLeafType(IntegerType), 1L).`end`()
- .equals("cint", OrcFilters.getPredicateLeafType(IntegerType), 2L)
- .`end`().build())
-
- // Nested column case
- val schema2 = StructType(Seq(StructField("a",
- StructType(Seq(StructField("cint", IntegerType))))))
-
- testFilter(schema2, Seq(GreaterThan("A.CINT", 1)),
- newBuilder.startNot()
- .lessThanEquals("a.cint", OrcFilters.getPredicateLeafType(IntegerType), 1L).`end`().build())
- testFilter(schema2, Seq(GreaterThan("a.CINT", 1)),
- newBuilder.startNot()
- .lessThanEquals("a.cint", OrcFilters.getPredicateLeafType(IntegerType), 1L).`end`().build())
- testFilter(schema2, Seq(GreaterThan("A.cint", 1)),
- newBuilder.startNot()
- .lessThanEquals("a.cint", OrcFilters.getPredicateLeafType(IntegerType), 1L).`end`().build())
- testFilter(schema2, Seq(
- And(GreaterThan("a.CINT", 1), EqualTo("a.Cint", 2))),
- newBuilder.startAnd()
- .startNot()
- .lessThanEquals("a.cint", OrcFilters.getPredicateLeafType(IntegerType), 1L).`end`()
- .equals("a.cint", OrcFilters.getPredicateLeafType(IntegerType), 2L)
- .`end`().build())
- }
-}
-
diff --git a/sql/hive-thriftserver/v2.3/if/TCLIService.thrift b/sql/hive-thriftserver/if/TCLIService.thrift
similarity index 100%
rename from sql/hive-thriftserver/v2.3/if/TCLIService.thrift
rename to sql/hive-thriftserver/if/TCLIService.thrift
diff --git a/sql/hive-thriftserver/pom.xml b/sql/hive-thriftserver/pom.xml
index 5bf20b209aff..4a96afe9df20 100644
--- a/sql/hive-thriftserver/pom.xml
+++ b/sql/hive-thriftserver/pom.xml
@@ -146,9 +146,7 @@
- v${hive.version.short}/src/gen/java
- v${hive.version.short}/src/main/java
- v${hive.version.short}/src/main/scala
+ src/gen/java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java
rename to sql/hive-thriftserver/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/AbstractService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/AbstractService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/AbstractService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/AbstractService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/CompositeService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/CompositeService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/CompositeService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/CompositeService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/CookieSigner.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/CookieSigner.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/CookieSigner.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/CookieSigner.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/ServiceOperations.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/ServiceOperations.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/ServiceOperations.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/ServiceOperations.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/ServiceUtils.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/ServiceUtils.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/ServiceUtils.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/ServiceUtils.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/CLIService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/CLIService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ColumnValue.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ColumnValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ColumnValue.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ColumnValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/FetchOrientation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/FetchOrientation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/FetchOrientation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/FetchOrientation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/GetInfoType.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/GetInfoType.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/GetInfoType.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/GetInfoType.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/GetInfoValue.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/GetInfoValue.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/GetInfoValue.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/GetInfoValue.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/Handle.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/Handle.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/Handle.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/Handle.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/HiveSQLException.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/HiveSQLException.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/HiveSQLException.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/HiveSQLException.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ICLIService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ICLIService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/ICLIService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/ICLIService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/OperationHandle.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/OperationHandle.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/OperationHandle.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/OperationHandle.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/OperationState.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/OperationState.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/OperationState.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/OperationState.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/OperationType.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/OperationType.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/OperationType.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/OperationType.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/RowBasedSet.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/RowBasedSet.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/RowBasedSet.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/RowBasedSet.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/RowSet.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/RowSet.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/RowSet.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/RowSet.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/RowSetFactory.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/RowSetFactory.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/RowSetFactory.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/RowSetFactory.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/SessionHandle.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/SessionHandle.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/SessionHandle.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/SessionHandle.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/TableSchema.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/TableSchema.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/TableSchema.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/TableSchema.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/Operation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/Operation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/Operation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/Operation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSession.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSession.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSession.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSession.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/SessionManager.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/server/HiveServer2.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/server/HiveServer2.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/server/HiveServer2.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/server/HiveServer2.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java
rename to sql/hive-thriftserver/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java
diff --git a/sql/hive-thriftserver/v2.3/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala
similarity index 100%
rename from sql/hive-thriftserver/v2.3/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala
rename to sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala
diff --git a/sql/hive-thriftserver/v1.2/if/TCLIService.thrift b/sql/hive-thriftserver/v1.2/if/TCLIService.thrift
deleted file mode 100644
index 225e31973781..000000000000
--- a/sql/hive-thriftserver/v1.2/if/TCLIService.thrift
+++ /dev/null
@@ -1,1173 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Coding Conventions for this file:
-//
-// Structs/Enums/Unions
-// * Struct, Enum, and Union names begin with a "T",
-// and use a capital letter for each new word, with no underscores.
-// * All fields should be declared as either optional or required.
-//
-// Functions
-// * Function names start with a capital letter and have a capital letter for
-// each new word, with no underscores.
-// * Each function should take exactly one parameter, named TFunctionNameReq,
-// and should return either void or TFunctionNameResp. This convention allows
-// incremental updates.
-//
-// Services
-// * Service names begin with the letter "T", use a capital letter for each
-// new word (with no underscores), and end with the word "Service".
-
-namespace java org.apache.hive.service.cli.thrift
-namespace cpp apache.hive.service.cli.thrift
-
-// List of protocol versions. A new token should be
-// added to the end of this list every time a change is made.
-enum TProtocolVersion {
- HIVE_CLI_SERVICE_PROTOCOL_V1,
-
- // V2 adds support for asynchronous execution
- HIVE_CLI_SERVICE_PROTOCOL_V2
-
- // V3 add varchar type, primitive type qualifiers
- HIVE_CLI_SERVICE_PROTOCOL_V3
-
- // V4 add decimal precision/scale, char type
- HIVE_CLI_SERVICE_PROTOCOL_V4
-
- // V5 adds error details when GetOperationStatus returns in error state
- HIVE_CLI_SERVICE_PROTOCOL_V5
-
- // V6 uses binary type for binary payload (was string) and uses columnar result set
- HIVE_CLI_SERVICE_PROTOCOL_V6
-
- // V7 adds support for delegation token based connection
- HIVE_CLI_SERVICE_PROTOCOL_V7
-
- // V8 adds support for interval types
- HIVE_CLI_SERVICE_PROTOCOL_V8
-}
-
-enum TTypeId {
- BOOLEAN_TYPE,
- TINYINT_TYPE,
- SMALLINT_TYPE,
- INT_TYPE,
- BIGINT_TYPE,
- FLOAT_TYPE,
- DOUBLE_TYPE,
- STRING_TYPE,
- TIMESTAMP_TYPE,
- BINARY_TYPE,
- ARRAY_TYPE,
- MAP_TYPE,
- STRUCT_TYPE,
- UNION_TYPE,
- USER_DEFINED_TYPE,
- DECIMAL_TYPE,
- NULL_TYPE,
- DATE_TYPE,
- VARCHAR_TYPE,
- CHAR_TYPE,
- INTERVAL_YEAR_MONTH_TYPE,
- INTERVAL_DAY_TIME_TYPE
-}
-
-const set PRIMITIVE_TYPES = [
- TTypeId.BOOLEAN_TYPE,
- TTypeId.TINYINT_TYPE,
- TTypeId.SMALLINT_TYPE,
- TTypeId.INT_TYPE,
- TTypeId.BIGINT_TYPE,
- TTypeId.FLOAT_TYPE,
- TTypeId.DOUBLE_TYPE,
- TTypeId.STRING_TYPE,
- TTypeId.TIMESTAMP_TYPE,
- TTypeId.BINARY_TYPE,
- TTypeId.DECIMAL_TYPE,
- TTypeId.NULL_TYPE,
- TTypeId.DATE_TYPE,
- TTypeId.VARCHAR_TYPE,
- TTypeId.CHAR_TYPE,
- TTypeId.INTERVAL_YEAR_MONTH_TYPE,
- TTypeId.INTERVAL_DAY_TIME_TYPE
-]
-
-const set COMPLEX_TYPES = [
- TTypeId.ARRAY_TYPE
- TTypeId.MAP_TYPE
- TTypeId.STRUCT_TYPE
- TTypeId.UNION_TYPE
- TTypeId.USER_DEFINED_TYPE
-]
-
-const set COLLECTION_TYPES = [
- TTypeId.ARRAY_TYPE
- TTypeId.MAP_TYPE
-]
-
-const map TYPE_NAMES = {
- TTypeId.BOOLEAN_TYPE: "BOOLEAN",
- TTypeId.TINYINT_TYPE: "TINYINT",
- TTypeId.SMALLINT_TYPE: "SMALLINT",
- TTypeId.INT_TYPE: "INT",
- TTypeId.BIGINT_TYPE: "BIGINT",
- TTypeId.FLOAT_TYPE: "FLOAT",
- TTypeId.DOUBLE_TYPE: "DOUBLE",
- TTypeId.STRING_TYPE: "STRING",
- TTypeId.TIMESTAMP_TYPE: "TIMESTAMP",
- TTypeId.BINARY_TYPE: "BINARY",
- TTypeId.ARRAY_TYPE: "ARRAY",
- TTypeId.MAP_TYPE: "MAP",
- TTypeId.STRUCT_TYPE: "STRUCT",
- TTypeId.UNION_TYPE: "UNIONTYPE",
- TTypeId.DECIMAL_TYPE: "DECIMAL",
- TTypeId.NULL_TYPE: "NULL"
- TTypeId.DATE_TYPE: "DATE"
- TTypeId.VARCHAR_TYPE: "VARCHAR"
- TTypeId.CHAR_TYPE: "CHAR"
- TTypeId.INTERVAL_YEAR_MONTH_TYPE: "INTERVAL_YEAR_MONTH"
- TTypeId.INTERVAL_DAY_TIME_TYPE: "INTERVAL_DAY_TIME"
-}
-
-// Thrift does not support recursively defined types or forward declarations,
-// which makes it difficult to represent Hive's nested types.
-// To get around these limitations TTypeDesc employs a type list that maps
-// integer "pointers" to TTypeEntry objects. The following examples show
-// how different types are represented using this scheme:
-//
-// "INT":
-// TTypeDesc {
-// types = [
-// TTypeEntry.primitive_entry {
-// type = INT_TYPE
-// }
-// ]
-// }
-//
-// "ARRAY":
-// TTypeDesc {
-// types = [
-// TTypeEntry.array_entry {
-// object_type_ptr = 1
-// },
-// TTypeEntry.primitive_entry {
-// type = INT_TYPE
-// }
-// ]
-// }
-//
-// "MAP":
-// TTypeDesc {
-// types = [
-// TTypeEntry.map_entry {
-// key_type_ptr = 1
-// value_type_ptr = 2
-// },
-// TTypeEntry.primitive_entry {
-// type = INT_TYPE
-// },
-// TTypeEntry.primitive_entry {
-// type = STRING_TYPE
-// }
-// ]
-// }
-
-typedef i32 TTypeEntryPtr
-
-// Valid TTypeQualifiers key names
-const string CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength"
-
-// Type qualifier key name for decimal
-const string PRECISION = "precision"
-const string SCALE = "scale"
-
-union TTypeQualifierValue {
- 1: optional i32 i32Value
- 2: optional string stringValue
-}
-
-// Type qualifiers for primitive type.
-struct TTypeQualifiers {
- 1: required map qualifiers
-}
-
-// Type entry for a primitive type.
-struct TPrimitiveTypeEntry {
- // The primitive type token. This must satisfy the condition
- // that type is in the PRIMITIVE_TYPES set.
- 1: required TTypeId type
- 2: optional TTypeQualifiers typeQualifiers
-}
-
-// Type entry for an ARRAY type.
-struct TArrayTypeEntry {
- 1: required TTypeEntryPtr objectTypePtr
-}
-
-// Type entry for a MAP type.
-struct TMapTypeEntry {
- 1: required TTypeEntryPtr keyTypePtr
- 2: required TTypeEntryPtr valueTypePtr
-}
-
-// Type entry for a STRUCT type.
-struct TStructTypeEntry {
- 1: required map nameToTypePtr
-}
-
-// Type entry for a UNIONTYPE type.
-struct TUnionTypeEntry {
- 1: required map nameToTypePtr
-}
-
-struct TUserDefinedTypeEntry {
- // The fully qualified name of the class implementing this type.
- 1: required string typeClassName
-}
-
-// We use a union here since Thrift does not support inheritance.
-union TTypeEntry {
- 1: TPrimitiveTypeEntry primitiveEntry
- 2: TArrayTypeEntry arrayEntry
- 3: TMapTypeEntry mapEntry
- 4: TStructTypeEntry structEntry
- 5: TUnionTypeEntry unionEntry
- 6: TUserDefinedTypeEntry userDefinedTypeEntry
-}
-
-// Type descriptor for columns.
-struct TTypeDesc {
- // The "top" type is always the first element of the list.
- // If the top type is an ARRAY, MAP, STRUCT, or UNIONTYPE
- // type, then subsequent elements represent nested types.
- 1: required list types
-}
-
-// A result set column descriptor.
-struct TColumnDesc {
- // The name of the column
- 1: required string columnName
-
- // The type descriptor for this column
- 2: required TTypeDesc typeDesc
-
- // The ordinal position of this column in the schema
- 3: required i32 position
-
- 4: optional string comment
-}
-
-// Metadata used to describe the schema (column names, types, comments)
-// of result sets.
-struct TTableSchema {
- 1: required list columns
-}
-
-// A Boolean column value.
-struct TBoolValue {
- // NULL if value is unset.
- 1: optional bool value
-}
-
-// A Byte column value.
-struct TByteValue {
- // NULL if value is unset.
- 1: optional byte value
-}
-
-// A signed, 16 bit column value.
-struct TI16Value {
- // NULL if value is unset
- 1: optional i16 value
-}
-
-// A signed, 32 bit column value
-struct TI32Value {
- // NULL if value is unset
- 1: optional i32 value
-}
-
-// A signed 64 bit column value
-struct TI64Value {
- // NULL if value is unset
- 1: optional i64 value
-}
-
-// A floating point 64 bit column value
-struct TDoubleValue {
- // NULL if value is unset
- 1: optional double value
-}
-
-struct TStringValue {
- // NULL if value is unset
- 1: optional string value
-}
-
-// A single column value in a result set.
-// Note that Hive's type system is richer than Thrift's,
-// so in some cases we have to map multiple Hive types
-// to the same Thrift type. On the client-side this is
-// disambiguated by looking at the Schema of the
-// result set.
-union TColumnValue {
- 1: TBoolValue boolVal // BOOLEAN
- 2: TByteValue byteVal // TINYINT
- 3: TI16Value i16Val // SMALLINT
- 4: TI32Value i32Val // INT
- 5: TI64Value i64Val // BIGINT, TIMESTAMP
- 6: TDoubleValue doubleVal // FLOAT, DOUBLE
- 7: TStringValue stringVal // STRING, LIST, MAP, STRUCT, UNIONTYPE, BINARY, DECIMAL, NULL, INTERVAL_YEAR_MONTH, INTERVAL_DAY_TIME
-}
-
-// Represents a row in a rowset.
-struct TRow {
- 1: required list colVals
-}
-
-struct TBoolColumn {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TByteColumn {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TI16Column {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TI32Column {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TI64Column {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TDoubleColumn {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TStringColumn {
- 1: required list values
- 2: required binary nulls
-}
-
-struct TBinaryColumn {
- 1: required list values
- 2: required binary nulls
-}
-
-// Note that Hive's type system is richer than Thrift's,
-// so in some cases we have to map multiple Hive types
-// to the same Thrift type. On the client-side this is
-// disambiguated by looking at the Schema of the
-// result set.
-union TColumn {
- 1: TBoolColumn boolVal // BOOLEAN
- 2: TByteColumn byteVal // TINYINT
- 3: TI16Column i16Val // SMALLINT
- 4: TI32Column i32Val // INT
- 5: TI64Column i64Val // BIGINT, TIMESTAMP
- 6: TDoubleColumn doubleVal // FLOAT, DOUBLE
- 7: TStringColumn stringVal // STRING, LIST, MAP, STRUCT, UNIONTYPE, DECIMAL, NULL
- 8: TBinaryColumn binaryVal // BINARY
-}
-
-// Represents a rowset
-struct TRowSet {
- // The starting row offset of this rowset.
- 1: required i64 startRowOffset
- 2: required list rows
- 3: optional list columns
-}
-
-// The return status code contained in each response.
-enum TStatusCode {
- SUCCESS_STATUS,
- SUCCESS_WITH_INFO_STATUS,
- STILL_EXECUTING_STATUS,
- ERROR_STATUS,
- INVALID_HANDLE_STATUS
-}
-
-// The return status of a remote request
-struct TStatus {
- 1: required TStatusCode statusCode
-
- // If status is SUCCESS_WITH_INFO, info_msgs may be populated with
- // additional diagnostic information.
- 2: optional list infoMessages
-
- // If status is ERROR, then the following fields may be set
- 3: optional string sqlState // as defined in the ISO/IEF CLI specification
- 4: optional i32 errorCode // internal error code
- 5: optional string errorMessage
-}
-
-// The state of an operation (i.e. a query or other
-// asynchronous operation that generates a result set)
-// on the server.
-enum TOperationState {
- // The operation has been initialized
- INITIALIZED_STATE,
-
- // The operation is running. In this state the result
- // set is not available.
- RUNNING_STATE,
-
- // The operation has completed. When an operation is in
- // this state its result set may be fetched.
- FINISHED_STATE,
-
- // The operation was canceled by a client
- CANCELED_STATE,
-
- // The operation was closed by a client
- CLOSED_STATE,
-
- // The operation failed due to an error
- ERROR_STATE,
-
- // The operation is in an unrecognized state
- UKNOWN_STATE,
-
- // The operation is in an pending state
- PENDING_STATE,
-}
-
-// A string identifier. This is interpreted literally.
-typedef string TIdentifier
-
-// A search pattern.
-//
-// Valid search pattern characters:
-// '_': Any single character.
-// '%': Any sequence of zero or more characters.
-// '\': Escape character used to include special characters,
-// e.g. '_', '%', '\'. If a '\' precedes a non-special
-// character it has no special meaning and is interpreted
-// literally.
-typedef string TPattern
-
-
-// A search pattern or identifier. Used as input
-// parameter for many of the catalog functions.
-typedef string TPatternOrIdentifier
-
-struct THandleIdentifier {
- // 16 byte globally unique identifier
- // This is the public ID of the handle and
- // can be used for reporting.
- 1: required binary guid,
-
- // 16 byte secret generated by the server
- // and used to verify that the handle is not
- // being hijacked by another user.
- 2: required binary secret,
-}
-
-// Client-side handle to persistent
-// session information on the server-side.
-struct TSessionHandle {
- 1: required THandleIdentifier sessionId
-}
-
-// The subtype of an OperationHandle.
-enum TOperationType {
- EXECUTE_STATEMENT,
- GET_TYPE_INFO,
- GET_CATALOGS,
- GET_SCHEMAS,
- GET_TABLES,
- GET_TABLE_TYPES,
- GET_COLUMNS,
- GET_FUNCTIONS,
- UNKNOWN,
-}
-
-// Client-side reference to a task running
-// asynchronously on the server.
-struct TOperationHandle {
- 1: required THandleIdentifier operationId
- 2: required TOperationType operationType
-
- // If hasResultSet = TRUE, then this operation
- // generates a result set that can be fetched.
- // Note that the result set may be empty.
- //
- // If hasResultSet = FALSE, then this operation
- // does not generate a result set, and calling
- // GetResultSetMetadata or FetchResults against
- // this OperationHandle will generate an error.
- 3: required bool hasResultSet
-
- // For operations that don't generate result sets,
- // modifiedRowCount is either:
- //
- // 1) The number of rows that were modified by
- // the DML operation (e.g. number of rows inserted,
- // number of rows deleted, etc).
- //
- // 2) 0 for operations that don't modify or add rows.
- //
- // 3) < 0 if the operation is capable of modifiying rows,
- // but Hive is unable to determine how many rows were
- // modified. For example, Hive's LOAD DATA command
- // doesn't generate row count information because
- // Hive doesn't inspect the data as it is loaded.
- //
- // modifiedRowCount is unset if the operation generates
- // a result set.
- 4: optional double modifiedRowCount
-}
-
-
-// OpenSession()
-//
-// Open a session (connection) on the server against
-// which operations may be executed.
-struct TOpenSessionReq {
- // The version of the HiveServer2 protocol that the client is using.
- 1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8
-
- // Username and password for authentication.
- // Depending on the authentication scheme being used,
- // this information may instead be provided by a lower
- // protocol layer, in which case these fields may be
- // left unset.
- 2: optional string username
- 3: optional string password
-
- // Configuration overlay which is applied when the session is
- // first created.
- 4: optional map configuration
-}
-
-struct TOpenSessionResp {
- 1: required TStatus status
-
- // The protocol version that the server is using.
- 2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8
-
- // Session Handle
- 3: optional TSessionHandle sessionHandle
-
- // The configuration settings for this session.
- 4: optional map configuration
-}
-
-
-// CloseSession()
-//
-// Closes the specified session and frees any resources
-// currently allocated to that session. Any open
-// operations in that session will be canceled.
-struct TCloseSessionReq {
- 1: required TSessionHandle sessionHandle
-}
-
-struct TCloseSessionResp {
- 1: required TStatus status
-}
-
-
-
-enum TGetInfoType {
- CLI_MAX_DRIVER_CONNECTIONS = 0,
- CLI_MAX_CONCURRENT_ACTIVITIES = 1,
- CLI_DATA_SOURCE_NAME = 2,
- CLI_FETCH_DIRECTION = 8,
- CLI_SERVER_NAME = 13,
- CLI_SEARCH_PATTERN_ESCAPE = 14,
- CLI_DBMS_NAME = 17,
- CLI_DBMS_VER = 18,
- CLI_ACCESSIBLE_TABLES = 19,
- CLI_ACCESSIBLE_PROCEDURES = 20,
- CLI_CURSOR_COMMIT_BEHAVIOR = 23,
- CLI_DATA_SOURCE_READ_ONLY = 25,
- CLI_DEFAULT_TXN_ISOLATION = 26,
- CLI_IDENTIFIER_CASE = 28,
- CLI_IDENTIFIER_QUOTE_CHAR = 29,
- CLI_MAX_COLUMN_NAME_LEN = 30,
- CLI_MAX_CURSOR_NAME_LEN = 31,
- CLI_MAX_SCHEMA_NAME_LEN = 32,
- CLI_MAX_CATALOG_NAME_LEN = 34,
- CLI_MAX_TABLE_NAME_LEN = 35,
- CLI_SCROLL_CONCURRENCY = 43,
- CLI_TXN_CAPABLE = 46,
- CLI_USER_NAME = 47,
- CLI_TXN_ISOLATION_OPTION = 72,
- CLI_INTEGRITY = 73,
- CLI_GETDATA_EXTENSIONS = 81,
- CLI_NULL_COLLATION = 85,
- CLI_ALTER_TABLE = 86,
- CLI_ORDER_BY_COLUMNS_IN_SELECT = 90,
- CLI_SPECIAL_CHARACTERS = 94,
- CLI_MAX_COLUMNS_IN_GROUP_BY = 97,
- CLI_MAX_COLUMNS_IN_INDEX = 98,
- CLI_MAX_COLUMNS_IN_ORDER_BY = 99,
- CLI_MAX_COLUMNS_IN_SELECT = 100,
- CLI_MAX_COLUMNS_IN_TABLE = 101,
- CLI_MAX_INDEX_SIZE = 102,
- CLI_MAX_ROW_SIZE = 104,
- CLI_MAX_STATEMENT_LEN = 105,
- CLI_MAX_TABLES_IN_SELECT = 106,
- CLI_MAX_USER_NAME_LEN = 107,
- CLI_OJ_CAPABILITIES = 115,
-
- CLI_XOPEN_CLI_YEAR = 10000,
- CLI_CURSOR_SENSITIVITY = 10001,
- CLI_DESCRIBE_PARAMETER = 10002,
- CLI_CATALOG_NAME = 10003,
- CLI_COLLATION_SEQ = 10004,
- CLI_MAX_IDENTIFIER_LEN = 10005,
-}
-
-union TGetInfoValue {
- 1: string stringValue
- 2: i16 smallIntValue
- 3: i32 integerBitmask
- 4: i32 integerFlag
- 5: i32 binaryValue
- 6: i64 lenValue
-}
-
-// GetInfo()
-//
-// This function is based on ODBC's CLIGetInfo() function.
-// The function returns general information about the data source
-// using the same keys as ODBC.
-struct TGetInfoReq {
- // The session to run this request against
- 1: required TSessionHandle sessionHandle
-
- 2: required TGetInfoType infoType
-}
-
-struct TGetInfoResp {
- 1: required TStatus status
-
- 2: required TGetInfoValue infoValue
-}
-
-
-// ExecuteStatement()
-//
-// Execute a statement.
-// The returned OperationHandle can be used to check on the
-// status of the statement, and to fetch results once the
-// statement has finished executing.
-struct TExecuteStatementReq {
- // The session to execute the statement against
- 1: required TSessionHandle sessionHandle
-
- // The statement to be executed (DML, DDL, SET, etc)
- 2: required string statement
-
- // Configuration properties that are overlayed on top of the
- // the existing session configuration before this statement
- // is executed. These properties apply to this statement
- // only and will not affect the subsequent state of the Session.
- 3: optional map confOverlay
-
- // Execute asynchronously when runAsync is true
- 4: optional bool runAsync = false
-}
-
-struct TExecuteStatementResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-// GetTypeInfo()
-//
-// Get information about types supported by the HiveServer instance.
-// The information is returned as a result set which can be fetched
-// using the OperationHandle provided in the response.
-//
-// Refer to the documentation for ODBC's CLIGetTypeInfo function for
-// the format of the result set.
-struct TGetTypeInfoReq {
- // The session to run this request against.
- 1: required TSessionHandle sessionHandle
-}
-
-struct TGetTypeInfoResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetCatalogs()
-//
-// Returns the list of catalogs (databases)
-// Results are ordered by TABLE_CATALOG
-//
-// Resultset columns :
-// col1
-// name: TABLE_CAT
-// type: STRING
-// desc: Catalog name. NULL if not applicable.
-//
-struct TGetCatalogsReq {
- // Session to run this request against
- 1: required TSessionHandle sessionHandle
-}
-
-struct TGetCatalogsResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetSchemas()
-//
-// Retrieves the schema names available in this database.
-// The results are ordered by TABLE_CATALOG and TABLE_SCHEM.
-// col1
-// name: TABLE_SCHEM
-// type: STRING
-// desc: schema name
-// col2
-// name: TABLE_CATALOG
-// type: STRING
-// desc: catalog name
-struct TGetSchemasReq {
- // Session to run this request against
- 1: required TSessionHandle sessionHandle
-
- // Name of the catalog. Must not contain a search pattern.
- 2: optional TIdentifier catalogName
-
- // schema name or pattern
- 3: optional TPatternOrIdentifier schemaName
-}
-
-struct TGetSchemasResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetTables()
-//
-// Returns a list of tables with catalog, schema, and table
-// type information. The information is returned as a result
-// set which can be fetched using the OperationHandle
-// provided in the response.
-// Results are ordered by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM, and TABLE_NAME
-//
-// Result Set Columns:
-//
-// col1
-// name: TABLE_CAT
-// type: STRING
-// desc: Catalog name. NULL if not applicable.
-//
-// col2
-// name: TABLE_SCHEM
-// type: STRING
-// desc: Schema name.
-//
-// col3
-// name: TABLE_NAME
-// type: STRING
-// desc: Table name.
-//
-// col4
-// name: TABLE_TYPE
-// type: STRING
-// desc: The table type, e.g. "TABLE", "VIEW", etc.
-//
-// col5
-// name: REMARKS
-// type: STRING
-// desc: Comments about the table
-//
-struct TGetTablesReq {
- // Session to run this request against
- 1: required TSessionHandle sessionHandle
-
- // Name of the catalog or a search pattern.
- 2: optional TPatternOrIdentifier catalogName
-
- // Name of the schema or a search pattern.
- 3: optional TPatternOrIdentifier schemaName
-
- // Name of the table or a search pattern.
- 4: optional TPatternOrIdentifier tableName
-
- // List of table types to match
- // e.g. "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
- // "LOCAL TEMPORARY", "ALIAS", "SYNONYM", etc.
- 5: optional list tableTypes
-}
-
-struct TGetTablesResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetTableTypes()
-//
-// Returns the table types available in this database.
-// The results are ordered by table type.
-//
-// col1
-// name: TABLE_TYPE
-// type: STRING
-// desc: Table type name.
-struct TGetTableTypesReq {
- // Session to run this request against
- 1: required TSessionHandle sessionHandle
-}
-
-struct TGetTableTypesResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetColumns()
-//
-// Returns a list of columns in the specified tables.
-// The information is returned as a result set which can be fetched
-// using the OperationHandle provided in the response.
-// Results are ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME,
-// and ORDINAL_POSITION.
-//
-// Result Set Columns are the same as those for the ODBC CLIColumns
-// function.
-//
-struct TGetColumnsReq {
- // Session to run this request against
- 1: required TSessionHandle sessionHandle
-
- // Name of the catalog. Must not contain a search pattern.
- 2: optional TIdentifier catalogName
-
- // Schema name or search pattern
- 3: optional TPatternOrIdentifier schemaName
-
- // Table name or search pattern
- 4: optional TPatternOrIdentifier tableName
-
- // Column name or search pattern
- 5: optional TPatternOrIdentifier columnName
-}
-
-struct TGetColumnsResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetFunctions()
-//
-// Returns a list of functions supported by the data source. The
-// behavior of this function matches
-// java.sql.DatabaseMetaData.getFunctions() both in terms of
-// inputs and outputs.
-//
-// Result Set Columns:
-//
-// col1
-// name: FUNCTION_CAT
-// type: STRING
-// desc: Function catalog (may be null)
-//
-// col2
-// name: FUNCTION_SCHEM
-// type: STRING
-// desc: Function schema (may be null)
-//
-// col3
-// name: FUNCTION_NAME
-// type: STRING
-// desc: Function name. This is the name used to invoke the function.
-//
-// col4
-// name: REMARKS
-// type: STRING
-// desc: Explanatory comment on the function.
-//
-// col5
-// name: FUNCTION_TYPE
-// type: SMALLINT
-// desc: Kind of function. One of:
-// * functionResultUnknown - Cannot determine if a return value or a table
-// will be returned.
-// * functionNoTable - Does not a return a table.
-// * functionReturnsTable - Returns a table.
-//
-// col6
-// name: SPECIFIC_NAME
-// type: STRING
-// desc: The name which uniquely identifies this function within its schema.
-// In this case this is the fully qualified class name of the class
-// that implements this function.
-//
-struct TGetFunctionsReq {
- // Session to run this request against
- 1: required TSessionHandle sessionHandle
-
- // A catalog name; must match the catalog name as it is stored in the
- // database; "" retrieves those without a catalog; null means
- // that the catalog name should not be used to narrow the search.
- 2: optional TIdentifier catalogName
-
- // A schema name pattern; must match the schema name as it is stored
- // in the database; "" retrieves those without a schema; null means
- // that the schema name should not be used to narrow the search.
- 3: optional TPatternOrIdentifier schemaName
-
- // A function name pattern; must match the function name as it is stored
- // in the database.
- 4: required TPatternOrIdentifier functionName
-}
-
-struct TGetFunctionsResp {
- 1: required TStatus status
- 2: optional TOperationHandle operationHandle
-}
-
-
-// GetOperationStatus()
-//
-// Get the status of an operation running on the server.
-struct TGetOperationStatusReq {
- // Session to run this request against
- 1: required TOperationHandle operationHandle
-}
-
-struct TGetOperationStatusResp {
- 1: required TStatus status
- 2: optional TOperationState operationState
-
- // If operationState is ERROR_STATE, then the following fields may be set
- // sqlState as defined in the ISO/IEF CLI specification
- 3: optional string sqlState
-
- // Internal error code
- 4: optional i32 errorCode
-
- // Error message
- 5: optional string errorMessage
-}
-
-
-// CancelOperation()
-//
-// Cancels processing on the specified operation handle and
-// frees any resources which were allocated.
-struct TCancelOperationReq {
- // Operation to cancel
- 1: required TOperationHandle operationHandle
-}
-
-struct TCancelOperationResp {
- 1: required TStatus status
-}
-
-
-// CloseOperation()
-//
-// Given an operation in the FINISHED, CANCELED,
-// or ERROR states, CloseOperation() will free
-// all of the resources which were allocated on
-// the server to service the operation.
-struct TCloseOperationReq {
- 1: required TOperationHandle operationHandle
-}
-
-struct TCloseOperationResp {
- 1: required TStatus status
-}
-
-
-// GetResultSetMetadata()
-//
-// Retrieves schema information for the specified operation
-struct TGetResultSetMetadataReq {
- // Operation for which to fetch result set schema information
- 1: required TOperationHandle operationHandle
-}
-
-struct TGetResultSetMetadataResp {
- 1: required TStatus status
- 2: optional TTableSchema schema
-}
-
-
-enum TFetchOrientation {
- // Get the next rowset. The fetch offset is ignored.
- FETCH_NEXT,
-
- // Get the previous rowset. The fetch offset is ignored.
- FETCH_PRIOR,
-
- // Return the rowset at the given fetch offset relative
- // to the current rowset.
- // NOT SUPPORTED
- FETCH_RELATIVE,
-
- // Return the rowset at the specified fetch offset.
- // NOT SUPPORTED
- FETCH_ABSOLUTE,
-
- // Get the first rowset in the result set.
- FETCH_FIRST,
-
- // Get the last rowset in the result set.
- // NOT SUPPORTED
- FETCH_LAST
-}
-
-// FetchResults()
-//
-// Fetch rows from the server corresponding to
-// a particular OperationHandle.
-struct TFetchResultsReq {
- // Operation from which to fetch results.
- 1: required TOperationHandle operationHandle
-
- // The fetch orientation. This must be either
- // FETCH_NEXT, FETCH_PRIOR or FETCH_FIRST. Defaults to FETCH_NEXT.
- 2: required TFetchOrientation orientation = TFetchOrientation.FETCH_NEXT
-
- // Max number of rows that should be returned in
- // the rowset.
- 3: required i64 maxRows
-
- // The type of a fetch results request. 0 represents Query output. 1 represents Log
- 4: optional i16 fetchType = 0
-}
-
-struct TFetchResultsResp {
- 1: required TStatus status
-
- // TRUE if there are more rows left to fetch from the server.
- 2: optional bool hasMoreRows
-
- // The rowset. This is optional so that we have the
- // option in the future of adding alternate formats for
- // representing result set data, e.g. delimited strings,
- // binary encoded, etc.
- 3: optional TRowSet results
-}
-
-// GetDelegationToken()
-// Retrieve delegation token for the current user
-struct TGetDelegationTokenReq {
- // session handle
- 1: required TSessionHandle sessionHandle
-
- // userid for the proxy user
- 2: required string owner
-
- // designated renewer userid
- 3: required string renewer
-}
-
-struct TGetDelegationTokenResp {
- // status of the request
- 1: required TStatus status
-
- // delegation token string
- 2: optional string delegationToken
-}
-
-// CancelDelegationToken()
-// Cancel the given delegation token
-struct TCancelDelegationTokenReq {
- // session handle
- 1: required TSessionHandle sessionHandle
-
- // delegation token to cancel
- 2: required string delegationToken
-}
-
-struct TCancelDelegationTokenResp {
- // status of the request
- 1: required TStatus status
-}
-
-// RenewDelegationToken()
-// Renew the given delegation token
-struct TRenewDelegationTokenReq {
- // session handle
- 1: required TSessionHandle sessionHandle
-
- // delegation token to renew
- 2: required string delegationToken
-}
-
-struct TRenewDelegationTokenResp {
- // status of the request
- 1: required TStatus status
-}
-
-service TCLIService {
-
- TOpenSessionResp OpenSession(1:TOpenSessionReq req);
-
- TCloseSessionResp CloseSession(1:TCloseSessionReq req);
-
- TGetInfoResp GetInfo(1:TGetInfoReq req);
-
- TExecuteStatementResp ExecuteStatement(1:TExecuteStatementReq req);
-
- TGetTypeInfoResp GetTypeInfo(1:TGetTypeInfoReq req);
-
- TGetCatalogsResp GetCatalogs(1:TGetCatalogsReq req);
-
- TGetSchemasResp GetSchemas(1:TGetSchemasReq req);
-
- TGetTablesResp GetTables(1:TGetTablesReq req);
-
- TGetTableTypesResp GetTableTypes(1:TGetTableTypesReq req);
-
- TGetColumnsResp GetColumns(1:TGetColumnsReq req);
-
- TGetFunctionsResp GetFunctions(1:TGetFunctionsReq req);
-
- TGetOperationStatusResp GetOperationStatus(1:TGetOperationStatusReq req);
-
- TCancelOperationResp CancelOperation(1:TCancelOperationReq req);
-
- TCloseOperationResp CloseOperation(1:TCloseOperationReq req);
-
- TGetResultSetMetadataResp GetResultSetMetadata(1:TGetResultSetMetadataReq req);
-
- TFetchResultsResp FetchResults(1:TFetchResultsReq req);
-
- TGetDelegationTokenResp GetDelegationToken(1:TGetDelegationTokenReq req);
-
- TCancelDelegationTokenResp CancelDelegationToken(1:TCancelDelegationTokenReq req);
-
- TRenewDelegationTokenResp RenewDelegationToken(1:TRenewDelegationTokenReq req);
-}
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TArrayTypeEntry.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TArrayTypeEntry.java
deleted file mode 100644
index 6323d34eac73..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TArrayTypeEntry.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TArrayTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TArrayTypeEntry");
-
- private static final org.apache.thrift.protocol.TField OBJECT_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("objectTypePtr", org.apache.thrift.protocol.TType.I32, (short)1);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TArrayTypeEntryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TArrayTypeEntryTupleSchemeFactory());
- }
-
- private int objectTypePtr; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- OBJECT_TYPE_PTR((short)1, "objectTypePtr");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // OBJECT_TYPE_PTR
- return OBJECT_TYPE_PTR;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __OBJECTTYPEPTR_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.OBJECT_TYPE_PTR, new org.apache.thrift.meta_data.FieldMetaData("objectTypePtr", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "TTypeEntryPtr")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TArrayTypeEntry.class, metaDataMap);
- }
-
- public TArrayTypeEntry() {
- }
-
- public TArrayTypeEntry(
- int objectTypePtr)
- {
- this();
- this.objectTypePtr = objectTypePtr;
- setObjectTypePtrIsSet(true);
- }
-
- /**
- * Performs a deep copy on other.
- */
- public TArrayTypeEntry(TArrayTypeEntry other) {
- __isset_bitfield = other.__isset_bitfield;
- this.objectTypePtr = other.objectTypePtr;
- }
-
- public TArrayTypeEntry deepCopy() {
- return new TArrayTypeEntry(this);
- }
-
- @Override
- public void clear() {
- setObjectTypePtrIsSet(false);
- this.objectTypePtr = 0;
- }
-
- public int getObjectTypePtr() {
- return this.objectTypePtr;
- }
-
- public void setObjectTypePtr(int objectTypePtr) {
- this.objectTypePtr = objectTypePtr;
- setObjectTypePtrIsSet(true);
- }
-
- public void unsetObjectTypePtr() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OBJECTTYPEPTR_ISSET_ID);
- }
-
- /** Returns true if field objectTypePtr is set (has been assigned a value) and false otherwise */
- public boolean isSetObjectTypePtr() {
- return EncodingUtils.testBit(__isset_bitfield, __OBJECTTYPEPTR_ISSET_ID);
- }
-
- public void setObjectTypePtrIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OBJECTTYPEPTR_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case OBJECT_TYPE_PTR:
- if (value == null) {
- unsetObjectTypePtr();
- } else {
- setObjectTypePtr((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case OBJECT_TYPE_PTR:
- return Integer.valueOf(getObjectTypePtr());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case OBJECT_TYPE_PTR:
- return isSetObjectTypePtr();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TArrayTypeEntry)
- return this.equals((TArrayTypeEntry)that);
- return false;
- }
-
- public boolean equals(TArrayTypeEntry that) {
- if (that == null)
- return false;
-
- boolean this_present_objectTypePtr = true;
- boolean that_present_objectTypePtr = true;
- if (this_present_objectTypePtr || that_present_objectTypePtr) {
- if (!(this_present_objectTypePtr && that_present_objectTypePtr))
- return false;
- if (this.objectTypePtr != that.objectTypePtr)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_objectTypePtr = true;
- builder.append(present_objectTypePtr);
- if (present_objectTypePtr)
- builder.append(objectTypePtr);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TArrayTypeEntry other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TArrayTypeEntry typedOther = (TArrayTypeEntry)other;
-
- lastComparison = Boolean.valueOf(isSetObjectTypePtr()).compareTo(typedOther.isSetObjectTypePtr());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetObjectTypePtr()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectTypePtr, typedOther.objectTypePtr);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TArrayTypeEntry(");
- boolean first = true;
-
- sb.append("objectTypePtr:");
- sb.append(this.objectTypePtr);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetObjectTypePtr()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'objectTypePtr' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TArrayTypeEntryStandardSchemeFactory implements SchemeFactory {
- public TArrayTypeEntryStandardScheme getScheme() {
- return new TArrayTypeEntryStandardScheme();
- }
- }
-
- private static class TArrayTypeEntryStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TArrayTypeEntry struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // OBJECT_TYPE_PTR
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.objectTypePtr = iprot.readI32();
- struct.setObjectTypePtrIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TArrayTypeEntry struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(OBJECT_TYPE_PTR_FIELD_DESC);
- oprot.writeI32(struct.objectTypePtr);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TArrayTypeEntryTupleSchemeFactory implements SchemeFactory {
- public TArrayTypeEntryTupleScheme getScheme() {
- return new TArrayTypeEntryTupleScheme();
- }
- }
-
- private static class TArrayTypeEntryTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TArrayTypeEntry struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.objectTypePtr);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TArrayTypeEntry struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.objectTypePtr = iprot.readI32();
- struct.setObjectTypePtrIsSet(true);
- }
- }
-
-}
-
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBinaryColumn.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBinaryColumn.java
deleted file mode 100644
index 6b1b054d1aca..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBinaryColumn.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TBinaryColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBinaryColumn");
-
- private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift.protocol.TField NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("nulls", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TBinaryColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TBinaryColumnTupleSchemeFactory());
- }
-
- private List values; // required
- private ByteBuffer nulls; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- VALUES((short)1, "values"),
- NULLS((short)2, "nulls");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // VALUES
- return VALUES;
- case 2: // NULLS
- return NULLS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
- tmpMap.put(_Fields.NULLS, new org.apache.thrift.meta_data.FieldMetaData("nulls", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TBinaryColumn.class, metaDataMap);
- }
-
- public TBinaryColumn() {
- }
-
- public TBinaryColumn(
- List values,
- ByteBuffer nulls)
- {
- this();
- this.values = values;
- this.nulls = nulls;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public TBinaryColumn(TBinaryColumn other) {
- if (other.isSetValues()) {
- List __this__values = new ArrayList();
- for (ByteBuffer other_element : other.values) {
- ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element);
-;
- __this__values.add(temp_binary_element);
- }
- this.values = __this__values;
- }
- if (other.isSetNulls()) {
- this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls);
-;
- }
- }
-
- public TBinaryColumn deepCopy() {
- return new TBinaryColumn(this);
- }
-
- @Override
- public void clear() {
- this.values = null;
- this.nulls = null;
- }
-
- public int getValuesSize() {
- return (this.values == null) ? 0 : this.values.size();
- }
-
- public java.util.Iterator getValuesIterator() {
- return (this.values == null) ? null : this.values.iterator();
- }
-
- public void addToValues(ByteBuffer elem) {
- if (this.values == null) {
- this.values = new ArrayList();
- }
- this.values.add(elem);
- }
-
- public List getValues() {
- return this.values;
- }
-
- public void setValues(List values) {
- this.values = values;
- }
-
- public void unsetValues() {
- this.values = null;
- }
-
- /** Returns true if field values is set (has been assigned a value) and false otherwise */
- public boolean isSetValues() {
- return this.values != null;
- }
-
- public void setValuesIsSet(boolean value) {
- if (!value) {
- this.values = null;
- }
- }
-
- public byte[] getNulls() {
- setNulls(org.apache.thrift.TBaseHelper.rightSize(nulls));
- return nulls == null ? null : nulls.array();
- }
-
- public ByteBuffer bufferForNulls() {
- return nulls;
- }
-
- public void setNulls(byte[] nulls) {
- setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls));
- }
-
- public void setNulls(ByteBuffer nulls) {
- this.nulls = nulls;
- }
-
- public void unsetNulls() {
- this.nulls = null;
- }
-
- /** Returns true if field nulls is set (has been assigned a value) and false otherwise */
- public boolean isSetNulls() {
- return this.nulls != null;
- }
-
- public void setNullsIsSet(boolean value) {
- if (!value) {
- this.nulls = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VALUES:
- if (value == null) {
- unsetValues();
- } else {
- setValues((List)value);
- }
- break;
-
- case NULLS:
- if (value == null) {
- unsetNulls();
- } else {
- setNulls((ByteBuffer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VALUES:
- return getValues();
-
- case NULLS:
- return getNulls();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case VALUES:
- return isSetValues();
- case NULLS:
- return isSetNulls();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TBinaryColumn)
- return this.equals((TBinaryColumn)that);
- return false;
- }
-
- public boolean equals(TBinaryColumn that) {
- if (that == null)
- return false;
-
- boolean this_present_values = true && this.isSetValues();
- boolean that_present_values = true && that.isSetValues();
- if (this_present_values || that_present_values) {
- if (!(this_present_values && that_present_values))
- return false;
- if (!this.values.equals(that.values))
- return false;
- }
-
- boolean this_present_nulls = true && this.isSetNulls();
- boolean that_present_nulls = true && that.isSetNulls();
- if (this_present_nulls || that_present_nulls) {
- if (!(this_present_nulls && that_present_nulls))
- return false;
- if (!this.nulls.equals(that.nulls))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_values = true && (isSetValues());
- builder.append(present_values);
- if (present_values)
- builder.append(values);
-
- boolean present_nulls = true && (isSetNulls());
- builder.append(present_nulls);
- if (present_nulls)
- builder.append(nulls);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TBinaryColumn other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TBinaryColumn typedOther = (TBinaryColumn)other;
-
- lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValues()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNulls()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TBinaryColumn(");
- boolean first = true;
-
- sb.append("values:");
- if (this.values == null) {
- sb.append("null");
- } else {
- sb.append(this.values);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("nulls:");
- if (this.nulls == null) {
- sb.append("null");
- } else {
- org.apache.thrift.TBaseHelper.toString(this.nulls, sb);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetValues()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' is unset! Struct:" + toString());
- }
-
- if (!isSetNulls()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TBinaryColumnStandardSchemeFactory implements SchemeFactory {
- public TBinaryColumnStandardScheme getScheme() {
- return new TBinaryColumnStandardScheme();
- }
- }
-
- private static class TBinaryColumnStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TBinaryColumn struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // VALUES
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list110 = iprot.readListBegin();
- struct.values = new ArrayList(_list110.size);
- for (int _i111 = 0; _i111 < _list110.size; ++_i111)
- {
- ByteBuffer _elem112; // optional
- _elem112 = iprot.readBinary();
- struct.values.add(_elem112);
- }
- iprot.readListEnd();
- }
- struct.setValuesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NULLS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.nulls = iprot.readBinary();
- struct.setNullsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TBinaryColumn struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.values != null) {
- oprot.writeFieldBegin(VALUES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
- for (ByteBuffer _iter113 : struct.values)
- {
- oprot.writeBinary(_iter113);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.nulls != null) {
- oprot.writeFieldBegin(NULLS_FIELD_DESC);
- oprot.writeBinary(struct.nulls);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TBinaryColumnTupleSchemeFactory implements SchemeFactory {
- public TBinaryColumnTupleScheme getScheme() {
- return new TBinaryColumnTupleScheme();
- }
- }
-
- private static class TBinaryColumnTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TBinaryColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.values.size());
- for (ByteBuffer _iter114 : struct.values)
- {
- oprot.writeBinary(_iter114);
- }
- }
- oprot.writeBinary(struct.nulls);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TBinaryColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- org.apache.thrift.protocol.TList _list115 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.values = new ArrayList(_list115.size);
- for (int _i116 = 0; _i116 < _list115.size; ++_i116)
- {
- ByteBuffer _elem117; // optional
- _elem117 = iprot.readBinary();
- struct.values.add(_elem117);
- }
- }
- struct.setValuesIsSet(true);
- struct.nulls = iprot.readBinary();
- struct.setNullsIsSet(true);
- }
- }
-
-}
-
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBoolColumn.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBoolColumn.java
deleted file mode 100644
index efd571cfdfbb..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBoolColumn.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TBoolColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBoolColumn");
-
- private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift.protocol.TField NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("nulls", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TBoolColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TBoolColumnTupleSchemeFactory());
- }
-
- private List values; // required
- private ByteBuffer nulls; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- VALUES((short)1, "values"),
- NULLS((short)2, "nulls");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // VALUES
- return VALUES;
- case 2: // NULLS
- return NULLS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))));
- tmpMap.put(_Fields.NULLS, new org.apache.thrift.meta_data.FieldMetaData("nulls", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TBoolColumn.class, metaDataMap);
- }
-
- public TBoolColumn() {
- }
-
- public TBoolColumn(
- List values,
- ByteBuffer nulls)
- {
- this();
- this.values = values;
- this.nulls = nulls;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public TBoolColumn(TBoolColumn other) {
- if (other.isSetValues()) {
- List __this__values = new ArrayList();
- for (Boolean other_element : other.values) {
- __this__values.add(other_element);
- }
- this.values = __this__values;
- }
- if (other.isSetNulls()) {
- this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls);
-;
- }
- }
-
- public TBoolColumn deepCopy() {
- return new TBoolColumn(this);
- }
-
- @Override
- public void clear() {
- this.values = null;
- this.nulls = null;
- }
-
- public int getValuesSize() {
- return (this.values == null) ? 0 : this.values.size();
- }
-
- public java.util.Iterator getValuesIterator() {
- return (this.values == null) ? null : this.values.iterator();
- }
-
- public void addToValues(boolean elem) {
- if (this.values == null) {
- this.values = new ArrayList();
- }
- this.values.add(elem);
- }
-
- public List getValues() {
- return this.values;
- }
-
- public void setValues(List values) {
- this.values = values;
- }
-
- public void unsetValues() {
- this.values = null;
- }
-
- /** Returns true if field values is set (has been assigned a value) and false otherwise */
- public boolean isSetValues() {
- return this.values != null;
- }
-
- public void setValuesIsSet(boolean value) {
- if (!value) {
- this.values = null;
- }
- }
-
- public byte[] getNulls() {
- setNulls(org.apache.thrift.TBaseHelper.rightSize(nulls));
- return nulls == null ? null : nulls.array();
- }
-
- public ByteBuffer bufferForNulls() {
- return nulls;
- }
-
- public void setNulls(byte[] nulls) {
- setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls));
- }
-
- public void setNulls(ByteBuffer nulls) {
- this.nulls = nulls;
- }
-
- public void unsetNulls() {
- this.nulls = null;
- }
-
- /** Returns true if field nulls is set (has been assigned a value) and false otherwise */
- public boolean isSetNulls() {
- return this.nulls != null;
- }
-
- public void setNullsIsSet(boolean value) {
- if (!value) {
- this.nulls = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VALUES:
- if (value == null) {
- unsetValues();
- } else {
- setValues((List)value);
- }
- break;
-
- case NULLS:
- if (value == null) {
- unsetNulls();
- } else {
- setNulls((ByteBuffer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VALUES:
- return getValues();
-
- case NULLS:
- return getNulls();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case VALUES:
- return isSetValues();
- case NULLS:
- return isSetNulls();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TBoolColumn)
- return this.equals((TBoolColumn)that);
- return false;
- }
-
- public boolean equals(TBoolColumn that) {
- if (that == null)
- return false;
-
- boolean this_present_values = true && this.isSetValues();
- boolean that_present_values = true && that.isSetValues();
- if (this_present_values || that_present_values) {
- if (!(this_present_values && that_present_values))
- return false;
- if (!this.values.equals(that.values))
- return false;
- }
-
- boolean this_present_nulls = true && this.isSetNulls();
- boolean that_present_nulls = true && that.isSetNulls();
- if (this_present_nulls || that_present_nulls) {
- if (!(this_present_nulls && that_present_nulls))
- return false;
- if (!this.nulls.equals(that.nulls))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_values = true && (isSetValues());
- builder.append(present_values);
- if (present_values)
- builder.append(values);
-
- boolean present_nulls = true && (isSetNulls());
- builder.append(present_nulls);
- if (present_nulls)
- builder.append(nulls);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TBoolColumn other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TBoolColumn typedOther = (TBoolColumn)other;
-
- lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValues()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNulls()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TBoolColumn(");
- boolean first = true;
-
- sb.append("values:");
- if (this.values == null) {
- sb.append("null");
- } else {
- sb.append(this.values);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("nulls:");
- if (this.nulls == null) {
- sb.append("null");
- } else {
- org.apache.thrift.TBaseHelper.toString(this.nulls, sb);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetValues()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' is unset! Struct:" + toString());
- }
-
- if (!isSetNulls()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TBoolColumnStandardSchemeFactory implements SchemeFactory {
- public TBoolColumnStandardScheme getScheme() {
- return new TBoolColumnStandardScheme();
- }
- }
-
- private static class TBoolColumnStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TBoolColumn struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // VALUES
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
- struct.values = new ArrayList(_list54.size);
- for (int _i55 = 0; _i55 < _list54.size; ++_i55)
- {
- boolean _elem56; // optional
- _elem56 = iprot.readBool();
- struct.values.add(_elem56);
- }
- iprot.readListEnd();
- }
- struct.setValuesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NULLS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.nulls = iprot.readBinary();
- struct.setNullsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TBoolColumn struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.values != null) {
- oprot.writeFieldBegin(VALUES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.values.size()));
- for (boolean _iter57 : struct.values)
- {
- oprot.writeBool(_iter57);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.nulls != null) {
- oprot.writeFieldBegin(NULLS_FIELD_DESC);
- oprot.writeBinary(struct.nulls);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TBoolColumnTupleSchemeFactory implements SchemeFactory {
- public TBoolColumnTupleScheme getScheme() {
- return new TBoolColumnTupleScheme();
- }
- }
-
- private static class TBoolColumnTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TBoolColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.values.size());
- for (boolean _iter58 : struct.values)
- {
- oprot.writeBool(_iter58);
- }
- }
- oprot.writeBinary(struct.nulls);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TBoolColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- org.apache.thrift.protocol.TList _list59 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, iprot.readI32());
- struct.values = new ArrayList(_list59.size);
- for (int _i60 = 0; _i60 < _list59.size; ++_i60)
- {
- boolean _elem61; // optional
- _elem61 = iprot.readBool();
- struct.values.add(_elem61);
- }
- }
- struct.setValuesIsSet(true);
- struct.nulls = iprot.readBinary();
- struct.setNullsIsSet(true);
- }
- }
-
-}
-
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBoolValue.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBoolValue.java
deleted file mode 100644
index c7495ee79e4b..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TBoolValue.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TBoolValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBoolValue");
-
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.BOOL, (short)1);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TBoolValueStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TBoolValueTupleSchemeFactory());
- }
-
- private boolean value; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- VALUE((short)1, "value");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // VALUE
- return VALUE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __VALUE_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.VALUE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TBoolValue.class, metaDataMap);
- }
-
- public TBoolValue() {
- }
-
- /**
- * Performs a deep copy on other.
- */
- public TBoolValue(TBoolValue other) {
- __isset_bitfield = other.__isset_bitfield;
- this.value = other.value;
- }
-
- public TBoolValue deepCopy() {
- return new TBoolValue(this);
- }
-
- @Override
- public void clear() {
- setValueIsSet(false);
- this.value = false;
- }
-
- public boolean isValue() {
- return this.value;
- }
-
- public void setValue(boolean value) {
- this.value = value;
- setValueIsSet(true);
- }
-
- public void unsetValue() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALUE_ISSET_ID);
- }
-
- /** Returns true if field value is set (has been assigned a value) and false otherwise */
- public boolean isSetValue() {
- return EncodingUtils.testBit(__isset_bitfield, __VALUE_ISSET_ID);
- }
-
- public void setValueIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALUE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((Boolean)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VALUE:
- return Boolean.valueOf(isValue());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case VALUE:
- return isSetValue();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TBoolValue)
- return this.equals((TBoolValue)that);
- return false;
- }
-
- public boolean equals(TBoolValue that) {
- if (that == null)
- return false;
-
- boolean this_present_value = true && this.isSetValue();
- boolean that_present_value = true && that.isSetValue();
- if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value))
- return false;
- if (this.value != that.value)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_value = true && (isSetValue());
- builder.append(present_value);
- if (present_value)
- builder.append(value);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TBoolValue other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TBoolValue typedOther = (TBoolValue)other;
-
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TBoolValue(");
- boolean first = true;
-
- if (isSetValue()) {
- sb.append("value:");
- sb.append(this.value);
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TBoolValueStandardSchemeFactory implements SchemeFactory {
- public TBoolValueStandardScheme getScheme() {
- return new TBoolValueStandardScheme();
- }
- }
-
- private static class TBoolValueStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TBoolValue struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.value = iprot.readBool();
- struct.setValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TBoolValue struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetValue()) {
- oprot.writeFieldBegin(VALUE_FIELD_DESC);
- oprot.writeBool(struct.value);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TBoolValueTupleSchemeFactory implements SchemeFactory {
- public TBoolValueTupleScheme getScheme() {
- return new TBoolValueTupleScheme();
- }
- }
-
- private static class TBoolValueTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TBoolValue struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetValue()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetValue()) {
- oprot.writeBool(struct.value);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TBoolValue struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.value = iprot.readBool();
- struct.setValueIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TByteColumn.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TByteColumn.java
deleted file mode 100644
index 169bfdeab3ee..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TByteColumn.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TByteColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TByteColumn");
-
- private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift.protocol.TField NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("nulls", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TByteColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TByteColumnTupleSchemeFactory());
- }
-
- private List values; // required
- private ByteBuffer nulls; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- VALUES((short)1, "values"),
- NULLS((short)2, "nulls");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // VALUES
- return VALUES;
- case 2: // NULLS
- return NULLS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))));
- tmpMap.put(_Fields.NULLS, new org.apache.thrift.meta_data.FieldMetaData("nulls", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TByteColumn.class, metaDataMap);
- }
-
- public TByteColumn() {
- }
-
- public TByteColumn(
- List values,
- ByteBuffer nulls)
- {
- this();
- this.values = values;
- this.nulls = nulls;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public TByteColumn(TByteColumn other) {
- if (other.isSetValues()) {
- List __this__values = new ArrayList();
- for (Byte other_element : other.values) {
- __this__values.add(other_element);
- }
- this.values = __this__values;
- }
- if (other.isSetNulls()) {
- this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls);
-;
- }
- }
-
- public TByteColumn deepCopy() {
- return new TByteColumn(this);
- }
-
- @Override
- public void clear() {
- this.values = null;
- this.nulls = null;
- }
-
- public int getValuesSize() {
- return (this.values == null) ? 0 : this.values.size();
- }
-
- public java.util.Iterator getValuesIterator() {
- return (this.values == null) ? null : this.values.iterator();
- }
-
- public void addToValues(byte elem) {
- if (this.values == null) {
- this.values = new ArrayList();
- }
- this.values.add(elem);
- }
-
- public List getValues() {
- return this.values;
- }
-
- public void setValues(List values) {
- this.values = values;
- }
-
- public void unsetValues() {
- this.values = null;
- }
-
- /** Returns true if field values is set (has been assigned a value) and false otherwise */
- public boolean isSetValues() {
- return this.values != null;
- }
-
- public void setValuesIsSet(boolean value) {
- if (!value) {
- this.values = null;
- }
- }
-
- public byte[] getNulls() {
- setNulls(org.apache.thrift.TBaseHelper.rightSize(nulls));
- return nulls == null ? null : nulls.array();
- }
-
- public ByteBuffer bufferForNulls() {
- return nulls;
- }
-
- public void setNulls(byte[] nulls) {
- setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls));
- }
-
- public void setNulls(ByteBuffer nulls) {
- this.nulls = nulls;
- }
-
- public void unsetNulls() {
- this.nulls = null;
- }
-
- /** Returns true if field nulls is set (has been assigned a value) and false otherwise */
- public boolean isSetNulls() {
- return this.nulls != null;
- }
-
- public void setNullsIsSet(boolean value) {
- if (!value) {
- this.nulls = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VALUES:
- if (value == null) {
- unsetValues();
- } else {
- setValues((List)value);
- }
- break;
-
- case NULLS:
- if (value == null) {
- unsetNulls();
- } else {
- setNulls((ByteBuffer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VALUES:
- return getValues();
-
- case NULLS:
- return getNulls();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case VALUES:
- return isSetValues();
- case NULLS:
- return isSetNulls();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TByteColumn)
- return this.equals((TByteColumn)that);
- return false;
- }
-
- public boolean equals(TByteColumn that) {
- if (that == null)
- return false;
-
- boolean this_present_values = true && this.isSetValues();
- boolean that_present_values = true && that.isSetValues();
- if (this_present_values || that_present_values) {
- if (!(this_present_values && that_present_values))
- return false;
- if (!this.values.equals(that.values))
- return false;
- }
-
- boolean this_present_nulls = true && this.isSetNulls();
- boolean that_present_nulls = true && that.isSetNulls();
- if (this_present_nulls || that_present_nulls) {
- if (!(this_present_nulls && that_present_nulls))
- return false;
- if (!this.nulls.equals(that.nulls))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_values = true && (isSetValues());
- builder.append(present_values);
- if (present_values)
- builder.append(values);
-
- boolean present_nulls = true && (isSetNulls());
- builder.append(present_nulls);
- if (present_nulls)
- builder.append(nulls);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TByteColumn other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TByteColumn typedOther = (TByteColumn)other;
-
- lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValues()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNulls()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TByteColumn(");
- boolean first = true;
-
- sb.append("values:");
- if (this.values == null) {
- sb.append("null");
- } else {
- sb.append(this.values);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("nulls:");
- if (this.nulls == null) {
- sb.append("null");
- } else {
- org.apache.thrift.TBaseHelper.toString(this.nulls, sb);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetValues()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' is unset! Struct:" + toString());
- }
-
- if (!isSetNulls()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TByteColumnStandardSchemeFactory implements SchemeFactory {
- public TByteColumnStandardScheme getScheme() {
- return new TByteColumnStandardScheme();
- }
- }
-
- private static class TByteColumnStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TByteColumn struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // VALUES
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
- struct.values = new ArrayList(_list62.size);
- for (int _i63 = 0; _i63 < _list62.size; ++_i63)
- {
- byte _elem64; // optional
- _elem64 = iprot.readByte();
- struct.values.add(_elem64);
- }
- iprot.readListEnd();
- }
- struct.setValuesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NULLS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.nulls = iprot.readBinary();
- struct.setNullsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TByteColumn struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.values != null) {
- oprot.writeFieldBegin(VALUES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.values.size()));
- for (byte _iter65 : struct.values)
- {
- oprot.writeByte(_iter65);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.nulls != null) {
- oprot.writeFieldBegin(NULLS_FIELD_DESC);
- oprot.writeBinary(struct.nulls);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TByteColumnTupleSchemeFactory implements SchemeFactory {
- public TByteColumnTupleScheme getScheme() {
- return new TByteColumnTupleScheme();
- }
- }
-
- private static class TByteColumnTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TByteColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.values.size());
- for (byte _iter66 : struct.values)
- {
- oprot.writeByte(_iter66);
- }
- }
- oprot.writeBinary(struct.nulls);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TByteColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, iprot.readI32());
- struct.values = new ArrayList(_list67.size);
- for (int _i68 = 0; _i68 < _list67.size; ++_i68)
- {
- byte _elem69; // optional
- _elem69 = iprot.readByte();
- struct.values.add(_elem69);
- }
- }
- struct.setValuesIsSet(true);
- struct.nulls = iprot.readBinary();
- struct.setNullsIsSet(true);
- }
- }
-
-}
-
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TByteValue.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TByteValue.java
deleted file mode 100644
index 23d969375996..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TByteValue.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TByteValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TByteValue");
-
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.BYTE, (short)1);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TByteValueStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TByteValueTupleSchemeFactory());
- }
-
- private byte value; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- VALUE((short)1, "value");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // VALUE
- return VALUE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __VALUE_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.VALUE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TByteValue.class, metaDataMap);
- }
-
- public TByteValue() {
- }
-
- /**
- * Performs a deep copy on other.
- */
- public TByteValue(TByteValue other) {
- __isset_bitfield = other.__isset_bitfield;
- this.value = other.value;
- }
-
- public TByteValue deepCopy() {
- return new TByteValue(this);
- }
-
- @Override
- public void clear() {
- setValueIsSet(false);
- this.value = 0;
- }
-
- public byte getValue() {
- return this.value;
- }
-
- public void setValue(byte value) {
- this.value = value;
- setValueIsSet(true);
- }
-
- public void unsetValue() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALUE_ISSET_ID);
- }
-
- /** Returns true if field value is set (has been assigned a value) and false otherwise */
- public boolean isSetValue() {
- return EncodingUtils.testBit(__isset_bitfield, __VALUE_ISSET_ID);
- }
-
- public void setValueIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALUE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((Byte)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VALUE:
- return Byte.valueOf(getValue());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case VALUE:
- return isSetValue();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TByteValue)
- return this.equals((TByteValue)that);
- return false;
- }
-
- public boolean equals(TByteValue that) {
- if (that == null)
- return false;
-
- boolean this_present_value = true && this.isSetValue();
- boolean that_present_value = true && that.isSetValue();
- if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value))
- return false;
- if (this.value != that.value)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_value = true && (isSetValue());
- builder.append(present_value);
- if (present_value)
- builder.append(value);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TByteValue other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TByteValue typedOther = (TByteValue)other;
-
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TByteValue(");
- boolean first = true;
-
- if (isSetValue()) {
- sb.append("value:");
- sb.append(this.value);
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TByteValueStandardSchemeFactory implements SchemeFactory {
- public TByteValueStandardScheme getScheme() {
- return new TByteValueStandardScheme();
- }
- }
-
- private static class TByteValueStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TByteValue struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
- struct.value = iprot.readByte();
- struct.setValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TByteValue struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetValue()) {
- oprot.writeFieldBegin(VALUE_FIELD_DESC);
- oprot.writeByte(struct.value);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TByteValueTupleSchemeFactory implements SchemeFactory {
- public TByteValueTupleScheme getScheme() {
- return new TByteValueTupleScheme();
- }
- }
-
- private static class TByteValueTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TByteValue struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetValue()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetValue()) {
- oprot.writeByte(struct.value);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TByteValue struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.value = iprot.readByte();
- struct.setValueIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TCLIService.java b/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TCLIService.java
deleted file mode 100644
index 54851b8d5131..000000000000
--- a/sql/hive-thriftserver/v1.2/src/gen/java/org/apache/hive/service/cli/thrift/TCLIService.java
+++ /dev/null
@@ -1,15414 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.hive.service.cli.thrift;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TCLIService {
-
- public interface Iface {
-
- public TOpenSessionResp OpenSession(TOpenSessionReq req) throws org.apache.thrift.TException;
-
- public TCloseSessionResp CloseSession(TCloseSessionReq req) throws org.apache.thrift.TException;
-
- public TGetInfoResp GetInfo(TGetInfoReq req) throws org.apache.thrift.TException;
-
- public TExecuteStatementResp ExecuteStatement(TExecuteStatementReq req) throws org.apache.thrift.TException;
-
- public TGetTypeInfoResp GetTypeInfo(TGetTypeInfoReq req) throws org.apache.thrift.TException;
-
- public TGetCatalogsResp GetCatalogs(TGetCatalogsReq req) throws org.apache.thrift.TException;
-
- public TGetSchemasResp GetSchemas(TGetSchemasReq req) throws org.apache.thrift.TException;
-
- public TGetTablesResp GetTables(TGetTablesReq req) throws org.apache.thrift.TException;
-
- public TGetTableTypesResp GetTableTypes(TGetTableTypesReq req) throws org.apache.thrift.TException;
-
- public TGetColumnsResp GetColumns(TGetColumnsReq req) throws org.apache.thrift.TException;
-
- public TGetFunctionsResp GetFunctions(TGetFunctionsReq req) throws org.apache.thrift.TException;
-
- public TGetOperationStatusResp GetOperationStatus(TGetOperationStatusReq req) throws org.apache.thrift.TException;
-
- public TCancelOperationResp CancelOperation(TCancelOperationReq req) throws org.apache.thrift.TException;
-
- public TCloseOperationResp CloseOperation(TCloseOperationReq req) throws org.apache.thrift.TException;
-
- public TGetResultSetMetadataResp GetResultSetMetadata(TGetResultSetMetadataReq req) throws org.apache.thrift.TException;
-
- public TFetchResultsResp FetchResults(TFetchResultsReq req) throws org.apache.thrift.TException;
-
- public TGetDelegationTokenResp GetDelegationToken(TGetDelegationTokenReq req) throws org.apache.thrift.TException;
-
- public TCancelDelegationTokenResp CancelDelegationToken(TCancelDelegationTokenReq req) throws org.apache.thrift.TException;
-
- public TRenewDelegationTokenResp RenewDelegationToken(TRenewDelegationTokenReq req) throws org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public TOpenSessionResp OpenSession(TOpenSessionReq req) throws org.apache.thrift.TException
- {
- send_OpenSession(req);
- return recv_OpenSession();
- }
-
- public void send_OpenSession(TOpenSessionReq req) throws org.apache.thrift.TException
- {
- OpenSession_args args = new OpenSession_args();
- args.setReq(req);
- sendBase("OpenSession", args);
- }
-
- public TOpenSessionResp recv_OpenSession() throws org.apache.thrift.TException
- {
- OpenSession_result result = new OpenSession_result();
- receiveBase(result, "OpenSession");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "OpenSession failed: unknown result");
- }
-
- public TCloseSessionResp CloseSession(TCloseSessionReq req) throws org.apache.thrift.TException
- {
- send_CloseSession(req);
- return recv_CloseSession();
- }
-
- public void send_CloseSession(TCloseSessionReq req) throws org.apache.thrift.TException
- {
- CloseSession_args args = new CloseSession_args();
- args.setReq(req);
- sendBase("CloseSession", args);
- }
-
- public TCloseSessionResp recv_CloseSession() throws org.apache.thrift.TException
- {
- CloseSession_result result = new CloseSession_result();
- receiveBase(result, "CloseSession");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "CloseSession failed: unknown result");
- }
-
- public TGetInfoResp GetInfo(TGetInfoReq req) throws org.apache.thrift.TException
- {
- send_GetInfo(req);
- return recv_GetInfo();
- }
-
- public void send_GetInfo(TGetInfoReq req) throws org.apache.thrift.TException
- {
- GetInfo_args args = new GetInfo_args();
- args.setReq(req);
- sendBase("GetInfo", args);
- }
-
- public TGetInfoResp recv_GetInfo() throws org.apache.thrift.TException
- {
- GetInfo_result result = new GetInfo_result();
- receiveBase(result, "GetInfo");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetInfo failed: unknown result");
- }
-
- public TExecuteStatementResp ExecuteStatement(TExecuteStatementReq req) throws org.apache.thrift.TException
- {
- send_ExecuteStatement(req);
- return recv_ExecuteStatement();
- }
-
- public void send_ExecuteStatement(TExecuteStatementReq req) throws org.apache.thrift.TException
- {
- ExecuteStatement_args args = new ExecuteStatement_args();
- args.setReq(req);
- sendBase("ExecuteStatement", args);
- }
-
- public TExecuteStatementResp recv_ExecuteStatement() throws org.apache.thrift.TException
- {
- ExecuteStatement_result result = new ExecuteStatement_result();
- receiveBase(result, "ExecuteStatement");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ExecuteStatement failed: unknown result");
- }
-
- public TGetTypeInfoResp GetTypeInfo(TGetTypeInfoReq req) throws org.apache.thrift.TException
- {
- send_GetTypeInfo(req);
- return recv_GetTypeInfo();
- }
-
- public void send_GetTypeInfo(TGetTypeInfoReq req) throws org.apache.thrift.TException
- {
- GetTypeInfo_args args = new GetTypeInfo_args();
- args.setReq(req);
- sendBase("GetTypeInfo", args);
- }
-
- public TGetTypeInfoResp recv_GetTypeInfo() throws org.apache.thrift.TException
- {
- GetTypeInfo_result result = new GetTypeInfo_result();
- receiveBase(result, "GetTypeInfo");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetTypeInfo failed: unknown result");
- }
-
- public TGetCatalogsResp GetCatalogs(TGetCatalogsReq req) throws org.apache.thrift.TException
- {
- send_GetCatalogs(req);
- return recv_GetCatalogs();
- }
-
- public void send_GetCatalogs(TGetCatalogsReq req) throws org.apache.thrift.TException
- {
- GetCatalogs_args args = new GetCatalogs_args();
- args.setReq(req);
- sendBase("GetCatalogs", args);
- }
-
- public TGetCatalogsResp recv_GetCatalogs() throws org.apache.thrift.TException
- {
- GetCatalogs_result result = new GetCatalogs_result();
- receiveBase(result, "GetCatalogs");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetCatalogs failed: unknown result");
- }
-
- public TGetSchemasResp GetSchemas(TGetSchemasReq req) throws org.apache.thrift.TException
- {
- send_GetSchemas(req);
- return recv_GetSchemas();
- }
-
- public void send_GetSchemas(TGetSchemasReq req) throws org.apache.thrift.TException
- {
- GetSchemas_args args = new GetSchemas_args();
- args.setReq(req);
- sendBase("GetSchemas", args);
- }
-
- public TGetSchemasResp recv_GetSchemas() throws org.apache.thrift.TException
- {
- GetSchemas_result result = new GetSchemas_result();
- receiveBase(result, "GetSchemas");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetSchemas failed: unknown result");
- }
-
- public TGetTablesResp GetTables(TGetTablesReq req) throws org.apache.thrift.TException
- {
- send_GetTables(req);
- return recv_GetTables();
- }
-
- public void send_GetTables(TGetTablesReq req) throws org.apache.thrift.TException
- {
- GetTables_args args = new GetTables_args();
- args.setReq(req);
- sendBase("GetTables", args);
- }
-
- public TGetTablesResp recv_GetTables() throws org.apache.thrift.TException
- {
- GetTables_result result = new GetTables_result();
- receiveBase(result, "GetTables");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetTables failed: unknown result");
- }
-
- public TGetTableTypesResp GetTableTypes(TGetTableTypesReq req) throws org.apache.thrift.TException
- {
- send_GetTableTypes(req);
- return recv_GetTableTypes();
- }
-
- public void send_GetTableTypes(TGetTableTypesReq req) throws org.apache.thrift.TException
- {
- GetTableTypes_args args = new GetTableTypes_args();
- args.setReq(req);
- sendBase("GetTableTypes", args);
- }
-
- public TGetTableTypesResp recv_GetTableTypes() throws org.apache.thrift.TException
- {
- GetTableTypes_result result = new GetTableTypes_result();
- receiveBase(result, "GetTableTypes");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetTableTypes failed: unknown result");
- }
-
- public TGetColumnsResp GetColumns(TGetColumnsReq req) throws org.apache.thrift.TException
- {
- send_GetColumns(req);
- return recv_GetColumns();
- }
-
- public void send_GetColumns(TGetColumnsReq req) throws org.apache.thrift.TException
- {
- GetColumns_args args = new GetColumns_args();
- args.setReq(req);
- sendBase("GetColumns", args);
- }
-
- public TGetColumnsResp recv_GetColumns() throws org.apache.thrift.TException
- {
- GetColumns_result result = new GetColumns_result();
- receiveBase(result, "GetColumns");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetColumns failed: unknown result");
- }
-
- public TGetFunctionsResp GetFunctions(TGetFunctionsReq req) throws org.apache.thrift.TException
- {
- send_GetFunctions(req);
- return recv_GetFunctions();
- }
-
- public void send_GetFunctions(TGetFunctionsReq req) throws org.apache.thrift.TException
- {
- GetFunctions_args args = new GetFunctions_args();
- args.setReq(req);
- sendBase("GetFunctions", args);
- }
-
- public TGetFunctionsResp recv_GetFunctions() throws org.apache.thrift.TException
- {
- GetFunctions_result result = new GetFunctions_result();
- receiveBase(result, "GetFunctions");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetFunctions failed: unknown result");
- }
-
- public TGetOperationStatusResp GetOperationStatus(TGetOperationStatusReq req) throws org.apache.thrift.TException
- {
- send_GetOperationStatus(req);
- return recv_GetOperationStatus();
- }
-
- public void send_GetOperationStatus(TGetOperationStatusReq req) throws org.apache.thrift.TException
- {
- GetOperationStatus_args args = new GetOperationStatus_args();
- args.setReq(req);
- sendBase("GetOperationStatus", args);
- }
-
- public TGetOperationStatusResp recv_GetOperationStatus() throws org.apache.thrift.TException
- {
- GetOperationStatus_result result = new GetOperationStatus_result();
- receiveBase(result, "GetOperationStatus");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetOperationStatus failed: unknown result");
- }
-
- public TCancelOperationResp CancelOperation(TCancelOperationReq req) throws org.apache.thrift.TException
- {
- send_CancelOperation(req);
- return recv_CancelOperation();
- }
-
- public void send_CancelOperation(TCancelOperationReq req) throws org.apache.thrift.TException
- {
- CancelOperation_args args = new CancelOperation_args();
- args.setReq(req);
- sendBase("CancelOperation", args);
- }
-
- public TCancelOperationResp recv_CancelOperation() throws org.apache.thrift.TException
- {
- CancelOperation_result result = new CancelOperation_result();
- receiveBase(result, "CancelOperation");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "CancelOperation failed: unknown result");
- }
-
- public TCloseOperationResp CloseOperation(TCloseOperationReq req) throws org.apache.thrift.TException
- {
- send_CloseOperation(req);
- return recv_CloseOperation();
- }
-
- public void send_CloseOperation(TCloseOperationReq req) throws org.apache.thrift.TException
- {
- CloseOperation_args args = new CloseOperation_args();
- args.setReq(req);
- sendBase("CloseOperation", args);
- }
-
- public TCloseOperationResp recv_CloseOperation() throws org.apache.thrift.TException
- {
- CloseOperation_result result = new CloseOperation_result();
- receiveBase(result, "CloseOperation");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "CloseOperation failed: unknown result");
- }
-
- public TGetResultSetMetadataResp GetResultSetMetadata(TGetResultSetMetadataReq req) throws org.apache.thrift.TException
- {
- send_GetResultSetMetadata(req);
- return recv_GetResultSetMetadata();
- }
-
- public void send_GetResultSetMetadata(TGetResultSetMetadataReq req) throws org.apache.thrift.TException
- {
- GetResultSetMetadata_args args = new GetResultSetMetadata_args();
- args.setReq(req);
- sendBase("GetResultSetMetadata", args);
- }
-
- public TGetResultSetMetadataResp recv_GetResultSetMetadata() throws org.apache.thrift.TException
- {
- GetResultSetMetadata_result result = new GetResultSetMetadata_result();
- receiveBase(result, "GetResultSetMetadata");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetResultSetMetadata failed: unknown result");
- }
-
- public TFetchResultsResp FetchResults(TFetchResultsReq req) throws org.apache.thrift.TException
- {
- send_FetchResults(req);
- return recv_FetchResults();
- }
-
- public void send_FetchResults(TFetchResultsReq req) throws org.apache.thrift.TException
- {
- FetchResults_args args = new FetchResults_args();
- args.setReq(req);
- sendBase("FetchResults", args);
- }
-
- public TFetchResultsResp recv_FetchResults() throws org.apache.thrift.TException
- {
- FetchResults_result result = new FetchResults_result();
- receiveBase(result, "FetchResults");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "FetchResults failed: unknown result");
- }
-
- public TGetDelegationTokenResp GetDelegationToken(TGetDelegationTokenReq req) throws org.apache.thrift.TException
- {
- send_GetDelegationToken(req);
- return recv_GetDelegationToken();
- }
-
- public void send_GetDelegationToken(TGetDelegationTokenReq req) throws org.apache.thrift.TException
- {
- GetDelegationToken_args args = new GetDelegationToken_args();
- args.setReq(req);
- sendBase("GetDelegationToken", args);
- }
-
- public TGetDelegationTokenResp recv_GetDelegationToken() throws org.apache.thrift.TException
- {
- GetDelegationToken_result result = new GetDelegationToken_result();
- receiveBase(result, "GetDelegationToken");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetDelegationToken failed: unknown result");
- }
-
- public TCancelDelegationTokenResp CancelDelegationToken(TCancelDelegationTokenReq req) throws org.apache.thrift.TException
- {
- send_CancelDelegationToken(req);
- return recv_CancelDelegationToken();
- }
-
- public void send_CancelDelegationToken(TCancelDelegationTokenReq req) throws org.apache.thrift.TException
- {
- CancelDelegationToken_args args = new CancelDelegationToken_args();
- args.setReq(req);
- sendBase("CancelDelegationToken", args);
- }
-
- public TCancelDelegationTokenResp recv_CancelDelegationToken() throws org.apache.thrift.TException
- {
- CancelDelegationToken_result result = new CancelDelegationToken_result();
- receiveBase(result, "CancelDelegationToken");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "CancelDelegationToken failed: unknown result");
- }
-
- public TRenewDelegationTokenResp RenewDelegationToken(TRenewDelegationTokenReq req) throws org.apache.thrift.TException
- {
- send_RenewDelegationToken(req);
- return recv_RenewDelegationToken();
- }
-
- public void send_RenewDelegationToken(TRenewDelegationTokenReq req) throws org.apache.thrift.TException
- {
- RenewDelegationToken_args args = new RenewDelegationToken_args();
- args.setReq(req);
- sendBase("RenewDelegationToken", args);
- }
-
- public TRenewDelegationTokenResp recv_RenewDelegationToken() throws org.apache.thrift.TException
- {
- RenewDelegationToken_result result = new RenewDelegationToken_result();
- receiveBase(result, "RenewDelegationToken");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "RenewDelegationToken failed: unknown result");
- }
-
- }
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
- public static class Factory implements org.apache.thrift.async.TAsyncClientFactory {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- OpenSession_call method_call = new OpenSession_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class OpenSession_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TOpenSessionReq req;
- public OpenSession_call(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("OpenSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
- OpenSession_args args = new OpenSession_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TOpenSessionResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_OpenSession();
- }
- }
-
- public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- CloseSession_call method_call = new CloseSession_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class CloseSession_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TCloseSessionReq req;
- public CloseSession_call(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("CloseSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
- CloseSession_args args = new CloseSession_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TCloseSessionResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_CloseSession();
- }
- }
-
- public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetInfo_call method_call = new GetInfo_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetInfoReq req;
- public GetInfo_call(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetInfo_args args = new GetInfo_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetInfoResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetInfo();
- }
- }
-
- public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- ExecuteStatement_call method_call = new ExecuteStatement_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class ExecuteStatement_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TExecuteStatementReq req;
- public ExecuteStatement_call(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ExecuteStatement", org.apache.thrift.protocol.TMessageType.CALL, 0));
- ExecuteStatement_args args = new ExecuteStatement_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TExecuteStatementResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_ExecuteStatement();
- }
- }
-
- public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetTypeInfo_call method_call = new GetTypeInfo_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetTypeInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetTypeInfoReq req;
- public GetTypeInfo_call(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetTypeInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetTypeInfo_args args = new GetTypeInfo_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetTypeInfoResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetTypeInfo();
- }
- }
-
- public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetCatalogs_call method_call = new GetCatalogs_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetCatalogs_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetCatalogsReq req;
- public GetCatalogs_call(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetCatalogs", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetCatalogs_args args = new GetCatalogs_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetCatalogsResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetCatalogs();
- }
- }
-
- public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetSchemas_call method_call = new GetSchemas_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetSchemas_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetSchemasReq req;
- public GetSchemas_call(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetSchemas", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetSchemas_args args = new GetSchemas_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetSchemasResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetSchemas();
- }
- }
-
- public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetTables_call method_call = new GetTables_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetTables_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetTablesReq req;
- public GetTables_call(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetTables", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetTables_args args = new GetTables_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetTablesResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetTables();
- }
- }
-
- public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetTableTypes_call method_call = new GetTableTypes_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetTableTypes_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetTableTypesReq req;
- public GetTableTypes_call(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetTableTypes", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetTableTypes_args args = new GetTableTypes_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetTableTypesResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetTableTypes();
- }
- }
-
- public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetColumns_call method_call = new GetColumns_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetColumns_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetColumnsReq req;
- public GetColumns_call(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetColumns", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetColumns_args args = new GetColumns_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetColumnsResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetColumns();
- }
- }
-
- public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetFunctions_call method_call = new GetFunctions_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetFunctions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetFunctionsReq req;
- public GetFunctions_call(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetFunctions", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetFunctions_args args = new GetFunctions_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetFunctionsResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetFunctions();
- }
- }
-
- public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetOperationStatus_call method_call = new GetOperationStatus_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetOperationStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetOperationStatusReq req;
- public GetOperationStatus_call(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetOperationStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetOperationStatus_args args = new GetOperationStatus_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetOperationStatusResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetOperationStatus();
- }
- }
-
- public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- CancelOperation_call method_call = new CancelOperation_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class CancelOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TCancelOperationReq req;
- public CancelOperation_call(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("CancelOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- CancelOperation_args args = new CancelOperation_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TCancelOperationResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_CancelOperation();
- }
- }
-
- public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- CloseOperation_call method_call = new CloseOperation_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class CloseOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TCloseOperationReq req;
- public CloseOperation_call(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("CloseOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- CloseOperation_args args = new CloseOperation_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TCloseOperationResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_CloseOperation();
- }
- }
-
- public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetResultSetMetadata_call method_call = new GetResultSetMetadata_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetResultSetMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetResultSetMetadataReq req;
- public GetResultSetMetadata_call(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetResultSetMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetResultSetMetadata_args args = new GetResultSetMetadata_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetResultSetMetadataResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetResultSetMetadata();
- }
- }
-
- public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- FetchResults_call method_call = new FetchResults_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class FetchResults_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TFetchResultsReq req;
- public FetchResults_call(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("FetchResults", org.apache.thrift.protocol.TMessageType.CALL, 0));
- FetchResults_args args = new FetchResults_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TFetchResultsResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_FetchResults();
- }
- }
-
- public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- GetDelegationToken_call method_call = new GetDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class GetDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TGetDelegationTokenReq req;
- public GetDelegationToken_call(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetDelegationToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
- GetDelegationToken_args args = new GetDelegationToken_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TGetDelegationTokenResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_GetDelegationToken();
- }
- }
-
- public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- CancelDelegationToken_call method_call = new CancelDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class CancelDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TCancelDelegationTokenReq req;
- public CancelDelegationToken_call(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("CancelDelegationToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
- CancelDelegationToken_args args = new CancelDelegationToken_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TCancelDelegationTokenResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_CancelDelegationToken();
- }
- }
-
- public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- RenewDelegationToken_call method_call = new RenewDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class RenewDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall {
- private TRenewDelegationTokenReq req;
- public RenewDelegationToken_call(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.req = req;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("RenewDelegationToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
- RenewDelegationToken_args args = new RenewDelegationToken_args();
- args.setReq(req);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public TRenewDelegationTokenResp getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_RenewDelegationToken();
- }
- }
-
- }
-
- public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap>()));
- }
-
- protected Processor(I iface, Map> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static Map> getProcessMap(Map> processMap) {
- processMap.put("OpenSession", new OpenSession());
- processMap.put("CloseSession", new CloseSession());
- processMap.put("GetInfo", new GetInfo());
- processMap.put("ExecuteStatement", new ExecuteStatement());
- processMap.put("GetTypeInfo", new GetTypeInfo());
- processMap.put("GetCatalogs", new GetCatalogs());
- processMap.put("GetSchemas", new GetSchemas());
- processMap.put("GetTables", new GetTables());
- processMap.put("GetTableTypes", new GetTableTypes());
- processMap.put("GetColumns", new GetColumns());
- processMap.put("GetFunctions", new GetFunctions());
- processMap.put("GetOperationStatus", new GetOperationStatus());
- processMap.put("CancelOperation", new CancelOperation());
- processMap.put("CloseOperation", new CloseOperation());
- processMap.put("GetResultSetMetadata", new GetResultSetMetadata());
- processMap.put("FetchResults", new FetchResults());
- processMap.put("GetDelegationToken", new GetDelegationToken());
- processMap.put("CancelDelegationToken", new CancelDelegationToken());
- processMap.put("RenewDelegationToken", new RenewDelegationToken());
- return processMap;
- }
-
- public static class OpenSession extends org.apache.thrift.ProcessFunction {
- public OpenSession() {
- super("OpenSession");
- }
-
- public OpenSession_args getEmptyArgsInstance() {
- return new OpenSession_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public OpenSession_result getResult(I iface, OpenSession_args args) throws org.apache.thrift.TException {
- OpenSession_result result = new OpenSession_result();
- result.success = iface.OpenSession(args.req);
- return result;
- }
- }
-
- public static class CloseSession extends org.apache.thrift.ProcessFunction {
- public CloseSession() {
- super("CloseSession");
- }
-
- public CloseSession_args getEmptyArgsInstance() {
- return new CloseSession_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public CloseSession_result getResult(I iface, CloseSession_args args) throws org.apache.thrift.TException {
- CloseSession_result result = new CloseSession_result();
- result.success = iface.CloseSession(args.req);
- return result;
- }
- }
-
- public static class GetInfo extends org.apache.thrift.ProcessFunction {
- public GetInfo() {
- super("GetInfo");
- }
-
- public GetInfo_args getEmptyArgsInstance() {
- return new GetInfo_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetInfo_result getResult(I iface, GetInfo_args args) throws org.apache.thrift.TException {
- GetInfo_result result = new GetInfo_result();
- result.success = iface.GetInfo(args.req);
- return result;
- }
- }
-
- public static class ExecuteStatement extends org.apache.thrift.ProcessFunction {
- public ExecuteStatement() {
- super("ExecuteStatement");
- }
-
- public ExecuteStatement_args getEmptyArgsInstance() {
- return new ExecuteStatement_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public ExecuteStatement_result getResult(I iface, ExecuteStatement_args args) throws org.apache.thrift.TException {
- ExecuteStatement_result result = new ExecuteStatement_result();
- result.success = iface.ExecuteStatement(args.req);
- return result;
- }
- }
-
- public static class GetTypeInfo extends org.apache.thrift.ProcessFunction {
- public GetTypeInfo() {
- super("GetTypeInfo");
- }
-
- public GetTypeInfo_args getEmptyArgsInstance() {
- return new GetTypeInfo_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetTypeInfo_result getResult(I iface, GetTypeInfo_args args) throws org.apache.thrift.TException {
- GetTypeInfo_result result = new GetTypeInfo_result();
- result.success = iface.GetTypeInfo(args.req);
- return result;
- }
- }
-
- public static class GetCatalogs extends org.apache.thrift.ProcessFunction {
- public GetCatalogs() {
- super("GetCatalogs");
- }
-
- public GetCatalogs_args getEmptyArgsInstance() {
- return new GetCatalogs_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetCatalogs_result getResult(I iface, GetCatalogs_args args) throws org.apache.thrift.TException {
- GetCatalogs_result result = new GetCatalogs_result();
- result.success = iface.GetCatalogs(args.req);
- return result;
- }
- }
-
- public static class GetSchemas extends org.apache.thrift.ProcessFunction {
- public GetSchemas() {
- super("GetSchemas");
- }
-
- public GetSchemas_args getEmptyArgsInstance() {
- return new GetSchemas_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetSchemas_result getResult(I iface, GetSchemas_args args) throws org.apache.thrift.TException {
- GetSchemas_result result = new GetSchemas_result();
- result.success = iface.GetSchemas(args.req);
- return result;
- }
- }
-
- public static class GetTables extends org.apache.thrift.ProcessFunction {
- public GetTables() {
- super("GetTables");
- }
-
- public GetTables_args getEmptyArgsInstance() {
- return new GetTables_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetTables_result getResult(I iface, GetTables_args args) throws org.apache.thrift.TException {
- GetTables_result result = new GetTables_result();
- result.success = iface.GetTables(args.req);
- return result;
- }
- }
-
- public static class GetTableTypes extends org.apache.thrift.ProcessFunction {
- public GetTableTypes() {
- super("GetTableTypes");
- }
-
- public GetTableTypes_args getEmptyArgsInstance() {
- return new GetTableTypes_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetTableTypes_result getResult(I iface, GetTableTypes_args args) throws org.apache.thrift.TException {
- GetTableTypes_result result = new GetTableTypes_result();
- result.success = iface.GetTableTypes(args.req);
- return result;
- }
- }
-
- public static class GetColumns extends org.apache.thrift.ProcessFunction {
- public GetColumns() {
- super("GetColumns");
- }
-
- public GetColumns_args getEmptyArgsInstance() {
- return new GetColumns_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetColumns_result getResult(I iface, GetColumns_args args) throws org.apache.thrift.TException {
- GetColumns_result result = new GetColumns_result();
- result.success = iface.GetColumns(args.req);
- return result;
- }
- }
-
- public static class GetFunctions extends org.apache.thrift.ProcessFunction {
- public GetFunctions() {
- super("GetFunctions");
- }
-
- public GetFunctions_args getEmptyArgsInstance() {
- return new GetFunctions_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetFunctions_result getResult(I iface, GetFunctions_args args) throws org.apache.thrift.TException {
- GetFunctions_result result = new GetFunctions_result();
- result.success = iface.GetFunctions(args.req);
- return result;
- }
- }
-
- public static class GetOperationStatus extends org.apache.thrift.ProcessFunction {
- public GetOperationStatus() {
- super("GetOperationStatus");
- }
-
- public GetOperationStatus_args getEmptyArgsInstance() {
- return new GetOperationStatus_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetOperationStatus_result getResult(I iface, GetOperationStatus_args args) throws org.apache.thrift.TException {
- GetOperationStatus_result result = new GetOperationStatus_result();
- result.success = iface.GetOperationStatus(args.req);
- return result;
- }
- }
-
- public static class CancelOperation extends org.apache.thrift.ProcessFunction {
- public CancelOperation() {
- super("CancelOperation");
- }
-
- public CancelOperation_args getEmptyArgsInstance() {
- return new CancelOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public CancelOperation_result getResult(I iface, CancelOperation_args args) throws org.apache.thrift.TException {
- CancelOperation_result result = new CancelOperation_result();
- result.success = iface.CancelOperation(args.req);
- return result;
- }
- }
-
- public static class CloseOperation extends org.apache.thrift.ProcessFunction {
- public CloseOperation() {
- super("CloseOperation");
- }
-
- public CloseOperation_args getEmptyArgsInstance() {
- return new CloseOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public CloseOperation_result getResult(I iface, CloseOperation_args args) throws org.apache.thrift.TException {
- CloseOperation_result result = new CloseOperation_result();
- result.success = iface.CloseOperation(args.req);
- return result;
- }
- }
-
- public static class GetResultSetMetadata extends org.apache.thrift.ProcessFunction {
- public GetResultSetMetadata() {
- super("GetResultSetMetadata");
- }
-
- public GetResultSetMetadata_args getEmptyArgsInstance() {
- return new GetResultSetMetadata_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetResultSetMetadata_result getResult(I iface, GetResultSetMetadata_args args) throws org.apache.thrift.TException {
- GetResultSetMetadata_result result = new GetResultSetMetadata_result();
- result.success = iface.GetResultSetMetadata(args.req);
- return result;
- }
- }
-
- public static class FetchResults extends org.apache.thrift.ProcessFunction {
- public FetchResults() {
- super("FetchResults");
- }
-
- public FetchResults_args getEmptyArgsInstance() {
- return new FetchResults_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public FetchResults_result getResult(I iface, FetchResults_args args) throws org.apache.thrift.TException {
- FetchResults_result result = new FetchResults_result();
- result.success = iface.FetchResults(args.req);
- return result;
- }
- }
-
- public static class GetDelegationToken extends org.apache.thrift.ProcessFunction {
- public GetDelegationToken() {
- super("GetDelegationToken");
- }
-
- public GetDelegationToken_args getEmptyArgsInstance() {
- return new GetDelegationToken_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public GetDelegationToken_result getResult(I iface, GetDelegationToken_args args) throws org.apache.thrift.TException {
- GetDelegationToken_result result = new GetDelegationToken_result();
- result.success = iface.GetDelegationToken(args.req);
- return result;
- }
- }
-
- public static class CancelDelegationToken extends org.apache.thrift.ProcessFunction {
- public CancelDelegationToken() {
- super("CancelDelegationToken");
- }
-
- public CancelDelegationToken_args getEmptyArgsInstance() {
- return new CancelDelegationToken_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public CancelDelegationToken_result getResult(I iface, CancelDelegationToken_args args) throws org.apache.thrift.TException {
- CancelDelegationToken_result result = new CancelDelegationToken_result();
- result.success = iface.CancelDelegationToken(args.req);
- return result;
- }
- }
-
- public static class RenewDelegationToken extends org.apache.thrift.ProcessFunction {
- public RenewDelegationToken() {
- super("RenewDelegationToken");
- }
-
- public RenewDelegationToken_args getEmptyArgsInstance() {
- return new RenewDelegationToken_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public RenewDelegationToken_result getResult(I iface, RenewDelegationToken_args args) throws org.apache.thrift.TException {
- RenewDelegationToken_result result = new RenewDelegationToken_result();
- result.success = iface.RenewDelegationToken(args.req);
- return result;
- }
- }
-
- }
-
- public static class OpenSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_args");
-
- private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OpenSession_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OpenSession_argsTupleSchemeFactory());
- }
-
- private TOpenSessionReq req; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- REQ((short)1, "req");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // REQ
- return REQ;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOpenSessionReq.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_args.class, metaDataMap);
- }
-
- public OpenSession_args() {
- }
-
- public OpenSession_args(
- TOpenSessionReq req)
- {
- this();
- this.req = req;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public OpenSession_args(OpenSession_args other) {
- if (other.isSetReq()) {
- this.req = new TOpenSessionReq(other.req);
- }
- }
-
- public OpenSession_args deepCopy() {
- return new OpenSession_args(this);
- }
-
- @Override
- public void clear() {
- this.req = null;
- }
-
- public TOpenSessionReq getReq() {
- return this.req;
- }
-
- public void setReq(TOpenSessionReq req) {
- this.req = req;
- }
-
- public void unsetReq() {
- this.req = null;
- }
-
- /** Returns true if field req is set (has been assigned a value) and false otherwise */
- public boolean isSetReq() {
- return this.req != null;
- }
-
- public void setReqIsSet(boolean value) {
- if (!value) {
- this.req = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case REQ:
- if (value == null) {
- unsetReq();
- } else {
- setReq((TOpenSessionReq)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case REQ:
- return getReq();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case REQ:
- return isSetReq();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof OpenSession_args)
- return this.equals((OpenSession_args)that);
- return false;
- }
-
- public boolean equals(OpenSession_args that) {
- if (that == null)
- return false;
-
- boolean this_present_req = true && this.isSetReq();
- boolean that_present_req = true && that.isSetReq();
- if (this_present_req || that_present_req) {
- if (!(this_present_req && that_present_req))
- return false;
- if (!this.req.equals(that.req))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_req = true && (isSetReq());
- builder.append(present_req);
- if (present_req)
- builder.append(req);
-
- return builder.toHashCode();
- }
-
- public int compareTo(OpenSession_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- OpenSession_args typedOther = (OpenSession_args)other;
-
- lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReq()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("OpenSession_args(");
- boolean first = true;
-
- sb.append("req:");
- if (this.req == null) {
- sb.append("null");
- } else {
- sb.append(this.req);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (req != null) {
- req.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class OpenSession_argsStandardSchemeFactory implements SchemeFactory {
- public OpenSession_argsStandardScheme getScheme() {
- return new OpenSession_argsStandardScheme();
- }
- }
-
- private static class OpenSession_argsStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // REQ
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.req = new TOpenSessionReq();
- struct.req.read(iprot);
- struct.setReqIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.req != null) {
- oprot.writeFieldBegin(REQ_FIELD_DESC);
- struct.req.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class OpenSession_argsTupleSchemeFactory implements SchemeFactory {
- public OpenSession_argsTupleScheme getScheme() {
- return new OpenSession_argsTupleScheme();
- }
- }
-
- private static class OpenSession_argsTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetReq()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetReq()) {
- struct.req.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.req = new TOpenSessionReq();
- struct.req.read(iprot);
- struct.setReqIsSet(true);
- }
- }
- }
-
- }
-
- public static class OpenSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OpenSession_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OpenSession_resultTupleSchemeFactory());
- }
-
- private TOpenSessionResp success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOpenSessionResp.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_result.class, metaDataMap);
- }
-
- public OpenSession_result() {
- }
-
- public OpenSession_result(
- TOpenSessionResp success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public OpenSession_result(OpenSession_result other) {
- if (other.isSetSuccess()) {
- this.success = new TOpenSessionResp(other.success);
- }
- }
-
- public OpenSession_result deepCopy() {
- return new OpenSession_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public TOpenSessionResp getSuccess() {
- return this.success;
- }
-
- public void setSuccess(TOpenSessionResp success) {
- this.success = success;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((TOpenSessionResp)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof OpenSession_result)
- return this.equals((OpenSession_result)that);
- return false;
- }
-
- public boolean equals(OpenSession_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_success = true && (isSetSuccess());
- builder.append(present_success);
- if (present_success)
- builder.append(success);
-
- return builder.toHashCode();
- }
-
- public int compareTo(OpenSession_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- OpenSession_result typedOther = (OpenSession_result)other;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("OpenSession_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class OpenSession_resultStandardSchemeFactory implements SchemeFactory {
- public OpenSession_resultStandardScheme getScheme() {
- return new OpenSession_resultStandardScheme();
- }
- }
-
- private static class OpenSession_resultStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new TOpenSessionResp();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class OpenSession_resultTupleSchemeFactory implements SchemeFactory {
- public OpenSession_resultTupleScheme getScheme() {
- return new OpenSession_resultTupleScheme();
- }
- }
-
- private static class OpenSession_resultTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new TOpenSessionResp();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class CloseSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_args");
-
- private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CloseSession_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CloseSession_argsTupleSchemeFactory());
- }
-
- private TCloseSessionReq req; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- REQ((short)1, "req");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // REQ
- return REQ;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCloseSessionReq.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloseSession_args.class, metaDataMap);
- }
-
- public CloseSession_args() {
- }
-
- public CloseSession_args(
- TCloseSessionReq req)
- {
- this();
- this.req = req;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public CloseSession_args(CloseSession_args other) {
- if (other.isSetReq()) {
- this.req = new TCloseSessionReq(other.req);
- }
- }
-
- public CloseSession_args deepCopy() {
- return new CloseSession_args(this);
- }
-
- @Override
- public void clear() {
- this.req = null;
- }
-
- public TCloseSessionReq getReq() {
- return this.req;
- }
-
- public void setReq(TCloseSessionReq req) {
- this.req = req;
- }
-
- public void unsetReq() {
- this.req = null;
- }
-
- /** Returns true if field req is set (has been assigned a value) and false otherwise */
- public boolean isSetReq() {
- return this.req != null;
- }
-
- public void setReqIsSet(boolean value) {
- if (!value) {
- this.req = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case REQ:
- if (value == null) {
- unsetReq();
- } else {
- setReq((TCloseSessionReq)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case REQ:
- return getReq();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case REQ:
- return isSetReq();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof CloseSession_args)
- return this.equals((CloseSession_args)that);
- return false;
- }
-
- public boolean equals(CloseSession_args that) {
- if (that == null)
- return false;
-
- boolean this_present_req = true && this.isSetReq();
- boolean that_present_req = true && that.isSetReq();
- if (this_present_req || that_present_req) {
- if (!(this_present_req && that_present_req))
- return false;
- if (!this.req.equals(that.req))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_req = true && (isSetReq());
- builder.append(present_req);
- if (present_req)
- builder.append(req);
-
- return builder.toHashCode();
- }
-
- public int compareTo(CloseSession_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- CloseSession_args typedOther = (CloseSession_args)other;
-
- lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReq()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("CloseSession_args(");
- boolean first = true;
-
- sb.append("req:");
- if (this.req == null) {
- sb.append("null");
- } else {
- sb.append(this.req);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (req != null) {
- req.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class CloseSession_argsStandardSchemeFactory implements SchemeFactory {
- public CloseSession_argsStandardScheme getScheme() {
- return new CloseSession_argsStandardScheme();
- }
- }
-
- private static class CloseSession_argsStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // REQ
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.req = new TCloseSessionReq();
- struct.req.read(iprot);
- struct.setReqIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, CloseSession_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.req != null) {
- oprot.writeFieldBegin(REQ_FIELD_DESC);
- struct.req.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CloseSession_argsTupleSchemeFactory implements SchemeFactory {
- public CloseSession_argsTupleScheme getScheme() {
- return new CloseSession_argsTupleScheme();
- }
- }
-
- private static class CloseSession_argsTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetReq()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetReq()) {
- struct.req.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.req = new TCloseSessionReq();
- struct.req.read(iprot);
- struct.setReqIsSet(true);
- }
- }
- }
-
- }
-
- public static class CloseSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CloseSession_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CloseSession_resultTupleSchemeFactory());
- }
-
- private TCloseSessionResp success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCloseSessionResp.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloseSession_result.class, metaDataMap);
- }
-
- public CloseSession_result() {
- }
-
- public CloseSession_result(
- TCloseSessionResp success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public CloseSession_result(CloseSession_result other) {
- if (other.isSetSuccess()) {
- this.success = new TCloseSessionResp(other.success);
- }
- }
-
- public CloseSession_result deepCopy() {
- return new CloseSession_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public TCloseSessionResp getSuccess() {
- return this.success;
- }
-
- public void setSuccess(TCloseSessionResp success) {
- this.success = success;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((TCloseSessionResp)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof CloseSession_result)
- return this.equals((CloseSession_result)that);
- return false;
- }
-
- public boolean equals(CloseSession_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_success = true && (isSetSuccess());
- builder.append(present_success);
- if (present_success)
- builder.append(success);
-
- return builder.toHashCode();
- }
-
- public int compareTo(CloseSession_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- CloseSession_result typedOther = (CloseSession_result)other;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("CloseSession_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class CloseSession_resultStandardSchemeFactory implements SchemeFactory {
- public CloseSession_resultStandardScheme getScheme() {
- return new CloseSession_resultStandardScheme();
- }
- }
-
- private static class CloseSession_resultStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new TCloseSessionResp();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, CloseSession_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CloseSession_resultTupleSchemeFactory implements SchemeFactory {
- public CloseSession_resultTupleScheme getScheme() {
- return new CloseSession_resultTupleScheme();
- }
- }
-
- private static class CloseSession_resultTupleScheme extends TupleScheme {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new TCloseSessionResp();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class GetInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_args");
-
- private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GetInfo_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GetInfo_argsTupleSchemeFactory());
- }
-
- private TGetInfoReq req; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- REQ((short)1, "req");
-
- private static final Map byName = new HashMap();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // REQ
- return REQ;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetInfoReq.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfo_args.class, metaDataMap);
- }
-
- public GetInfo_args() {
- }
-
- public GetInfo_args(
- TGetInfoReq req)
- {
- this();
- this.req = req;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public GetInfo_args(GetInfo_args other) {
- if (other.isSetReq()) {
- this.req = new TGetInfoReq(other.req);
- }
- }
-
- public GetInfo_args deepCopy() {
- return new GetInfo_args(this);
- }
-
- @Override
- public void clear() {
- this.req = null;
- }
-
- public TGetInfoReq getReq() {
- return this.req;
- }
-
- public void setReq(TGetInfoReq req) {
- this.req = req;
- }
-
- public void unsetReq() {
- this.req = null;
- }
-
- /** Returns true if field req is set (has been assigned a value) and false otherwise */
- public boolean isSetReq() {
- return this.req != null;
- }
-
- public void setReqIsSet(boolean value) {
- if (!value) {
- this.req = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case REQ:
- if (value == null) {
- unsetReq();
- } else {
- setReq((TGetInfoReq)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case REQ:
- return getReq();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case REQ:
- return isSetReq();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof GetInfo_args)
- return this.equals((GetInfo_args)that);
- return false;
- }
-
- public boolean equals(GetInfo_args that) {
- if (that == null)
- return false;
-
- boolean this_present_req = true && this.isSetReq();
- boolean that_present_req = true && that.isSetReq();
- if (this_present_req || that_present_req) {
- if (!(this_present_req && that_present_req))
- return false;
- if (!this.req.equals(that.req))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_req = true && (isSetReq());
- builder.append(present_req);
- if (present_req)
- builder.append(req);
-
- return builder.toHashCode();
- }
-
- public int compareTo(GetInfo_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- GetInfo_args typedOther = (GetInfo_args)other;
-
- lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReq()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GetInfo_args(");
- boolean first = true;
-
- sb.append("req:");
- if (this.req == null) {
- sb.append("null");
- } else {
- sb.append(this.req);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (req != null) {
- req.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class GetInfo_argsStandardSchemeFactory implements SchemeFactory {
- public GetInfo_argsStandardScheme getScheme() {
- return new GetInfo_argsStandardScheme();
- }
- }
-
- private static class GetInfo_argsStandardScheme extends StandardScheme {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // REQ
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.req = new TGetInfoReq();
- struct.req.read(iprot);
- struct.setReqIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.req != null) {
- oprot.writeFieldBegin(REQ_FIELD_DESC);
- struct.req.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class GetInfo_argsTupleSchemeFactory implements SchemeFactory {
- public GetInfo_argsTupleScheme getScheme() {
- return new GetInfo_argsTupleScheme();
- }
- }
-
- private static class GetInfo_argsTupleScheme extends TupleScheme