Skip to content

Commit

Permalink
[SPARK-51297][DOCS] Fixed the scope of the query option in sql-data-s…
Browse files Browse the repository at this point in the history
…ources-jdbc.md

### What changes were proposed in this pull request?
The documentation shows that the scope of jdbc's option is read/write, but after looking at the source code and testing it, it should actually only be read.
This error has persisted for multiple versions and is still not fixed.

source code:
https://github.com/apache/spark/blob/a661f9f305d96331338938e14b6ea0075f234aee/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCOptions.scala#L287
code snippet:
![SnBKfLO4Fu](https://github.com/user-attachments/assets/93162fc6-fd3f-4c7a-8e36-413c50e3d8ff)
test snippet:
![WWWQRqH6jS](https://github.com/user-attachments/assets/07e3191e-406e-46aa-85a9-9c7902892db3)

### Why are the changes needed?
This avoids user confusion about the use of this option and avoids errors in its use

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
No testing required, just modifying the document

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

Closes apache#50048 from llphxd/fix_jdbc_doc.

Lead-authored-by: huanxiaodong <huanxiaodong@dserspro.com>
Co-authored-by: huanxiaodong <llphxdgg@gmail.com>
Signed-off-by: beliefer <beliefer@163.com>
  • Loading branch information
2 people authored and beliefer committed Feb 24, 2025
1 parent b04e9c4 commit f1d78dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sql-data-sources-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ logging into the data sources.
</code></li>
</ol>
</td>
<td>read/write</td>
<td>read</td>
</tr>
<tr>
<td><code>prepareQuery</code></td>
Expand Down

0 comments on commit f1d78dc

Please sign in to comment.