Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-15334][SQL] HiveClient facade not compatible with Hive 0.12 #13127

Closed
wants to merge 2 commits into from

Conversation

clockfly
Copy link
Contributor

@clockfly clockfly commented May 15, 2016

What changes were proposed in this pull request?

HiveClient facade is not compatible with Hive 0.12.

This PR Fixes the following compatibility issues:

  1. org.apache.spark.sql.hive.client.HiveClientImpl use AddPartitionDesc(db, table, ignoreIfExists) to create partitions, however, Hive 0.12 doesn't have this constructor for AddPartitionDesc.
  2. HiveClientImpl uses PartitionDropOptions when dropping partition, however, class PartitionDropOptions doesn't exist in Hive 0.12.
  3. Hive 0.12 doesn't support adding permanent functions. It is not valid to call org.apache.hadoop.hive.ql.metadata.Hive.createFunction, org.apache.hadoop.hive.ql.metadata.Hive.alterFunction, and org.apache.hadoop.hive.ql.metadata.Hive.alterFunction
  4. org.apache.spark.sql.hive.client.VersionsSuite doesn't have enough test coverage for different hive versions 0.12, 0.13, 0.14, 1.0.0, 1.1.0, 1.2.0.

How was this patch tested?

Unit test.

@SparkQA
Copy link

SparkQA commented May 15, 2016

Test build #58621 has finished for PR 13127 at commit 0b20a4c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

inputFormat = Some(classOf[org.apache.hadoop.mapred.TextInputFormat].getName),
outputFormat = Some(
classOf[org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat[_, _]].getName),
serde = Some(classOf[org.apache.hadoop.hive.serde2.`lazy`.LazySimpleSerDe].getName()),
Copy link
Contributor

@liancheng liancheng May 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about importing these Hive classes above instead of using the fully qualified names here?

@yhuai
Copy link
Contributor

yhuai commented May 17, 2016

I have finished my review. Thank you for working on this!

@SparkQA
Copy link

SparkQA commented May 18, 2016

Test build #58739 has finished for PR 13127 at commit 3d694df.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 18, 2016

Test build #58747 has finished for PR 13127 at commit 14ade4a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 18, 2016

Test build #58748 has finished for PR 13127 at commit 4494c43.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@liancheng
Copy link
Contributor

LGTM, merging to master and branch-2.0.

@asfgit asfgit closed this in 6e02aec May 18, 2016
asfgit pushed a commit that referenced this pull request May 18, 2016
## What changes were proposed in this pull request?

HiveClient facade is not compatible with Hive 0.12.

This PR Fixes the following compatibility issues:
1. `org.apache.spark.sql.hive.client.HiveClientImpl` use `AddPartitionDesc(db, table, ignoreIfExists)` to create partitions, however, Hive 0.12 doesn't have this constructor for `AddPartitionDesc`.
2. `HiveClientImpl` uses `PartitionDropOptions` when dropping partition, however, class `PartitionDropOptions` doesn't exist in Hive 0.12.
3. Hive 0.12 doesn't support adding permanent functions. It is not valid to call `org.apache.hadoop.hive.ql.metadata.Hive.createFunction`, `org.apache.hadoop.hive.ql.metadata.Hive.alterFunction`, and `org.apache.hadoop.hive.ql.metadata.Hive.alterFunction`
4. `org.apache.spark.sql.hive.client.VersionsSuite` doesn't have enough test coverage for different hive versions 0.12, 0.13, 0.14, 1.0.0, 1.1.0, 1.2.0.

## How was this patch tested?

Unit test.

Author: Sean Zhong <seanzhong@databricks.com>

Closes #13127 from clockfly/versionSuite.

(cherry picked from commit 6e02aec)
Signed-off-by: Cheng Lian <lian@databricks.com>
asfgit pushed a commit that referenced this pull request May 18, 2016
## What changes were proposed in this pull request?

This PR fixes a Scala 2.10 compilation failure introduced in PR #13127.

## How was this patch tested?

Jenkins build.

Author: Cheng Lian <lian@databricks.com>

Closes #13166 from liancheng/hotfix-for-scala-2.10.

(cherry picked from commit c4a45fd)
Signed-off-by: Cheng Lian <lian@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants