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 2020/08/11 20:36:36 UTC
[GitHub] [spark] MaxGekk opened a new pull request #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
MaxGekk opened a new pull request #29409:
URL: https://github.com/apache/spark/pull/29409
### What changes were proposed in this pull request?
Fix `DaysWritable` by overriding parent's method `def get(doesTimeMatter: Boolean): Date` from `DateWritable` instead of `Date get()` because the former one uses the first one. The bug occurs because `HiveOutputWriter.write()` call `def get(doesTimeMatter: Boolean): Date` transitively with default implementation from the parent class `DateWritable` which doesn't respect date rebases and uses not initialized `daysSinceEpoch` (0 which `1970-01-01`).
### Why are the changes needed?
The changes fix the bug:
```sql
spark-sql> CREATE TABLE table1 (d date);
spark-sql> INSERT INTO table1 VALUES (date '2020-08-11');
spark-sql> SELECT * FROM table1;
1970-01-01
```
The expected result of the last SQL statement must be **2020-08-11** but got **1970-01-01**.
### Does this PR introduce _any_ user-facing change?
Yes. After the fix, `INSERT` work correctly:
```sql
spark-sql> SELECT * FROM table1;
2020-08-11
```
### How was this patch tested?
Add new test to `HiveSerDeReadWriteSuite`
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672267613
**[Test build #127347 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127347/testReport)** for PR 29409 at commit [`713f6ee`](https://github.com/apache/spark/commit/713f6ee1b6b63edb8d184dbdd4115838800fe412).
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672566456
Merged to master and branch-3.0.
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672268078
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29409:
URL: https://github.com/apache/spark/pull/29409
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672418660
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672267613
**[Test build #127347 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127347/testReport)** for PR 29409 at commit [`713f6ee`](https://github.com/apache/spark/commit/713f6ee1b6b63edb8d184dbdd4115838800fe412).
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672268078
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672418660
----------------------------------------------------------------
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.
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 #29409: [SPARK-32594][SQL] Fix serialization of dates inserted to Hive tables
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29409:
URL: https://github.com/apache/spark/pull/29409#issuecomment-672417423
**[Test build #127347 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127347/testReport)** for PR 29409 at commit [`713f6ee`](https://github.com/apache/spark/commit/713f6ee1b6b63edb8d184dbdd4115838800fe412).
* 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.
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