-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-2247] implement date functions #3207
Conversation
R: @jbonofre |
Can you rebase please ? |
sure! |
48bac03
to
17a07b1
Compare
Rebase done. |
17a07b1
to
0b94e62
Compare
Rebase(again) done. |
* <p>Returns the current time in the session time zone, in a value of datatype | ||
* TIMESTAMP WITH TIME ZONE. | ||
*/ | ||
public class BeamSqlCurrentTimeExpression extends BeamSqlExpression { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this cover BeamSqlCurrentTimestampExpression
as well?
@Override public BeamSqlPrimitive evaluate(BeamSQLRow inputRecord) { | ||
Date date = opValueEvaluated(0, inputRecord); | ||
long time = date.getTime(); | ||
time -= 8 * 3600; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ, what's this shift for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch, the shift is wrong.
LGTM Thanks @xumingming |
a88fd78
to
3270152
Compare
Rebase(again, again) done. |
CC: @takidau @kennknowles can you take a peak here? |
R: @jbonofre |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged on |
Thanks @jbonofre @xumingmin |
@xumingmin @jbonofre can you guys take a look at this one?