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

chore(vrl): Add Kind::remove #14775

Merged
merged 25 commits into from
Oct 20, 2022
Merged

chore(vrl): Add Kind::remove #14775

merged 25 commits into from
Oct 20, 2022

Conversation

fuchsnj
Copy link
Member

@fuchsnj fuchsnj commented Oct 7, 2022

closes #13460
makes progress on #7070

This replaces the Kind::remove_at_path with a new Kind::remove.

  • The previous implementation used the old lookup code, which has been migrated in the new implementation.
  • Previously many deletions were not supported, such as coalescing, negative indexing, or compaction. All possible removals are now fully supported.

@netlify
Copy link

netlify bot commented Oct 7, 2022

Deploy Preview for vector-project canceled.

Name Link
🔨 Latest commit a54928d
🔍 Latest deploy log https://app.netlify.com/sites/vector-project/deploys/635146825c3a8a00091b4c62

@github-actions github-actions bot added the domain: vrl Anything related to the Vector Remap Language label Oct 7, 2022
@fuchsnj fuchsnj marked this pull request as ready for review October 7, 2022 21:11
Copy link
Contributor

@pablosichert pablosichert left a comment

Choose a reason for hiding this comment

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

First round of pedantic suggestions 😄

lib/value/src/kind/collection.rs Outdated Show resolved Hide resolved
lib/value/src/kind/collection/index.rs Outdated Show resolved Hide resolved
lib/value/src/kind/collection/index.rs Outdated Show resolved Hide resolved
lib/value/src/kind/comparison.rs Outdated Show resolved Hide resolved
lib/value/src/kind/crud/remove.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@pablosichert pablosichert left a comment

Choose a reason for hiding this comment

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

The remove logic is quite involved, I didn't try to understand every nuance of it. That being said, there was nothing that stood out as particularly odd to me. +1 for the extensive set of tests to cover this area.

lib/value/src/kind/collection/index.rs Show resolved Hide resolved
fuchsnj and others added 2 commits October 17, 2022 12:25
Co-authored-by: Pablo Sichert <mail@pablosichert.com>
Co-authored-by: Pablo Sichert <mail@pablosichert.com>
Copy link
Contributor

@JeanMertz JeanMertz left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for doing this.

lib/value/src/kind/crud/remove.rs Outdated Show resolved Hide resolved
@fuchsnj fuchsnj enabled auto-merge (squash) October 20, 2022 13:01
@fuchsnj fuchsnj merged commit 78a057f into master Oct 20, 2022
@fuchsnj fuchsnj deleted the fuchsnj/kind_remove branch October 20, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: vrl Anything related to the Vector Remap Language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coalescing / negative index typedef errors are silently ignored
3 participants