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

When I use parameter to insert vertex, nebula show me an error: -1005:Storage Error: The data type does not meet the requirements. Use the correct type of data. #4375

Open
CorvusYe opened this issue Jul 3, 2022 · 1 comment
Labels
type/feature req Type: feature request

Comments

@CorvusYe
Copy link

CorvusYe commented Jul 3, 2022

I'm not sure if this is a bug.

What happened?

When I use parameter to insert vertex, nebula show me an error: -1005:Storage Error: The data type does not meet the requirements. Use the correct type of data.

About my env

  • OS: CentOS
  • Deploy Style: single-machine
  • Installation Style: Docker
  • Nebula Version: 3.1.0
  • Prod-env: N

How To Reproduce

Steps to reproduce the behavior:

  1. Tag of vertex
    image

  2. Set the parameter in Nebula Studio

    :param name=> 'Test';

    Success

  3. Test the parameter

    return $name

    Output: Test

  4. Insert vertex with parameters

    INSERT VERTEX `person` (
        `name`  
    )
    VALUES "RandowId": (
        $name
    )

    -1005:Storage Error: The data type does not meet the requirements. Use the correct type of data.

Others

When I invoke the method (com.vesoft.nebula.client.graph.net.Session#executeWithParameter), if the parameter is a vertex prop, the error happend too.
Reference other repo of nebula using in java, they use com.vesoft.nebula.client.graph.net.Session#execute to doing their work. For example nebula-jdbc and etc. Maybe it's this problem that stops them.
By the way, when we use string splicing to assemble stmt, it may cause a danger that supports nGQL injection I guess.

@CorvusYe CorvusYe added the type/bug Type: something is unexpected label Jul 3, 2022
@wey-gu
Copy link
Contributor

wey-gu commented Jul 4, 2022

Thanks, this is the requirements on parameter support on dml.

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