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

fix(reduce): properly support nested fields #20776

Closed
wants to merge 3 commits into from
Closed

Conversation

pront
Copy link
Contributor

@pront pront commented Jul 2, 2024

closes: #17637

@github-actions github-actions bot added the domain: transforms Anything related to Vector's transform components label Jul 2, 2024
@pront pront changed the title [IGNORE THIS] test merge strategy with a nested key [TEST REPRO] test merge strategy with a nested key Jul 2, 2024
@pront pront force-pushed the pront/reduce-repo branch 2 times, most recently from fd56fce to 534fb46 Compare July 2, 2024 21:21
tx.send(e_2.into()).await.unwrap();

let output = out.recv().await.unwrap().into_log();
assert_eq!(output["a.b"], json!([1,2]).into());
Copy link
Contributor Author

@pront pront Jul 2, 2024

Choose a reason for hiding this comment

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

thread 'transforms::reduce::transform::test::nested_path_strat' panicked at src/transforms/reduce/transform.rs:810:13:
assertion `left == right` failed
  left: Integer(1)
 right: Array([Integer(1), Integer(2)])

Notes:

self.fields: {KeyString("c"): AddNumbersMerger { v: Int(777) }, KeyString("message"): DiscardMerger { v: Bytes(b"test message 1") }, KeyString("a"): DiscardMerger { v: Object({KeyString("b"): Integer(1)}) }, KeyString("timestamp"): TimestampWindowMerger { started: 2024-07-02T22:13:38.074593Z, latest: 2024-07-02T22:13:38.074593Z }}

strategies: {KeyString("a.b"): Array}

The fields map doesn't have a key a.b.

@pront pront changed the title [TEST REPRO] test merge strategy with a nested key [WIP] repro bug - merge strategy with a nested key Jul 2, 2024
@pront pront changed the title [WIP] repro bug - merge strategy with a nested key fix(reduce): properly support nested fields Jul 3, 2024
@github-actions github-actions bot added domain: external docs Anything related to Vector's external, public documentation domain: core Anything related to core crates i.e. vector-core, core-common, etc labels Jul 3, 2024
@pront pront force-pushed the pront/reduce-repo branch 3 times, most recently from 6ccf778 to e1c8169 Compare July 3, 2024 18:08
@@ -118,7 +118,7 @@ releases: "0.39.0": {
{
type: "chore"
description: """
The deprecated `enterprise` feature and global configuration option has been removed.
The deprecated `enterprise` feature and global configuration option has been removed. See the upgrade guide for details.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea how this ended up in here.

@pront
Copy link
Contributor Author

pront commented Jul 3, 2024

closed in favor of #20790

@pront pront closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: external docs Anything related to Vector's external, public documentation domain: transforms Anything related to Vector's transform components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specifying a merge_strategy has no effect on nested fields.
1 participant