Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cc81650
Add the date_part() function
MaxGekk Aug 11, 2019
0e571be
Merge remote-tracking branch 'remotes/origin/master' into date_part
MaxGekk Aug 11, 2019
b856859
Support millennium, century and decade by date_part()
MaxGekk Aug 11, 2019
d23b8ba
Uncomment the first usage of date_part()
MaxGekk Aug 11, 2019
af51e52
Reuse date_part() from extract
MaxGekk Aug 11, 2019
e68611a
Add a description for DatePart
MaxGekk Aug 12, 2019
e1d5a75
Merge remote-tracking branch 'remotes/origin/master' into date_part
MaxGekk Aug 14, 2019
ae353b9
Regen extract.sql.out
MaxGekk Aug 14, 2019
f3b2772
Regen timestamp.sql.out
MaxGekk Aug 14, 2019
b795ebc
Add synonyms for field
MaxGekk Aug 14, 2019
efc3ee0
Regen date_part.sql.out
MaxGekk Aug 14, 2019
188d7de
Merge remote-tracking branch 'remotes/origin/master' into date_part
MaxGekk Aug 14, 2019
9935c01
Add isoyear, milliseconds, microseconds and epoch
MaxGekk Aug 14, 2019
c918eb0
Re-gen extract.sql.out
MaxGekk Aug 14, 2019
bcf73d2
Re-gen date.sql.out
MaxGekk Aug 14, 2019
7c549c7
Uncomment 2 queries in timestamp.sql
MaxGekk Aug 15, 2019
1b2c8d4
List all values of field
MaxGekk Aug 15, 2019
2fa25b1
Put synonyms to ()
MaxGekk Aug 16, 2019
494679c
Remove unneeded backquotes
MaxGekk Aug 16, 2019
5c8c34d
Remove backquotes around year, month, day, hour, minute and second
MaxGekk Aug 16, 2019
05b3746
Revert "Remove backquotes around year, month, day, hour, minute and s…
MaxGekk Aug 17, 2019
74a7fec
Turn off ansi mode for a query
MaxGekk Aug 23, 2019
bc707df
Fix
maropu Aug 16, 2019
d86c092
Re-gen date_part.sql.out
MaxGekk Aug 23, 2019
ade541d
Re-gen extract.sql.out
MaxGekk Aug 23, 2019
43968c2
Change type of errorHandleFunc to Nothing
MaxGekk Sep 4, 2019
b292931
Merge remote-tracking branch 'origin/master' into date_part
MaxGekk Sep 4, 2019
600eee6
Use backquotes around year, month, day, hour, minute and second
MaxGekk Sep 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add isoyear, milliseconds, microseconds and epoch
  • Loading branch information
MaxGekk committed Aug 14, 2019
commit 9935c01816e09a1be2200e2948c2d6d1c2a49591
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,7 @@ case class DatePart(field: Expression, source: Expression, child: Expression)
case "CENTURY" | "CENTURIES" | "C" | "CENT" => Century(source)
case "DECADE" | "DECADES" | "DEC" | "DECS" => Decade(source)
case "YEAR" | "Y" | "YEARS" | "YR" | "YRS" => Year(source)
case "ISOYEAR" => IsoYear(source)
case "QUARTER" | "QTR" => Quarter(source)
case "MONTH" | "MON" | "MONS" | "MONTHS" => Month(source)
case "WEEK" | "W" | "WEEKS" => WeekOfYear(source)
Expand All @@ -2009,6 +2010,11 @@ case class DatePart(field: Expression, source: Expression, child: Expression)
case "HOUR" | "H" | "HOURS" | "HR" | "HRS" => Hour(source)
case "MINUTE" | "M" | "MIN" | "MINS" | "MINUTES" => Minute(source)
case "SECOND" | "S" | "SEC" | "SECONDS" | "SECS" => Second(source)
case "MILLISECONDS" | "MSEC" | "MSECS" | "MILLISECON" | "MSECONDS" | "MS" =>
Milliseconds(source)
case "MICROSECONDS" | "USEC" | "USECS" | "USECONDS" | "MICROSECON" | "US" =>
Microseconds(source)
case "EPOCH" => Epoch(source)
case other =>
throw new AnalysisException(s"Literals of type '$other' are currently not supported.")
}})
Expand Down