Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL] Results are mismatch with vanilla Spark when using unix_timestamp(yyyy-MM-dd HH:mm:ss,SSS) #6227

Closed
NEUpanning opened this issue Jun 26, 2024 · 3 comments
Labels
bug Something isn't working triage

Comments

@NEUpanning
Copy link
Contributor

NEUpanning commented Jun 26, 2024

Backend

VL (Velox)

Bug description

Results are mismatch with vanilla Spark setting "spark.sql.legacy.timeParserPolicy" to "LEGACY" when using unix_timestamp(yyyy-MM-dd HH:mm:ss,SSS).

create table sql:

CREATE TABLE tbl(a STRING) ;
insert into tbl values("2022-01-04 14:52:40.017")

gluten result:

select unix_timestamp(a) from tbl;
> NULL

spark3.5 result:

set spark.sql.legacy.timeParserPolicy=LEGACY;
select unix_timestamp(a) from tbl;
> 1641279160

Spark version

Spark-3.5.x

Spark configurations

No response

System information

No response

Relevant logs

No response

@NEUpanning NEUpanning added bug Something isn't working triage labels Jun 26, 2024
facebook-github-bot pushed a commit to facebookincubator/velox that referenced this issue Nov 14, 2024
…1386)

Summary:
The Spark legacy datetime formatter allows parsing date from incomplete text,
seeing [code link](https://github.com/openjdk/jdk8/blob/master/jdk/src/share/classes/java/text/DateFormat.java#L351). This PR enables partial date parsing when the `LENIENT_SIMPLE`
or `STRICT_SIMPLE` datetime formatter is used.

Relates issues: #10354, [gluten#6227](apache/incubator-gluten#6227)

Pull Request resolved: #11386

Reviewed By: pedroerp

Differential Revision: D65948039

Pulled By: Yuhta

fbshipit-source-id: 0d17084f723ebeaded7278178982b5a10d9f9fed
@NEUpanning
Copy link
Contributor Author

Resolved by velox#11386

@rui-mo
Copy link
Contributor

rui-mo commented Nov 15, 2024

Hi @NEUpanning, thanks for your contribution. Do we have any unit test in Gluten to ensure this issue has been fixed?

@NEUpanning
Copy link
Contributor Author

@rui-mo Thanks for catching that. I've added unit tests in #7975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants