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

[BEAM-2247] implement date functions #3207

Closed

Conversation

xumingming
Copy link
Contributor

@xumingmin @jbonofre can you guys take a look at this one?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 48bac03 on xumingming:BEAM-2247-date-functions into ** on apache:DSL_SQL**.

@jbonofre
Copy link
Member

R: @jbonofre

@jbonofre
Copy link
Member

Can you rebase please ?

@xumingming
Copy link
Contributor Author

sure!

@xumingming
Copy link
Contributor Author

Rebase done.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 17a07b1 on xumingming:BEAM-2247-date-functions into ** on apache:DSL_SQL**.

@xumingming
Copy link
Contributor Author

Rebase(again) done.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 0b94e62 on xumingming:BEAM-2247-date-functions into ** on apache:DSL_SQL**.

* <p>Returns the current time in the session time zone, in a value of datatype
* TIMESTAMP WITH TIME ZONE.
*/
public class BeamSqlCurrentTimeExpression extends BeamSqlExpression {
Copy link

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;
Copy link

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?

Copy link
Contributor Author

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.

@mingmxu
Copy link

mingmxu commented Jun 9, 2017

LGTM

Thanks @xumingming

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a88fd78 on xumingming:BEAM-2247-date-functions into ** on apache:DSL_SQL**.

@xumingming
Copy link
Contributor Author

@jbonofre @lukecwik can you take a peek at this one please?

@xumingming
Copy link
Contributor Author

Rebase(again, again) done.

@mingmxu
Copy link

mingmxu commented Jun 13, 2017

CC: @takidau @kennknowles can you take a peak here?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3270152 on xumingming:BEAM-2247-date-functions into ** on apache:DSL_SQL**.

@jbonofre
Copy link
Member

R: @jbonofre

Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

asfgit pushed a commit that referenced this pull request Jun 13, 2017
@jbonofre
Copy link
Member

Merged on DSL_SQL branch. You can close this pull request. Thanks !

@xumingming
Copy link
Contributor Author

Thanks @jbonofre @xumingmin

@xumingming xumingming closed this Jun 13, 2017
@xumingming xumingming deleted the BEAM-2247-date-functions branch June 16, 2017 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants