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

[openCypher tck case] date/datetime/localdatetime/duration #2684

Closed
czpmango opened this issue Jan 22, 2021 · 1 comment
Closed

[openCypher tck case] date/datetime/localdatetime/duration #2684

czpmango opened this issue Jan 22, 2021 · 1 comment
Labels
type/feature req Type: feature request

Comments

@czpmango
Copy link
Contributor

neo4j test:

neo4j@neo4j> return date("1970-6-8") as d;
+------------+
| d          |
+------------+
| 1970-06-08 |
+------------+

1 row available after 27 ms, consumed after another 3 ms
neo4j@neo4j> return date({year: 1816, week: 1}) as d;
+------------+
| d          |
+------------+
| 1816-01-01 |
+------------+

1 row available after 2 ms, consumed after another 1 ms
neo4j@neo4j> return date({year: 1984, month: 10, day: 11}) as d;
+------------+
| d          |
+------------+
| 1984-10-11 |
+------------+

1 row available after 44 ms, consumed after another 2 ms
neo4j@neo4j> return datetime({year: 1984, month: 10, day: 11}) as d;
+-------------------+
| d                 |
+-------------------+
| 1984-10-11T00:00Z |
+-------------------+

1 row available after 33 ms, consumed after another 2 ms
neo4j@neo4j> return localdatetime({year: 1984, month: 10, day: 11}) as d;
+------------------+
| d                |
+------------------+
| 1984-10-11T00:00 |
+------------------+

neo4j@neo4j> return datetime('2015-07-21T21:40:32.142+02:00[Europe/Stockholm]');
+-------------------------------------------------------------+
| datetime('2015-07-21T21:40:32.142+02:00[Europe/Stockholm]') |
+-------------------------------------------------------------+
| 2015-07-21T21:40:32.142+02:00[Europe/Stockholm]             |
+-------------------------------------------------------------+

neo4j@neo4j> return duration('P2.5W');
+-------------------+
| duration('P2.5W') |
+-------------------+
| P17DT12H          |
+-------------------+

nebula test:

(czp@nebula) [nba]> yield date({year: 1816, week: 1}) as d
+----------+
| d        |
+----------+
| BAD_DATA |
+----------+
Got 1 rows (time spent 23669/32619 us)

Fri, 22 Jan 2021 15:23:18 CST

(czp@nebula) [nba]> yield date("1970-6-8") as d
+----------+
| d        |
+----------+
| BAD_DATA |
+----------+
Got 1 rows (time spent 26484/38375 us)

(czp@nebula) [nba]> yield datetime({year: 1816, week: 1}) as d
+----------+
| d        |
+----------+
| BAD_DATA |
+----------+
Got 1 rows (time spent 23521/33883 us)

Fri, 22 Jan 2021 15:28:37 CST

(czp@nebula) [nba]> yield localdatetime({year: 1816, week: 1}) as d
[ERROR (-12)]: SemanticError: `localdatetime({year:1816,week:1})' is not a valid expression : Function `localdatetime' not defined

(czp@nebula) [nba]> yield datetime('2015-07-21T21:40:32.142+02:00[Europe/Stockholm]')
+-----------------------------------------------------------+
| datetime(2015-07-21T21:40:32.142+02:00[Europe/Stockholm]) |
+-----------------------------------------------------------+
| 2015-07-21T21:40:32.000                                   |
+-----------------------------------------------------------+

(czp@nebula) [nba]> yield  duration('P2.5W');
[ERROR (-12)]: SemanticError: `duration(P2.5W)' is not a valid expression : Function `duration' not defined


@czpmango czpmango changed the title [openCypher tck case] data/datatime/localdatatime [openCypher tck case] data/datatime/localdatatime/duration Jan 22, 2021
@czpmango czpmango changed the title [openCypher tck case] data/datatime/localdatatime/duration [openCypher tck case] date/datetime/localdatatime/duration Jan 28, 2021
@czpmango czpmango changed the title [openCypher tck case] date/datetime/localdatatime/duration [openCypher tck case] date/datetime/localdatetime/duration Jan 28, 2021
@Shylock-Hg
Copy link
Contributor

This pr vesoft-inc/nebula-graph#984 resolve a little.

@CPWstatic CPWstatic transferred this issue from vesoft-inc/nebula-graph Aug 28, 2021
@CPWstatic CPWstatic added the type/feature req Type: feature request label Aug 28, 2021
@czpmango czpmango closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature req Type: feature request
Projects
None yet
Development

No branches or pull requests

3 participants