Use the correct type of data.

  • nebula 版本:3.1.0
    image

  • 部署方式:单机

  • 安装方式:Docker

  • 是否为线上版本:N

  • 硬件信息
    image

  • 问题的具体描述
    在Nebula Graph Studio 使用参数插入节点时出错
    -1005:Storage Error: The data type does not meet the requirements. Use the correct type of data.

  • 步骤如下

  1. Tag 信息

  2. 设置参数

    :param name=> '测试'
    

    成功

  3. 读取参数

    return $name
    

    输出:测试

  4. 使用参数创建节点

    INSERT VERTEX `person` (
                `name`  
        )
        VALUES "测试": (
              $name
        )
    

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

name之外的两个字段不允许 null 吧?你insert里只有这一个字段哈

按创建的 Schema ,其他两个字段是可以为空的。
试了三个字段全填的情况,也是一样的问题。按道理实际生产中也应该有字段为空的情况。
本来以为是nebula-java中 com.vesoft.nebula.client.graph.net.Session#executeWithParameter 这个接口不支持用参数创建,就在 studio 中试了下。

  • 满字段测试脚本:
    INSERT VERTEX `person` (
            `name`  ,
            `age`,
            `birthday`
    )
    VALUES "测试": (
          $name,
          18,
          datetime('2022-03-02 22:22:22')
    )

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

  • 非参数化的脚本是没问题的
    INSERT VERTEX `person` (
            `age`,
            `birthday`
    )
    VALUES "测试": (
          18,
          datetime('2022-03-02 22:22:22')
    )

成功创建节点

嗯嗯,明白了,带参数的问题,抱错也不太对。
好像现在参数还不支持 dml ,可以麻烦提一个 issue 么?

现在不太确定的是提在哪个项目中。
这边记录的问题主要是基于 nebula-studio 的使用
最初发现插入节点没办法参数化是在 nebula-clients 中发现
按这个情况应该是 nebula 这个项目本身不支持这个特性,刚好两个客户端都没办法实现这样的操作。
不懂 nebula-studio 的后端程序实现是不是 nebula-clients 。
在想提在 nebula 跟 nebula-clients 哪个合适?

参数的解析组装是在服务端的,这个就是 nebula 本身的问题,可以报在 nebula repo 下哈。

提好了,issue#4375,看了几个仓库,都没用到这个接口来创建节点,挺奇怪的,一直都在怀疑是不是自己的打开方式不对 :joy: :joy: :joy:

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。