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

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 10a308774b71 [SPARK-47781][SPARK-47791][SPARK-47798][DOCS][FOLLOWUP] 
Update the decimal mapping remarks with JDBC data sources
10a308774b71 is described below

commit 10a308774b71cf774f1e661c5f55829b61c00521
Author: Kent Yao <y...@apache.org>
AuthorDate: Wed Apr 10 14:05:49 2024 -0700

    [SPARK-47781][SPARK-47791][SPARK-47798][DOCS][FOLLOWUP] Update the decimal 
mapping remarks with JDBC data sources
    
    ### What changes were proposed in this pull request?
    
    Followup of SPARK-47781, SPARK-47791 and SPARK-47798, to update the decimal 
mapping remarks with JDBC data sources
    
    ### Why are the changes needed?
    
    doc revision
    
    ### Does this PR introduce _any_ user-facing change?
    
    no
    
    ### How was this patch tested?
    
    doc build
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    no
    
    Closes #45984 from yaooqinn/SPARK-47781-F.
    
    Authored-by: Kent Yao <y...@apache.org>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 docs/sql-data-sources-jdbc.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/sql-data-sources-jdbc.md b/docs/sql-data-sources-jdbc.md
index 84e2d7f06381..d99e7bc9e519 100644
--- a/docs/sql-data-sources-jdbc.md
+++ b/docs/sql-data-sources-jdbc.md
@@ -544,7 +544,7 @@ are also available to connect MySQL, may have different 
mapping rules.
     <tr>
       <td>DECIMAL(p,s) [UNSIGNED]</td>
       <td>DecimalType(min(38, p),(min(18,s)))</td>
-      <td>The column type is bounded to DecimalType(38, 18), thus if any value 
of this column have a actual presion greater 38 will fail with 
DECIMAL_PRECISION_EXCEEDS_MAX_PRECISION </td>
+      <td>The column type is bounded to DecimalType(38, 18), if 'p>38', the 
fraction part will be truncated if exceeded. And if any value of this column 
have an actual precision greater 38 will fail with 
NUMERIC_VALUE_OUT_OF_RANGE.WITHOUT_SUGGESTION error</td>
     </tr>
     <tr>
       <td>DATE</td>
@@ -845,7 +845,7 @@ as the activated JDBC Driver. Note that, different JDBC 
drivers, or different ve
     <tr>
       <td>numeric, decimal</td>
       <td>DecimalType</td>
-      <td></td>
+      <td>Since PostgreSQL 15, 's' can be negative. If 's<0' it'll be adjusted 
to DecimalType(min(p-s, 38), 0); Otherwise, DecimalType(p, s), and if 'p>38', 
the fraction part will be truncated if exceeded. And if any value of this 
column have an actual precision greater 38 will fail with 
NUMERIC_VALUE_OUT_OF_RANGE.WITHOUT_SUGGESTION error</td>
     </tr>
     <tr>
       <td>character varying(n), varchar(n)</td>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to