Skip to content

fix(batch): raise a clear error for unsupported property types - #2264

Open
steven-asearcy wants to merge 1 commit into
weaviate:mainfrom
steven-asearcy:fix/batch-unsupported-type-error
Open

steven-asearcy wants to merge 1 commit into
weaviate:mainfrom
steven-asearcy:fix/batch-unsupported-type-error

Conversation

@steven-asearcy

@steven-asearcy steven-asearcy commented Nov 18, 2026 •

Copy link
Copy Markdown

closes #2263

batch and insert_many passed types they don't handle (Decimal, numpy.float32, etc) straight into protobuf's Struct.update, which fails with ValueError: Unexpected type. now _serialize_primitive raises the same WeaviateInvalidInputError that data.insert already does.

tuples still work, they get turned into lists the same way Struct handled them before.

added unit tests in test/collection/test_batch.py. pytest test and pytest mock_tests pass, and so do the batch and collection integration tests against 1.40.5 using ci/start_weaviate.sh. pre-commit is clean on the changed files apart from pyright, which reports the same 226 errors on main.

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@steven-asearcy

Copy link
Copy Markdown
Author

I agree with the CLA

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batch insert fails the whole batch with "ValueError: Unexpected type" when a value is a Decimal

2 participants