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

TIMESTAMP support integer #230

Merged
merged 2 commits into from
Dec 1, 2022
Merged

TIMESTAMP support integer #230

merged 2 commits into from
Dec 1, 2022

Conversation

veezhang
Copy link
Contributor

@veezhang veezhang commented Dec 1, 2022

fix: TIMESTAMP support integer
issue 229

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

How do you solve it?

Special notes for your reviewer, ex. impact of this fix, design document, etc:

@veezhang veezhang requested a review from yixinglu as a code owner December 1, 2022 04:14
@@ -17,6 +17,10 @@ import (
"gopkg.in/yaml.v2"
)

var (
reTimestampInteger = regexp.MustCompile(`^(0[xX][0-9a-fA-F]+|0[0-7]+|\d+)$`)
Copy link
Contributor

Choose a reason for hiding this comment

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

0o prefix represent the octal number

Copy link
Contributor Author

@veezhang veezhang Dec 1, 2022

Choose a reason for hiding this comment

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

I've tried.

(root@nebula) [importer_test_v2]> RETURN TIMESTAMP(01234)
+----------------+
| timestamp(668) |
+----------------+
| 668            |
+----------------+
(root@nebula) [importer_test_v2]> RETURN TIMESTAMP(0o1234)
[ERROR (-1004)]: SyntaxError: syntax error near `o1234'

Thu, 01 Dec 2022 13:47:00 CST

Copy link
Contributor

Choose a reason for hiding this comment

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

ACK.

@@ -17,6 +17,10 @@ import (
"gopkg.in/yaml.v2"
)

var (
reTimestampInteger = regexp.MustCompile(`^(0[xX][0-9a-fA-F]+|0[0-7]+|\d+)$`)
Copy link
Contributor

Choose a reason for hiding this comment

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

ACK.

@yixinglu yixinglu requested a review from Aiee as a code owner December 1, 2022 05:50
@yixinglu yixinglu merged commit 9ece886 into vesoft-inc:master Dec 1, 2022
@veezhang
Copy link
Contributor Author

veezhang commented Dec 1, 2022

fix #229

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.

2 participants