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

RETURN timestamp(-1) returns BAD_DATA #2665

Closed
randomJoe211 opened this issue Apr 8, 2021 · 9 comments
Closed

RETURN timestamp(-1) returns BAD_DATA #2665

randomJoe211 opened this issue Apr 8, 2021 · 9 comments
Labels
type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently

Comments

@randomJoe211
Copy link
Contributor

As the title states. An error should be a more logical return, right?

image

@laura-ding
Copy link
Contributor

laura-ding commented Apr 8, 2021

As the title states. An error should be a more logical return, right?

image

TIMESTAMP has a range of 1970-01-01 00:00:01 UTC to 2262-04-11 23:47:16 UTC. So if out of range , it's the bad_data

@randomJoe211
Copy link
Contributor Author

BAD_DATA is confusing. Maybe raise an error and list the supported argument type and range.

@laura-ding
Copy link
Contributor

laura-ding commented Apr 8, 2021

BAD_DATA is confusing. Maybe raise an error and list the supported argument type and range.

All functions through return BAD_DATA to tell the user the calculation result is wrong. If the type is wrong, it will return an error.

@jievince
Copy link
Contributor

BAD_DATA is confusing. Maybe raise an error and list the supported argument type and range.

All functions through return BAD_DATA to tell the user the calculation result is wrong. If the type is wrong, it will return an error.

As @czpmango said, expression::eval() may return StatusOr to report detailed error msg

@czpmango
Copy link
Contributor

BAD_DATA is confusing. Maybe raise an error and list the supported argument type and range.

Your are right. We will modify the error passing mechanism of the expression later.

@czpmango
Copy link
Contributor

BAD_DATA is confusing. Maybe raise an error and list the supported argument type and range.

All functions through return BAD_DATA to tell the user the calculation result is wrong. If the type is wrong, it will return an error.

As @czpmango said, expression::eval() may return StatusOr to report detailed error msg

ACK. But it maybe a big change on implementation layer.

@czpmango
Copy link
Contributor

There are so many differences between our time-related function and CYPHER's, some of which in https://github.com/vesoft-inc/nebula-graph/issues/676

@Shylock-Hg
Copy link
Contributor

Shylock-Hg commented Apr 26, 2021

Raise error in this case that meet the invalid parameter value is not well, some the input come from previous output and it's also get from previous executor so there may contain valid and invalid data together, user can't know is it valid always.

@CPWstatic CPWstatic transferred this issue from vesoft-inc/nebula-graph Aug 28, 2021
@CPWstatic CPWstatic added the need to discuss Solution: issue or PR without a clear conclusion on whether to handle it label Aug 28, 2021
@Sophie-Xie Sophie-Xie added type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently and removed need to discuss Solution: issue or PR without a clear conclusion on whether to handle it labels Aug 30, 2021
@Sophie-Xie
Copy link
Contributor

It is in control, so we suggest to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently
Projects
None yet
Development

No branches or pull requests

7 participants