Skip to content

Conversation

dongjoon-hyun
Copy link
Member

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

What changes were proposed in this pull request?

This PR aims to revise sparkSession/read/write/columns/schema/dtypes/storageLevel API to resemble the other language clients' APIs.

Why are the changes needed?

To provide a consistent UX to the users.

Does this PR introduce any user-facing change?

  • Change func to var like the following.
- public func schema() async throws -> String {
+ public var schema: String {
+   get async throws {
  • Add public explicitly.
  • Revise test cases accordingly.

How was this patch tested?

Pass the CIs and manual review.

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

No.

@dongjoon-hyun
Copy link
Member Author

Hi, @viirya . After your review comments, I revisited and revised similar patterns in the existing APIs in order to provide better consistent UX. Could you review this when you have some time?

var spark: SparkSession
var plan: Plan
var schema: DataType? = nil
private var _schema: DataType? = nil
Copy link
Member Author

Choose a reason for hiding this comment

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

This is renamed to avoid a conflict with public var schema.

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya . Merged to main.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-51702 branch April 3, 2025 06:47
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