Skip to content

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Apr 4, 2025

What changes were proposed in this pull request?

This PR aims to support table API for SparkSession and DataFrameReader.

Why are the changes needed?

For feature parity.

Does this PR introduce any user-facing change?

No, this is a new addition to the unreleased version.

How was this patch tested?

Pass the CIs.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-51719] Support table for SparkSession and DataFrame [SPARK-51719] Support table for SparkSession and DataFrameReader Apr 4, 2025
@dongjoon-hyun
Copy link
Member Author

Could you review this PR too, @viirya ?

func table() async throws {
let tableName = UUID().uuidString.replacingOccurrences(of: "-", with: "")
let spark = try await SparkSession.builder.getOrCreate()
#expect(try await spark.sql("CREATE TABLE \(tableName) AS VALUES (1), (2)").count() == 0)
Copy link
Member

@viirya viirya Apr 6, 2025

Choose a reason for hiding this comment

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

Is it possible to also test view currently?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for review. For views, there are multiple variants like Permanent View, Temporary View, Global Temporary view. So, I postpone the test coverage until now. However, it will be added soon because I'm implementing Catalog, @viirya .

@dongjoon-hyun
Copy link
Member Author

Merged to main~

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