You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/17 12:12:05 UTC
[GitHub] [spark] HyukjinKwon opened a new pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
HyukjinKwon opened a new pull request #34631:
URL: https://github.com/apache/spark/pull/34631
### What changes were proposed in this pull request?
This PR proposes to support `DayTimeIntervalType` in pandas UDF and Arrow optimization.
- Change the mapping of Arrow's `IntervalType` to `DurationType` for `DayTimeIntervalType` (migration guide updated for Arrow developer APIs).
- Add a type mapping for other code paths: `numpy.timedelta64` <> `pyarrow.duration("us")` <> `DayTimeIntervalType`
This PR is dependent on #34614
### Why are the changes needed?
For changing the mapping of Arrow's `Interval` type to `Duration` type for `DayTimeIntervalType`, please refer to https://github.com/apache/spark/pull/32340#discussion_r750909587.
`DayTimeIntervalType` is already mapped to the concept of duration instead of calendar instance: it's is matched to `pyarrow.duration("us")`, `datetime.timedelta`, and `java.util.Duration`.
### Does this PR introduce _any_ user-facing change?
Yes, after this change, users can use `DayTimeIntervalType` in `SparkSession.createDataFrame(pandas_df)`, `DataFrame.to_pandas`, and pandas UDFs:
```python
>>> import datetime
>>> import pandas as pd
>>> from pyspark.sql.functions import pandas_udf
>>>
>>> @pandas_udf("interval day to second")
... def noop(s: pd.Series) -> pd.Series:
... assert s.iloc[0] == datetime.timedelta(microseconds=123)
... return s
...
>>> df = spark.createDataFrame(pd.DataFrame({"a": [pd.Timedelta(microseconds=123)]}))
>>> df.toPandas()
a
0 0 days 00:00:00.000123
```
### How was this patch tested?
Manually tested, and unittests were added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751946892
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -19,19 +19,14 @@
import org.apache.arrow.vector.*;
import org.apache.arrow.vector.complex.*;
-import org.apache.arrow.vector.holders.NullableIntervalDayHolder;
import org.apache.arrow.vector.holders.NullableVarCharHolder;
import org.apache.spark.sql.util.ArrowUtils;
import org.apache.spark.sql.types.*;
import org.apache.spark.unsafe.types.UTF8String;
-import static org.apache.spark.sql.catalyst.util.DateTimeConstants.MICROS_PER_DAY;
-import static org.apache.spark.sql.catalyst.util.DateTimeConstants.MICROS_PER_MILLIS;
-
/**
- * A column vector backed by Apache Arrow. Currently calendar interval type and map type are not
- * supported.
Review comment:
Don't want to keep `map type ....`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972740485
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145371/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972803638
**[Test build #145377 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145377/testReport)** for PR 34631 at commit [`eb2a55e`](https://github.com/apache/spark/commit/eb2a55ee3f86341bb6e4d73caef4f55e79713daf).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971693576
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49806/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972608645
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49844/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971549156
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145331/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972645592
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49850/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971684595
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49806/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972461088
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49826/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972539074
**[Test build #145355 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145355/testReport)** for PR 34631 at commit [`e2d7ab5`](https://github.com/apache/spark/commit/e2d7ab5c08110dda0b0c92019bf656db624fb157).
* This patch **fails PySpark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751948694
##########
File path: python/pyspark/sql/pandas/conversion.py
##########
@@ -225,7 +227,10 @@ def toPandas(self) -> "PandasDataFrameLike":
else:
series = pdf[column_name]
- if t is not None:
+ # No need to cast for empty series for timedelta.
+ should_check_timedelta = is_timedelta64_dtype(t) and len(pdf) == 0
Review comment:
Thanks for updating it. Looks good now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972608645
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49844/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972585271
**[Test build #145377 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145377/testReport)** for PR 34631 at commit [`eb2a55e`](https://github.com/apache/spark/commit/eb2a55ee3f86341bb6e4d73caef4f55e79713daf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971538206
**[Test build #145331 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145331/testReport)** for PR 34631 at commit [`200205d`](https://github.com/apache/spark/commit/200205d1d779595b6d8df4d33ba188e337e89217).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972355791
cc @cloud-fan, @BryanCutler @ueshin @viirya @Peng-Lei @Yikun FYI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972554111
**[Test build #145371 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145371/testReport)** for PR 34631 at commit [`d90d8bf`](https://github.com/apache/spark/commit/d90d8bfb845fd897350a86f58c6fc890b1f5b77b).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751948058
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -19,19 +19,14 @@
import org.apache.arrow.vector.*;
import org.apache.arrow.vector.complex.*;
-import org.apache.arrow.vector.holders.NullableIntervalDayHolder;
import org.apache.arrow.vector.holders.NullableVarCharHolder;
import org.apache.spark.sql.util.ArrowUtils;
import org.apache.spark.sql.types.*;
import org.apache.spark.unsafe.types.UTF8String;
-import static org.apache.spark.sql.catalyst.util.DateTimeConstants.MICROS_PER_DAY;
-import static org.apache.spark.sql.catalyst.util.DateTimeConstants.MICROS_PER_MILLIS;
-
/**
- * A column vector backed by Apache Arrow. Currently calendar interval type and map type are not
- * supported.
Review comment:
Map type was added from https://github.com/apache/spark/pull/30393 but the doc fix was missing 😂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972438551
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49826/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972740485
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145371/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972675090
Thanks guys.
Merged to master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon edited a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972355791
cc @cloud-fan, @BryanCutler @ueshin @viirya @Peng-Lei @Yikun @MaxGekk FYI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751948058
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -19,19 +19,14 @@
import org.apache.arrow.vector.*;
import org.apache.arrow.vector.complex.*;
-import org.apache.arrow.vector.holders.NullableIntervalDayHolder;
import org.apache.arrow.vector.holders.NullableVarCharHolder;
import org.apache.spark.sql.util.ArrowUtils;
import org.apache.spark.sql.types.*;
import org.apache.spark.unsafe.types.UTF8String;
-import static org.apache.spark.sql.catalyst.util.DateTimeConstants.MICROS_PER_DAY;
-import static org.apache.spark.sql.catalyst.util.DateTimeConstants.MICROS_PER_MILLIS;
-
/**
- * A column vector backed by Apache Arrow. Currently calendar interval type and map type are not
- * supported.
Review comment:
Map type was added from https://github.com/apache/spark/pull/30393 but the fix was missing 😂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971538206
**[Test build #145331 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145331/testReport)** for PR 34631 at commit [`200205d`](https://github.com/apache/spark/commit/200205d1d779595b6d8df4d33ba188e337e89217).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972553764
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145355/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972606931
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49844/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972826472
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145377/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972461088
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49826/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751923607
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -549,21 +544,18 @@ int getInt(int rowId) {
}
}
- private static class IntervalDayAccessor extends ArrowVectorAccessor {
+ private static class DurationAccessor extends ArrowVectorAccessor {
- private final IntervalDayVector accessor;
- private final NullableIntervalDayHolder intervalDayHolder = new NullableIntervalDayHolder();
+ private final DurationVector accessor;
Review comment:
oh, so it's just an int64 physically, and the type annotation (or logical type) decides its semantic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972352112
cc @cloud-fan, @BryanCutler @ueshin @viirya @Peng-Lei @Yikun FYI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972645592
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49850/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971577293
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49802/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972643300
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49850/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972734652
**[Test build #145371 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145371/testReport)** for PR 34631 at commit [`d90d8bf`](https://github.com/apache/spark/commit/d90d8bfb845fd897350a86f58c6fc890b1f5b77b).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971815094
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145335/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] viirya commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751944243
##########
File path: python/pyspark/sql/pandas/conversion.py
##########
@@ -225,7 +227,10 @@ def toPandas(self) -> "PandasDataFrameLike":
else:
series = pdf[column_name]
- if t is not None:
+ # No need to cast for empty series for timedelta.
+ should_check_timedelta = is_timedelta64_dtype(t) and len(pdf) == 0
Review comment:
Are you actually meaning `len(pdf) != 0`? Or I miss-read the code/comment?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971549074
**[Test build #145331 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145331/testReport)** for PR 34631 at commit [`200205d`](https://github.com/apache/spark/commit/200205d1d779595b6d8df4d33ba188e337e89217).
* This patch **fails Java style tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] Peng-Lei commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
Peng-Lei commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972575254
LGTM for *.scala and *.java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751947212
##########
File path: python/pyspark/sql/pandas/conversion.py
##########
@@ -225,7 +227,10 @@ def toPandas(self) -> "PandasDataFrameLike":
else:
series = pdf[column_name]
- if t is not None:
+ # No need to cast for empty series for timedelta.
+ should_check_timedelta = is_timedelta64_dtype(t) and len(pdf) == 0
Review comment:
This is, BTW, to work around a bug from Arrow <> pandas.
For some reasons, `pd.Series(pd.Timedelta(...), dtype="object")` created from Arrow becomes `float64` when you cast with `series.astype("timedelta64[us]")` when the data is non-empty - this cannot be reproduced with plain pandas `Series`.
So, here I avoided it by just skipping the casting because the type becomes correct when it is not empty. When data is empty, the type becomes `object`, and it has to be casted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971627735
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49806/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971624394
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49802/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971693576
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49806/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972617174
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49850/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972352112
cc @cloud-fan, @BryanCutler @ueshin @viirya @Peng-Lei @Yikun FYI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972409707
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49826/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972826472
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145377/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972374075
**[Test build #145355 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145355/testReport)** for PR 34631 at commit [`e2d7ab5`](https://github.com/apache/spark/commit/e2d7ab5c08110dda0b0c92019bf656db624fb157).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971637112
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49802/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971587603
**[Test build #145335 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145335/testReport)** for PR 34631 at commit [`a1949a1`](https://github.com/apache/spark/commit/a1949a1c5691e3446e41e1ad0ae82c0fa5889c32).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751945528
##########
File path: python/pyspark/sql/pandas/conversion.py
##########
@@ -225,7 +227,10 @@ def toPandas(self) -> "PandasDataFrameLike":
else:
series = pdf[column_name]
- if t is not None:
+ # No need to cast for empty series for timedelta.
+ should_check_timedelta = is_timedelta64_dtype(t) and len(pdf) == 0
Review comment:
Ohh comments are wrong. Let me rewrite.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971814822
**[Test build #145335 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145335/testReport)** for PR 34631 at commit [`a1949a1`](https://github.com/apache/spark/commit/a1949a1c5691e3446e41e1ad0ae82c0fa5889c32).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751923194
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -549,21 +544,18 @@ int getInt(int rowId) {
}
}
- private static class IntervalDayAccessor extends ArrowVectorAccessor {
+ private static class DurationAccessor extends ArrowVectorAccessor {
- private final IntervalDayVector accessor;
- private final NullableIntervalDayHolder intervalDayHolder = new NullableIntervalDayHolder();
+ private final DurationVector accessor;
Review comment:
do we need to care about precision here? (microsecond)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971637112
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49802/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971549156
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145331/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972585271
**[Test build #145377 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145377/testReport)** for PR 34631 at commit [`eb2a55e`](https://github.com/apache/spark/commit/eb2a55ee3f86341bb6e4d73caef4f55e79713daf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972553764
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145355/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972575653
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49844/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34631:
URL: https://github.com/apache/spark/pull/34631#discussion_r751947485
##########
File path: python/pyspark/sql/pandas/conversion.py
##########
@@ -225,7 +227,10 @@ def toPandas(self) -> "PandasDataFrameLike":
else:
series = pdf[column_name]
- if t is not None:
+ # No need to cast for empty series for timedelta.
Review comment:
```suggestion
# No need to cast for non-empty series for timedelta. The type is already correct.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon closed pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #34631:
URL: https://github.com/apache/spark/pull/34631
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972554111
**[Test build #145371 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145371/testReport)** for PR 34631 at commit [`d90d8bf`](https://github.com/apache/spark/commit/d90d8bfb845fd897350a86f58c6fc890b1f5b77b).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971587603
**[Test build #145335 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145335/testReport)** for PR 34631 at commit [`a1949a1`](https://github.com/apache/spark/commit/a1949a1c5691e3446e41e1ad0ae82c0fa5889c32).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-971815094
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145335/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34631: [SPARK-37277][PYTHON][SQL] Support DayTimeIntervalType in pandas UDF and Arrow optimization
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34631:
URL: https://github.com/apache/spark/pull/34631#issuecomment-972374075
**[Test build #145355 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145355/testReport)** for PR 34631 at commit [`e2d7ab5`](https://github.com/apache/spark/commit/e2d7ab5c08110dda0b0c92019bf656db624fb157).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org