-
Notifications
You must be signed in to change notification settings - Fork 13
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
3.0 broke #10
Comments
Hello Valentin, Thank you for your feedback, I wasn't actually aware that hashtables were working. But I can imaging it did and that recent changes broke it. |
Hello Valentin, I have uploaded a new version ( Note1: your example doesn't error anymore but doesn't output anything as Note2: No matter what object types you input, you will always get a Just an example test: $Employee =
@{'Id' = 1; 'Name' = 'Aerts'; 'Country' = 'Belgium'; 'Department' = 'Sales'; 'Age' = 40; 'ReportsTo' = 5},
@{'Id' = 2; 'Name' = 'Bauer'; 'Country' = 'Germany'; 'Department' = 'Engineering'; 'Age' = 31; 'ReportsTo' = 4},
@{'Id' = 3; 'Name' = 'Cook'; 'Country' = 'England'; 'Department' = 'Sales'; 'Age' = 69; 'ReportsTo' = 1},
@{'Id' = 4; 'Name' = 'Duval'; 'Country' = 'France'; 'Department' = 'Engineering'; 'Age' = 21; 'ReportsTo' = 5},
@{'Id' = 5; 'Name' = 'Evans'; 'Country' = 'England'; 'Department' = 'Marketing'; 'Age' = 35; 'ReportsTo' = ''},
@{'Id' = 6; 'Name' = 'Fischer'; 'Country' = 'Germany'; 'Department' = 'Engineering'; 'Age' = 29; 'ReportsTo' = 4}
$Department =
@{'Name' = 'Engineering'; 'Country' = 'Germany'},
@{'Name' = 'Marketing'; 'Country' = 'England'},
@{'Name' = 'Sales'; 'Country' = 'France'},
@{'Name' = 'Purchase'; 'Country' = 'France'}
$Employee | FullJoin $Department -On Country -Discern Employee, Department | Format-Table Returns:
|
Thanks for that! It never errored after 3.0 for me, just didn't output anything. I'll look for a different solution, until then I'll just keep https://raw.githubusercontent.com/iRon7/Join-Object/354916dfa845183db772c689e3beb83e65d05a6d/Join-Object.ps1 handy :-) P.S.
|
Ok, we were indeed not at the same page. Quote from About Comparison Operators just above Equality Operators:
Usual comparison: PS C:\> 1 -eq 1
True
PS C:\> 1 -eq 2
False But if you compare a collection this happens: PS C:\> 1,2,3 -eq 4
PS C:\> 1,2,3 -eq 2
2 Where a result of Anyways, the good news is that you can still fall back on the old behavior by supplying an expression instead (where $hostNumaInfo | InnerJoin-Object $hostPciInfo {$Left.PciId -Eq $Right.Id}
Or (probably a little faster): $hostNumaInfo | InnerJoin-Object $hostPciInfo {$Left.PciId -Contains $Right.Id} |
That's great to know! Thanks for the explanation, I learned something :-) |
Hi iRon7,
fe81e70#diff-15113da25fb697cea65f4001c98394fe
broke join for me. I'd guess because my objects contain hashtables?
Just FYI and thanks for your continued work on this! It came in handy a good bit already.
Cheers,
Valentin
The text was updated successfully, but these errors were encountered: