Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Jun 5, 2019

What changes were proposed in this pull request?

Move methods that implement v2 catalog operations to CatalogV2Util so they can be used in #24768.

How was this patch tested?

Behavior is validated by existing tests.

@SparkQA
Copy link

SparkQA commented Jun 6, 2019

Test build #106220 has finished for PR 24813 at commit 8463c73.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 6, 2019

Test build #106221 has finished for PR 24813 at commit b1ac505.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member

Thank you for making this first, @rdblue !

properties: Map[String, String],
changes: Seq[TableChange]): Map[String, String] = {
applyPropertiesChanges(properties.asJava, changes).asScala.toMap
}
Copy link
Member

Choose a reason for hiding this comment

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

This is a newly added function during migration.


private def replace(
struct: StructType,
fieldNames: Seq[String],
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for the update. (This field name is modified based on the recent comment.)

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-27964][SQL] Move v2 catalog update methods to CatalogV2Util. [SPARK-27964][SQL] Move v2 catalog update methods to CatalogV2Util Jun 6, 2019
@SparkQA
Copy link

SparkQA commented Jun 6, 2019

Test build #106222 has finished for PR 24813 at commit ca848ba.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Merged to master.

This PR created CatalogV2Util by moving old TestTableCatalog object from test suites to main package org.apache.spark.sql.catalog.v2.utils. We will use this functions to implement V2SessionCatalog. All functions are moved correctly. And, one Scala-version function is added and one parameter is renamed according to the previous comments.

cc @gatorsmile

@gatorsmile
Copy link
Member

I might need more time to understand the proposed V2SessionCatalog. The code movement in this PR is fine to me.

@dongjoon-hyun
Copy link
Member

Thank you, @gatorsmile .

emanuelebardelli pushed a commit to emanuelebardelli/spark that referenced this pull request Jun 15, 2019
## What changes were proposed in this pull request?

Move methods that implement v2 catalog operations to CatalogV2Util so they can be used in apache#24768.

## How was this patch tested?

Behavior is validated by existing tests.

Closes apache#24813 from rdblue/SPARK-27964-add-catalog-v2-util.

Authored-by: Ryan Blue <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants