Skip to content

感谢开源,APIJSON 已支持 Milvus,发现部分问题希望解决 #1

Description

@TommyLemon

APIJSON/APIJSON-Demo@a0e703d
image

目前发现以下问题:

1.查不到数据会报错,希望不报错,直接返回 null

image image

Caused by: java.lang.NullPointerException: Cannot invoke "io.milvus.grpc.SearchResults.getResults()" because the return value of "io.milvus.param.R.getData()" is null
at org.datayoo.moql.querier.milvus.MilvusQuerier.toRecordSet(MilvusQuerier.java:160)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:140)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:118)
at apijson.demo.DemoSQLExecutor.execute(DemoSQLExecutor.java:234)
at apijson.orm.AbstractParser.executeSQL(AbstractParser.java:2032)
... 71 more

2.似乎不支持 NOT, != 等 语法

SELECT id,name FROM sys.apijson_user WHERE ( (vMatch(vec,'L2','[[1]]')) AND (id != 1) ) LIMIT 0, 10
image
image
image
Caused by: java.lang.NullPointerException: Cannot invoke "io.milvus.grpc.SearchResults.getResults()" because the return value of "io.milvus.param.R.getData()" is null
at org.datayoo.moql.querier.milvus.MilvusQuerier.toRecordSet(MilvusQuerier.java:160)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:140)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:118)
at apijson.demo.DemoSQLExecutor.execute(DemoSQLExecutor.java:224)
at apijson.orm.AbstractParser.executeSQL(AbstractParser.java:2032)

SELECT id,name FROM sys.apijson_user WHERE ( (vMatch(vec,'L2','[[1]]')) AND (id NOT IN (1,2)) ) LIMIT 0, 10
image
image
image
Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "operand" is null
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildOperand(MilvusQuerier.java:319)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildOperand(MilvusQuerier.java:292)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildOperand(MilvusQuerier.java:281)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildOperand(MilvusQuerier.java:297)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildOperand(MilvusQuerier.java:281)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildWhereClause(MilvusQuerier.java:270)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildSearchParam(MilvusQuerier.java:230)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:138)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:118)
at apijson.demo.DemoSQLExecutor.execute(DemoSQLExecutor.java:224)
at apijson.orm.AbstractParser.executeSQL(AbstractParser.java:2032)

3.必须加 vMatch 和 LIMIT,缺少任何一个都会报错,且 LIMIT 必须带上偏移量(例如 LIMIT 0, 10),希望做成可选

缺少 vMatch 报错 "Target field name cannot be null or empty",这个是官方 SDK 的报错,看能不能推动解决或者兼容
image
image
Caused by: io.milvus.exception.ParamException: Target field name cannot be null or empty
at io.milvus.param.ParamUtils.CheckNullEmptyString(ParamUtils.java:150)
at io.milvus.param.dml.SearchParam$Builder.build(SearchParam.java:303)
at org.datayoo.moql.querier.milvus.MilvusQuerier.buildSearchParam(MilvusQuerier.java:239)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:138)
at org.datayoo.moql.querier.milvus.MilvusQuerier.query(MilvusQuerier.java:118)
at apijson.demo.DemoSQLExecutor.execute(DemoSQLExecutor.java:234)
at apijson.orm.AbstractParser.executeSQL(AbstractParser.java:2032)
... 71 more
2024-01-04 10:59:00.850:

目前 APIJSON 已兼容 Milvus 的 LIMIT,问题不大

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions