This is an automated email from the ASF dual-hosted git repository.

MaxGekk pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new 56c247f06206 [SPARK-34679][SQL][DOC] Add inferTimestamp option to JSON 
data source options table
56c247f06206 is described below

commit 56c247f0620672c1a1ce9e11700021c3e4f623ad
Author: BRIJ RAJ KISHORE <[email protected]>
AuthorDate: Fri Jun 12 07:53:15 2026 +0200

    [SPARK-34679][SQL][DOC] Add inferTimestamp option to JSON data source 
options table
    
    ### 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.
    
    ### 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)
    
    Closes #56248 from brijrajk/SPARK-34679-infertimestamp-json-doc.
    
    Authored-by: BRIJ RAJ KISHORE <[email protected]>
    Signed-off-by: Max Gekk <[email protected]>
    (cherry picked from commit 5d3aa9a3fb32fd4a35a3d8f1b6d55e1b8c7e804d)
    Signed-off-by: Max Gekk <[email protected]>
---
 docs/sql-data-sources-json.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/sql-data-sources-json.md b/docs/sql-data-sources-json.md
index f3cf7f27d68d..e5c86054c09b 100644
--- a/docs/sql-data-sources-json.md
+++ b/docs/sql-data-sources-json.md
@@ -201,6 +201,12 @@ Data source options of JSON can be set via:
     <td>Sets the string that indicates a timestamp without timezone format. 
Custom date formats follow the formats at <a 
href="https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html";>Datetime
 Patterns</a>. This applies to timestamp without timezone type, note that 
zone-offset and time-zone components are not supported when writing or reading 
this data type.</td>
     <td>read/write</td>
   </tr>
+  <tr>
+    <td><code>inferTimestamp</code></td>
+    <td><code>false</code></td>
+    <td>Allows inferring of <code>TimestampType</code> and 
<code>TimestampNTZType</code> from strings that match the timestamp patterns 
defined by the <code>timestampFormat</code> and <code>timestampNTZFormat</code> 
options respectively.</td>
+    <td>read</td>
+  </tr>
   <tr>
     <td><code>enableDateTimeParsingFallback</code></td>
     <td>Enabled if the time parser policy has legacy settings or if no custom 
date or timestamp pattern was provided.</td>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to