-
Notifications
You must be signed in to change notification settings - Fork 460
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] Result mismatch in date format week year #7069
Comments
Hi @ccat3z, does this imply that we need a Spark-specific implementation for the week function instead of reusing the Presto one? cc: @zml1206 |
|
facebookincubator/velox#10930 impl |
Backend
VL (Velox)
Bug description
'Y' means week-based-year in spark (SimpleDateFormat). But velox parse 'Y' as year.
I'm trying tofix this mismatch, and there are two issues that need to be resolved:
JodaDateTimeFormatter interprets Y as the 'year of era', which is diff from SimpleDateFormat in java.
Velox uses ISO standard to calc week date (e.g. Fix Spark WeekFunction on long years facebookincubator/velox#10713). But SimpleDateFormat use GregorianCalendar.
The main difference is that SimpleDateFormat will define the firstDayOfWeek and the minimalDaysInFirstWeek based on locale. Tt is Sunday and 1 day by default. ISO8601 defines it as Monday and 4 days.
Spark version
None
Spark configurations
No response
System information
No response
Relevant logs
No response
The text was updated successfully, but these errors were encountered: