Skip to content

Missing syntax support for certain Graph Table queries/keywords #5

Open

Description

@lamdacomplex

Issue Type: Bug

Start a new query and type out a CREATE TABLE statement for an edge table with a CONNECTION constraint.

For example:

CREATE TABLE [core].[isClass] (
    CONSTRAINT [EC_thing_is_classification] CONNECTION ([core].[thing] TO [core].[classification])
) AS EDGE;

The syntax parser reports the following errors:

"Incorrect syntax near 'CONNECTION'.
"Incorrect syntax near '[core]'.  Expecting '(', or SELECT."

Additionally, writing a valid SELECT query using MATCH & SHORTEST_PATH also causes syntax errors.

For example:

SELECT *
  FROM [core].[thing] [thing]
     , [core].[isClass] FOR PATH [isClass]
     , [core].[classification] FOR PATH [classification]
 WHERE MATCH(SHORTEST_PATH([thing](-([isClass])->[classification])+))

Shows these syntax errors:

"Incorrect syntax near 'PATH'."
"Incorrect syntax near 'SHORTEST_PATH'.  Expecting '(', or SELECT."
"Incorrect syntax near '[thing]'.  Expecting '(', or SELECT."
"Incorrect syntax near '-'.  Expecting '(', or SELECT."
"Incorrect syntax near '[isClass]'.  Expecting '(', or SELECT."

Azure Data Studio version: azuredatastudio 1.34.0 (83a4316cf89cbf961a0f09a72c861379cfd01fa9, 2021-12-15T20:47:33.863Z)
OS version: Windows_NT x64 10.0.18363
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 x 1697)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.33GB (16.02GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (6)
Extension Author (truncated) Version
admin-pack Mic 0.0.2
admin-tool-ext-win Mic 0.0.3
agent Mic 0.48.0
dacpac Mic 1.8.0
import Mic 1.5.0
profiler Mic 0.11.0

Activity

  1. lamdacomplex commented on Feb 15, 2022

    @lamdacomplex
    Author
  2. alanrenmsft commented on Feb 16, 2022

    @alanrenmsft

    looks like SSMS is also having the issue.

  3. lamdacomplex commented on Feb 16, 2022

    @lamdacomplex
    Author

    Ops Clicked the close by accident. Meant to just reply.

    I've had mixed results in SSMS. I have a query right now that uses similar queries with the same syntax but no errors are showing. On my work PC I get similar syntax errors but at home I don't. Might simply be a difference in SSMS versions (18.8 vs 18.10).

  4. alanrenmsft commented on Sep 15, 2022

    @alanrenmsft

    Hai Cao (@caohai) I wanted to get this fixed but didn't get a chance, could you please pick up this one? you can check with Charles Gagnon (@Charles-Gagnon) to see whether this is documented.

    it actually goes beyond this particular issue, I think in general we need to refresh our syntax library version.

  5. caohai commented on Sep 15, 2022

    @caohai
    Member

    Hai Cao (@caohai) I wanted to get this fixed but didn't get a chance, could you please pick up this one? you can check with Charles Gagnon (@Charles-Gagnon) to see whether this is documented.

    it actually goes beyond this particular issue, I think in general we need to refresh our syntax library version.

    Sure I can pick this one up. I'll take a look.

  6. Charles-Gagnon commented on Sep 15, 2022

    @Charles-Gagnon
    Contributor

    For what it's worth - language service stuff was something I'm planning on taking up here for the next work cycle. So I'll be triaging/fixing all these kinds of issues when we get that started. Always happy to have others helping out though 😁

  7. caohai commented on Sep 26, 2022

    @caohai
    Member

    This issue is confirmed to be a bug in SqlParser, I've filed a bug internally and I'll move this issue to backlog for now.

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions