Skip to content

Conversation

@babumahesh
Copy link

@babumahesh babumahesh commented Sep 24, 2024

What changes were proposed in this pull request?

[CSV Reader] Add Flag to Control Inference of Time-Only Columns as String or Timestamp During Schema Detection

Why are the changes needed?

By default, Spark converts time-only columns to Timestamp type, which can lead to unintended behavior in certain use cases. This new flag will allow users to specify whether time-only columns should be inferred as Timestamp or as String.
This flag inferStringTypeForTimeOnlyColumn can be supplied while reading the CSV files , true will infer as String, default behaviour is false and infers as timestamp.

image

[Default/"inferStringTypeForTimeOnlyColumn" -> "false"]

image

["inferStringTypeForTimeOnlyColumn" -> "true"]

image

Does this PR introduce any user-facing change?
No

How was this patch tested?
Unit tests.

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

@github-actions github-actions bot added the SQL label Sep 24, 2024
@babumahesh babumahesh changed the title [WIP] [SPARK-49763] [SPARK-49763] [CSV] [Schema Detection] Sep 25, 2024
@babumahesh babumahesh changed the title [SPARK-49763] [CSV] [Schema Detection] [SPARK-49763] [CSV] [SQL] [Schema Detection] Sep 25, 2024
@babumahesh
Copy link
Author

@dongjoon-hyun @mridulm @HyukjinKwon Can you please help to review this PR.

@babumahesh
Copy link
Author

@dongjoon-hyun @mridulm @HyukjinKwon Can you please help to review this PR.

Please let me know if there is anything further to be addressed for this PR.

@github-actions
Copy link

github-actions bot commented Jan 8, 2025

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Jan 8, 2025
@github-actions github-actions bot closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant