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]: Error message is confusing when insert data datatype is mismatch(insert data datatype is array, defined field is int64) #30094

Closed
1 task done
zhuwenxing opened this issue Jan 18, 2024 · 7 comments
Assignees
Labels
kind/bug Issues or changes related a bug stale indicates no udpates for 30 days triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@zhuwenxing
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:master and 2.3
- 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

    default_fields = [
        FieldSchema(name="int64", dtype=DataType.INT64, is_primary=True),
        FieldSchema(name="float", dtype=DataType.FLOAT),
        FieldSchema(name="varchar", dtype=DataType.VARCHAR, max_length=65535),
        FieldSchema(name="array_int", dtype=DataType.INT64),
        FieldSchema(name="float_vector", dtype=DataType.FLOAT_VECTOR, dim=dim),
    ]
[[0, 1], [0.0, 1.0], ['0', '1'], [[1, 2], [1, 2]], [[0.8642411687042985, 0.0006037921939255897], [0.7523176566888036, 0.38738388003625346]]]
RPC error: [batch_insert], <DataNotMatchException: (code=1, message=The data in the same column must be of the same type.)>, <Time:{'RPC start': '2024-01-18 15:28:48.981430', 'RPC error': '2024-01-18 15:28:48.981735'}>

I made a mistake in setting ARRAY to INT64 datatype. The error is The data in the same column must be of the same type
but I think this error should be a mismatch of the datatype of true data and defined schema.

The data in the same column must be of the same type should report when I set the datatype to int64, but I insert data like this [1,2,"3", 2.0]

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@zhuwenxing zhuwenxing 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 18, 2024
@zhuwenxing zhuwenxing changed the title [Bug]: Error message is confusing when insert data datatype is mismatch(insert data datatype is array, field is int64) [Bug]: Error message is confusing when insert data datatype is mismatch(insert data datatype is array, defined field is int64) Jan 18, 2024
@xiaofan-luan
Copy link
Collaborator

/assign @smellthemoon

@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 19, 2024
@yanliang567 yanliang567 added this to the 2.3.5 milestone Jan 19, 2024
@yanliang567 yanliang567 removed their assignment Jan 19, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.5, 2.3.6 Jan 22, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.6, 2.3.7 Jan 30, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.7, 2.3.9, 2.3.10 Feb 18, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.10, 2.3.11 Feb 28, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.11, 2.3.12 Mar 11, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.12, 2.3.13 Mar 22, 2024
@talhaanwarch
Copy link

I have set int to int and it give the same error. very confusing error
this is what my metadata look like

'source': {'id_pk': 48755}

and all are int, its not a mix at all.
but changing it to string fix the issue

'source': {'id_pk': '48755'}

@xiaofan-luan
Copy link
Collaborator

I have set int to int and it give the same error. very confusing error this is what my metadata look like

'source': {'id_pk': 48755}

and all are int, its not a mix at all. but changing it to string fix the issue

'source': {'id_pk': '48755'}

it's probably because you claim your datatype as string and try to insert a int?

@talhaanwarch
Copy link

I have set int to int and it give the same error. very confusing error this is what my metadata look like

'source': {'id_pk': 48755}

and all are int, its not a mix at all. but changing it to string fix the issue

'source': {'id_pk': '48755'}

it's probably because you claim your datatype as string and try to insert a int?

hard to tell. as i am using langchain

@yanliang567 yanliang567 modified the milestones: 2.3.13, 2.3.14 Apr 15, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.14, 2.3.15 Apr 23, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.15, 2.3.16 May 16, 2024
Copy link

stale bot commented Jun 16, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@stale stale bot added the stale indicates no udpates for 30 days label Jun 16, 2024
@yanliang567
Copy link
Contributor

@smellthemoon any updates for this?

@stale stale bot removed the stale indicates no udpates for 30 days label Jun 17, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.16, 2.3.19 Jul 9, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.19, 2.3.20 Jul 19, 2024
@yanliang567 yanliang567 modified the milestones: 2.3.20, 2.3.21 Aug 12, 2024
Copy link

stale bot commented Sep 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@stale stale bot added the stale indicates no udpates for 30 days label Sep 11, 2024
@stale stale bot closed this as completed Sep 21, 2024
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 stale indicates no udpates for 30 days triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants