You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2021/01/14 21:56:45 UTC
[spark] branch branch-3.1 updated: [SPARK-33354][FOLLOWUP][DOC]
Shorten the table width of ANSI compliance casting document
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new c2874f6 [SPARK-33354][FOLLOWUP][DOC] Shorten the table width of ANSI compliance casting document
c2874f6 is described below
commit c2874f670f3150145469921f9518bcc3cff9100e
Author: Gengliang Wang <ge...@databricks.com>
AuthorDate: Thu Jan 14 13:55:39 2021 -0800
[SPARK-33354][FOLLOWUP][DOC] Shorten the table width of ANSI compliance casting document
### What changes were proposed in this pull request?
This is a follow-up of https://github.com/apache/spark/pull/30260
It shortens the table width of ANSI compliance casting document.
### Why are the changes needed?
The table is too wide and the UI of doc site is broken if we scroll the page to right side.
![Screen Shot 2021-01-14 at 3 04 57 PM](https://user-images.githubusercontent.com/1097932/104565897-d2693b80-5601-11eb-9f93-5f603cfc94c1.png)
### Does this PR introduce _any_ user-facing change?
Minor document change
### How was this patch tested?
Build doc site locally and preview:
![Screen Shot 2021-01-14 at 4 44 30 PM](https://user-images.githubusercontent.com/1097932/104565814-b2d21300-5601-11eb-94c4-78c785cda8ed.png)
Closes #31180 from gengliangwang/reviseAnsiDocStyle.
Authored-by: Gengliang Wang <ge...@databricks.com>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
(cherry picked from commit feedd1b44d571301e243ec97557f57b78fe188be)
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
docs/sql-ref-ansi-compliance.md | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/sql-ref-ansi-compliance.md b/docs/sql-ref-ansi-compliance.md
index 08ba07a..983633a 100644
--- a/docs/sql-ref-ansi-compliance.md
+++ b/docs/sql-ref-ansi-compliance.md
@@ -69,19 +69,19 @@ The type conversion of Spark ANSI mode follows the syntax rules of section 6.13
The valid combinations of target data type and source data type in a `CAST` expression are given by the following table.
āYā indicates that the combination is syntactically valid without restriction and āNā indicates that the combination is not valid.
-
-| From\To | NumericType | StringType | DateType | TimestampType | IntervalType | BooleanType | BinaryType | ArrayType | MapType | StructType |
+
+| Source\Target | Numeric | String | Date | Timestamp | Interval | Boolean | Binary | Array | Map | Struct |
|-----------|---------|--------|------|-----------|----------|---------|--------|-------|-----|--------|
-| NumericType | Y | Y | N | N | N | Y | N | N | N | N |
-| StringType | Y | Y | Y | Y | Y | Y | Y | N | N | N |
-| DateType | N | Y | Y | Y | N | N | N | N | N | N |
-| TimestampType | N | Y | Y | Y | N | N | N | N | N | N |
-| IntervalType | N | Y | N | N | Y | N | N | N | N | N |
-| BooleanType | Y | Y | N | N | N | Y | N | N | N | N |
-| BinaryType | Y | N | N | N | N | N | Y | N | N | N |
-| ArrayType | N | N | N | N | N | N | N | Y | N | N |
-| MapType | N | N | N | N | N | N | N | N | Y | N |
-| StructType | N | N | N | N | N | N | N | N | N | Y |
+| Numeric | Y | Y | N | N | N | Y | N | N | N | N |
+| String | Y | Y | Y | Y | Y | Y | Y | N | N | N |
+| Date | N | Y | Y | Y | N | N | N | N | N | N |
+| Timestamp | N | Y | Y | Y | N | N | N | N | N | N |
+| Interval | N | Y | N | N | Y | N | N | N | N | N |
+| Boolean | Y | Y | N | N | N | Y | N | N | N | N |
+| Binary | Y | N | N | N | N | N | Y | N | N | N |
+| Array | N | N | N | N | N | N | N | Y | N | N |
+| Map | N | N | N | N | N | N | N | N | Y | N |
+| Struct | N | N | N | N | N | N | N | N | N | Y |
Currently, the ANSI mode affects explicit casting and assignment casting only.
In future releases, the behaviour of type coercion might change along with the other two type conversion rules.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org