Skip to content

Conversation

Lordworms
Copy link

@Lordworms Lordworms commented Dec 12, 2024

Closes #718

@Fokko Fokko requested a review from c-thiel December 20, 2024 12:43

if !field_type.is_primitive() {
return Err(serde::de::Error::invalid_type(
Unexpected::Other("non-primitive field type"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we help the user here by adding the source-id to the error?

Suggested change
Unexpected::Other("non-primitive field type"),
Unexpected::Other("non-primitive field type"),

let field_type = raw_spec
.schema
.field_by_id(field.source_id)
.ok_or_else(|| serde::de::Error::custom("Invalid value"))?
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, can we add the field-id that cannot be found?

Suggested change
.ok_or_else(|| serde::de::Error::custom("Invalid value"))?
.ok_or_else(|| serde::de::Error::custom("Invalid value"))?

@jonathanc-n
Copy link
Contributor

@Lordworms Hello, are you still working on this, if not I would be interested in taking this up or making the corrections?

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.

Ensure Partition Specs can only contain primitive types
3 participants