-
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
FullJoin doesn't work properly when joining multiple array when one of the array is empty #28
Comments
Thanks, for the information. |
At second sight, this issue not really a bug in this context but rather a high-level design limitation. First of all, there are a few features in this
This features are inferieur to the main purpose of this cmdlet: combine two object lists based on a related property between them. Nevertheless, I will do whatever is possible to support them all-in-one. Taken: $a = @('a1', 'a2')
$b = @('b1', 'b2')
$c = @('c1', 'c2')
$d = @('d1', 'd2') I can join these arrays like:
Where:
Now question yourself: what exactly is Which changes the question to: how do I create an array with 1 (or more) columns but no rows? This was not working in previous versions either but implemented from version $arrayList1 = [Object[]]@('james', 'henry')
$arrayList2 = [Object[]]@()
$arrayList1 |FullJoin $arrayList2 -Name arrayList1, arrayList2
arrayList1 arrayList2
---------- ----------
james
henry Note: [Object[]]@() |% { "Result" } Will not show any result. $arrayList1 = [Object[]]@()
$arrayList2 = [Object[]]@('james', 'henry')
FullJoin -Left $arrayList1 -Right $arrayList2 -Name arrayList1, arrayList2
arrayList1 arrayList2
---------- ----------
james
henry |
@iRon7 if i have more than two arraylist what is the command to display all arraylist result?
arraylist = didn't had value |
The easiest way to do this is chaining the join commands: $arraylist1 = @()
$arraylist2 = 'james', 'henry'
$arraylist3 = 'test'
FullJoin -Left ([Object[]]$arrayList1) -Right $arrayList2 |FullJoin $arrayList3 -Name arrayList1, arrayList2, arrayList3
arrayList1 arrayList2 arrayList3
---------- ---------- ----------
james test
henry Note that you have to prefix the empty array with an initiator like |
Create 2 new arrays and add data on first array and don't add any data on second array.
The output looks like this:
Expected:
The text was updated successfully, but these errors were encountered: