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

[Bug]: no distinction between path and array subscript for json expr #39298

Open
1 task done
zhagnlu opened this issue Jan 15, 2025 · 2 comments
Open
1 task done

[Bug]: no distinction between path and array subscript for json expr #39298

zhagnlu opened this issue Jan 15, 2025 · 2 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@zhagnlu
Copy link
Contributor

zhagnlu commented Jan 15, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: master 
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

for current json expr, not differ json path or array subscript, for example:
json['0'][0] means json key is '0', and next 0 is array subscript. json[0][0] means the first array's first element.
but now json['0'][0] and json[0][0] all convert key path to 0.0, and can not differ them.

for postgres, it use different string flag to split them like:
json->'0'->>0, first '0' means path, second 0 means array subscript.

for mysql, it also do it, like:
json_extract(data, '$.'0'[0]), using [0] to specify it is array subscript.

so, we also need to distinct these two situation.

Expected Behavior

No response

Steps To Reproduce

Milvus Log

No response

Anything else?

No response

@zhagnlu zhagnlu added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 15, 2025
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 16, 2025
@yanliang567
Copy link
Contributor

/assign @zhagnlu
/unassign

@sre-ci-robot sre-ci-robot assigned zhagnlu and unassigned yanliang567 Jan 16, 2025
@xiaofan-luan
Copy link
Collaborator

Don't quite understand this,
json['0'] means key as '0', json[0] means array offset 0, is there any problem with current design?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants