This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new 5b81c0fd834 [MINOR][DOCS][PYTHON] Document datetime.timedelta <>
DayTimeIntervalType
5b81c0fd834 is described below
commit 5b81c0fd834f7cf7366e1dcb6fd715a69c270920
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Tue Sep 20 15:27:22 2022 +0900
[MINOR][DOCS][PYTHON] Document datetime.timedelta <> DayTimeIntervalType
### What changes were proposed in this pull request?
This PR proposes to document datetime.timedelta support in PySpark in SQL
DataType reference page. This support was added in SPARK-37275
### Why are the changes needed?
To show the support of datetime.timedelta.
### Does this PR introduce _any_ user-facing change?
Yes, this fixes the documentation.
### How was this patch tested?
CI in this PR should validate the build.
Closes #37939 from HyukjinKwon/minor-daytimeinterval.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit 2aeb8d74c45aea358c0887573f0d549f6111f119)
Signed-off-by: Hyukjin Kwon <[email protected]>
---
docs/sql-ref-datatypes.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/sql-ref-datatypes.md b/docs/sql-ref-datatypes.md
index d699bfe5f28..ba070d2a89a 100644
--- a/docs/sql-ref-datatypes.md
+++ b/docs/sql-ref-datatypes.md
@@ -177,7 +177,7 @@ from pyspark.sql.types import *
|**ByteType**|int or long<br/>**Note:** Numbers will be converted to 1-byte
signed integer numbers at runtime. Please make sure that numbers are within the
range of -128 to 127.|ByteType()|
|**ShortType**|int or long<br/>**Note:** Numbers will be converted to 2-byte
signed integer numbers at runtime. Please make sure that numbers are within the
range of -32768 to 32767.|ShortType()|
|**IntegerType**|int or long|IntegerType()|
-|**LongType**|long<br/>**Note:** Numbers will be converted to 8-byte signed
integer numbers at runtime. Please make sure that numbers are within the range
of -9223372036854775808 to 9223372036854775807.Otherwise, please convert data
to decimal.Decimal and use DecimalType.|LongType()|
+|**LongType**|long<br/>**Note:** Numbers will be converted to 8-byte signed
integer numbers at runtime. Please make sure that numbers are within the range
of -9223372036854775808 to 9223372036854775807. Otherwise, please convert data
to decimal.Decimal and use DecimalType.|LongType()|
|**FloatType**|float<br/>**Note:** Numbers will be converted to 4-byte
single-precision floating point numbers at runtime.|FloatType()|
|**DoubleType**|float|DoubleType()|
|**DecimalType**|decimal.Decimal|DecimalType()|
@@ -186,6 +186,7 @@ from pyspark.sql.types import *
|**BooleanType**|bool|BooleanType()|
|**TimestampType**|datetime.datetime|TimestampType()|
|**DateType**|datetime.date|DateType()|
+|**DayTimeIntervalType**|datetime.timedelta|DayTimeIntervalType()|
|**ArrayType**|list, tuple, or array|ArrayType(*elementType*,
[*containsNull*])<br/>**Note:**The default value of *containsNull* is True.|
|**MapType**|dict|MapType(*keyType*, *valueType*,
[*valueContainsNull]*)<br/>**Note:**The default value of *valueContainsNull* is
True.|
|**StructType**|list or tuple|StructType(*fields*)<br/>**Note:** *fields* is a
Seq of StructFields. Also, two fields with the same name are not allowed.|
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]