Skip to content

Definition and Optimizability of ngql sequential sentence #3209

Closed
@czpmango

Description

@czpmango

My test:


(czp@nebula) [nba]> $var = GO FROM "Tim Duncan" OVER * yield like._dst as dst; order by $var.dst;$var1=go from $var.dst over like yield like._dst as dst1,$var.dst as dst2;order by $var.dst
+-----------------+
| dst             |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
| "Manu Ginobili" |
+-----------------+
| "Tony Parker"   |
+-----------------+
Got 7 rows (time spent 15030/16290 us)

(czp@nebula) [nba]> $var = GO FROM "Tim Duncan" OVER * yield like._dst as dst; order by $var.dst;$var1=go from $var.dst over like yield like._dst as dst1,$var.dst as dst2;match (v:player) return v;order by $var.dst
+-----------------+
| dst             |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
| "Manu Ginobili" |
+-----------------+
| "Tony Parker"   |
+-----------------+
Got 7 rows (time spent 47863/49124 us)

(czp@nebula) [nba]> $var = GO FROM "Tim Duncan" OVER * yield like._dst as dst; order by $var.dst;$var1=go from $var.dst over like yield like._dst as dst1,$var.dst as dst2|match (v:player) return v;order by $var.dst
+-----------------+
| dst             |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
|                 |
+-----------------+
| "Manu Ginobili" |
+-----------------+
| "Tony Parker"   |
+-----------------+
Got 7 rows (time spent 48728/49929 us)

(czp@nebula) [nba]> $var = GO FROM "Tim Duncan" OVER * yield like._dst as dst; order by $var.dst;$var1=go from $var.dst over like yield like._dst as dst1,$var.dst as dst2;go from $var1.dst1 over like yield like._dst as dst33, $var.dst
+-----------------+----------+
| dst33           | $var.dst |
+-----------------+----------+
| "Tim Duncan"    | __NULL__ |
+-----------------+----------+
| "Tony Parker"   | __NULL__ |
+-----------------+----------+
| "Manu Ginobili" | __NULL__ |
+-----------------+----------+
| "Manu Ginobili" | __NULL__ |
+-----------------+----------+
| "Tony Parker"   | __NULL__ |
+-----------------+----------+
| "Tony Parker"   | __NULL__ |
+-----------------+----------+
| "Tim Duncan"    | __NULL__ |
+-----------------+----------+
Got 7 rows (time spent 21976/23141 us)

Tue, 26 Oct 2021 14:08:38 CST

How to define the behavior intent and optimizability of these statements.
How to define error reporting behavior of sequential sentence.
Just throw out some reflections on the design of Sequential sentence and Variable.
There are no similar cases in the documentation or TCK.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    need to discussSolution: issue or PR without a clear conclusion on whether to handle ittype/feature reqType: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions