Skip to content

Conversation

@huan233usc
Copy link
Collaborator

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

In parts of catalog integration, e.g. unity catalog, we notice that the catalog plugin will encapsulate the table in the catalog using spark's CatalogTable classes, so we introduce a new constructor to create a dsv2 connector based on spark's catalog.

As a part of the changes, fix the usage of option it represents the addition properties that we want to pass to the hadoop fs for data read and write, so it make more sense to be inferred from the catalogTable.storage.properties than provided arbitrarily and shouldn't be shown as table properties

How was this patch tested?

Updated test

Does this PR introduce any user-facing changes?

No

* @param options table options used to configure the Hadoop conf, table reads and writes
* @throws NullPointerException if identifier or tablePath is null
*/
public SparkTable(Identifier identifier, String tablePath, Map<String, String> options) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we keep the previous constructor? Otherwise we can't read file path table with options

* @throws NullPointerException if identifier or tablePath is null
*/
public SparkTable(Identifier identifier, String tablePath, Map<String, String> options) {
private SparkTable(Identifier identifier, String tablePath, Optional<CatalogTable> catalogTable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, when catalogTable is available, we should get the schema and partitioning from it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants