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

Support path-wildcards ($append, $prepend, $last, $first) for whole objects #92

Open
TobiasNx opened this issue Dec 16, 2021 · 5 comments

Comments

@TobiasNx
Copy link
Collaborator

TobiasNx commented Dec 16, 2021

Adding and copying sub-fields with $append seem to work. But copying and moving whole objects into an array with $append seems not to work:
https://gitlab.com/oersi/oersi-etl/blob/2a05f299ebb6346cf59b4d1ad7b8930531a9a834/data/experimental/appendArrays/test_append_object.flux

See here in the Playground too

Originally posted by @TobiasNx in #80 (comment)

It is related to MR #87 and issue #82 (but for strings) which deals with appending.
If we decide that this should be solved in another MR we should exclude the failing test for complex appending objects.

{
	"animals":[
			{"animal": "dog"},
			{"animal": "cat"},
                        {"animal": "human"},
                        {"animal": "unicorn"},
                       {"animal": "earthworm"}
	],
	"others":  {"animal": "human"}
}
@fsteeg fsteeg changed the title Support $append for hole objects Support $append for whole objects Dec 16, 2021
fsteeg added a commit that referenced this issue Dec 16, 2021
@fsteeg
Copy link
Member

fsteeg commented Dec 22, 2021

See also this example from #94 (comment).

@TobiasNx TobiasNx changed the title Support $append for whole objects Support path-wildcards ($append, $prepend, $last, $first) for whole objects Dec 22, 2021
TobiasNx added a commit to TobiasNx/fix-FunctionalReview-Testing that referenced this issue Feb 1, 2022
@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Feb 1, 2022

See test: TobiasNx/fix-FunctionalReview-Testing@a45d39c

Expected:

{
	"animals":[
			{"animal": "dog"},
			{"animal": "cat"},
			{"animal": "human"},
			{"animal": "unicorn"},
			{"animal": "earthworm"}
	],
	"others": {"animal": "human"}
} 

Is:


{
  "animals" : [ {
    "animal" : "dog"
  }, {
    "animal" : "cat"
  }, {
    "animal" : "earthworm"
  } ],
  "others" : {
    "animal" : "human"
  }
}

@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Feb 1, 2022

@fsteeg
Copy link
Member

fsteeg commented Feb 3, 2022

Will revisit after #102.

@TobiasNx TobiasNx changed the title Support path-wildcards ($append, $prepend, $last, $first) for whole objects Support path-wildcards ($append, $prepend, $last, $first) for whole objects Feb 8, 2022
fsteeg added a commit that referenced this issue Feb 22, 2022
Replace replace*/append* methods with insert* and InsertMode usage

Use get / set / add / remove methods on Record for interaction
@TobiasNx TobiasNx added the needsIntegrationTest Integration test(s) should be provided. label Feb 28, 2022
fsteeg added a commit that referenced this issue Feb 28, 2022
Replace replace*/append* methods with insert* and InsertMode usage

Use get / set / add / remove methods on Record for interaction
TobiasNx added a commit that referenced this issue Mar 2, 2022
TobiasNx added a commit that referenced this issue Mar 2, 2022
@TobiasNx TobiasNx removed the needsIntegrationTest Integration test(s) should be provided. label Mar 2, 2022
fsteeg added a commit that referenced this issue May 5, 2022
Fix issue with testing non-existing refs, update tests
@blackwinter
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants