Skip to content

[SPARK-34679][DOCS] Add inferTimestamp option to JSON data source options table#56248

Open
brijrajk wants to merge 1 commit into
apache:masterfrom
brijrajk:SPARK-34679-infertimestamp-json-doc
Open

[SPARK-34679][DOCS] Add inferTimestamp option to JSON data source options table#56248
brijrajk wants to merge 1 commit into
apache:masterfrom
brijrajk:SPARK-34679-infertimestamp-json-doc

Conversation

@brijrajk
Copy link
Copy Markdown
Contributor

@brijrajk brijrajk commented Jun 1, 2026

What changes were proposed in this pull request?

Added the missing `inferTimestamp` option to the Data Source Options table in
`docs/sql-data-sources-json.md`. The option was absent from the table despite
being available since Spark 3.0.1 and referenced in the migration guide.

The new row is placed after `timestampNTZFormat` (the options it relates to)
with the description matching the Scaladoc in `JSONOptions.scala`:

Allows inferring of `TimestampType` and `TimestampNTZType` from strings that
match the timestamp patterns defined by the `timestampFormat` and
`timestampNTZFormat` options respectively. JSON built-in functions ignore
this option.

Why are the changes needed?

Users have no way to discover `inferTimestamp` from the official options
reference. The option is already mentioned in the migration guide
(`sql-migration-guide.md`) but was never added to the options table.

Fixes https://issues.apache.org/jira/browse/SPARK-34679

Does this PR introduce any user-facing change?

No. Documentation only.

How was this patch tested?

No code change — documentation only. Verified the option is defined in
`JSONOptions.scala` with `inferTimestamp` as the key name and `false` as the
default.

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

Generated-by: Claude (Anthropic)

…ions table

The `inferTimestamp` JSON read option (default `false`) was absent from
the Data Source Options table in sql-data-sources-json.md, despite being
a documented option since Spark 3.0.1. Added the missing row after
`timestampNTZFormat`, with a description matching the Scaladoc in
JSONOptions.scala.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant