Package io.deephaven.engine.util
Class OuterJoinTools
java.lang.Object
io.deephaven.engine.util.OuterJoinTools
Provides static methods to perform SQL-style left outer and full outer joins.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Table
fullOuterJoin
(@NotNull Table table1, @NotNull Table table2, @NotNull MatchPair[] columnsToMatch, @NotNull MatchPair[] columnsToAdd) Returns a table that has one column for each of table1 columns, and one column corresponding to each of table2 columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero).static Table
fullOuterJoin
(@NotNull Table table1, @NotNull Table table2, @NotNull String columnsToMatch) Returns a table that has one column for each of table1 columns, and all the columns from table2 whose names don't overlap with the name of a column from table1.static Table
fullOuterJoin
(@NotNull Table table1, @NotNull Table table2, @NotNull String columnsToMatch, @NotNull String columnsToAdd) Returns a table that has one column for each of table1 columns, and one column corresponding to each of table2 columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero).static Table
fullOuterJoin
(@NotNull Table table1, @NotNull Table table2, @NotNull Collection<String> columnsToMatch) Returns a table that has one column for each of table1 columns, and all the columns from table2 whose names don't overlap with the name of a column from table1.static Table
fullOuterJoin
(@NotNull Table table1, @NotNull Table table2, @NotNull Collection<String> columnsToMatch, @NotNull Collection<String> columnsToAdd) Returns a table that has one column for each of table1 columns, and one column corresponding to each of table2 columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero).static Table
leftOuterJoin
(@NotNull Table leftTable, @NotNull Table rightTable, @NotNull MatchPair[] columnsToMatch, @NotNull MatchPair[] columnsToAdd) Returns a table that has one column for each of the left table columns, and one column corresponding to each of the right table columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from the source table if the columnsToAdd is length zero).static Table
leftOuterJoin
(@NotNull Table leftTable, @NotNull Table rightTable, @NotNull String columnsToMatch) Returns a table that has one column for each of leftTable columns, and all the columns from rightTable whose names don't overlap with the name of a column from leftTable.static Table
leftOuterJoin
(@NotNull Table leftTable, @NotNull Table rightTable, @NotNull String columnsToMatch, @NotNull String columnsToAdd) Returns a table that has one column for each of the left table columns, and one column corresponding to each of the right table columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from the source table if the columnsToAdd is length zero).static Table
leftOuterJoin
(@NotNull Table leftTable, @NotNull Table rightTable, @NotNull Collection<String> columnsToMatch) Returns a table that has one column for each of leftTable columns, and all the columns from rightTable whose names don't overlap with the name of a column from leftTable.static Table
leftOuterJoin
(@NotNull Table leftTable, @NotNull Table rightTable, @NotNull Collection<String> columnsToMatch, @NotNull Collection<String> columnsToAdd) Returns a table that has one column for each of the left table columns, and one column corresponding to each of the right table columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from the source table if the columnsToAdd is length zero).
-
Constructor Details
-
OuterJoinTools
public OuterJoinTools()
-
-
Method Details
-
fullOuterJoin
@ScriptApi public static Table fullOuterJoin(@NotNull @NotNull Table table1, @NotNull @NotNull Table table2, @NotNull @NotNull MatchPair[] columnsToMatch, @NotNull @NotNull MatchPair[] columnsToAdd) Returns a table that has one column for each of table1 columns, and one column corresponding to each of table2 columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from either table for which there was no match in the other table will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
table1
- input tabletable2
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to add- Returns:
- a table that has one column for each of table1's columns, and one column corresponding to each of table2's columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from either table for which there was no match in the other table will have null values.
-
leftOuterJoin
@ScriptApi public static Table leftOuterJoin(@NotNull @NotNull Table leftTable, @NotNull @NotNull Table rightTable, @NotNull @NotNull MatchPair[] columnsToMatch, @NotNull @NotNull MatchPair[] columnsToAdd) Returns a table that has one column for each of the left table columns, and one column corresponding to each of the right table columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from the source table if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
leftTable
- input tablerightTable
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to add- Returns:
- a table that has one column for each of the left table columns, and one column corresponding to each column listed in columnsToAdd. If columnsToAdd.length==0 one column corresponding to each column of the right table columns whose names don't overlap with the name of a column from the left table is added. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values.
-
leftOuterJoin
@ScriptApi public static Table leftOuterJoin(@NotNull @NotNull Table leftTable, @NotNull @NotNull Table rightTable, @NotNull @NotNull Collection<String> columnsToMatch, @NotNull @NotNull Collection<String> columnsToAdd) Returns a table that has one column for each of the left table columns, and one column corresponding to each of the right table columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from the source table if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
leftTable
- input tablerightTable
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to add- Returns:
- a table that has one column for each of the left table columns, and one column corresponding to each column listed in columnsToAdd. If columnsToAdd.length==0 one column corresponding to each column of the right table columns whose names don't overlap with the name of a column from the left table is added. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values.
-
leftOuterJoin
@ScriptApi public static Table leftOuterJoin(@NotNull @NotNull Table leftTable, @NotNull @NotNull Table rightTable, @NotNull @NotNull Collection<String> columnsToMatch) Returns a table that has one column for each of leftTable columns, and all the columns from rightTable whose names don't overlap with the name of a column from leftTable. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values.- Parameters:
leftTable
- input tablerightTable
- input tablecolumnsToMatch
- match criteria- Returns:
- a table that has one column for each of the left table columns, and one column corresponding to each column listed in columnsToAdd. If columnsToAdd.length==0 one column corresponding to each column of the right table columns whose names don't overlap with the name of a column from the left table is added. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values. Note that this method will cause tick expansion with ticking tables.
-
leftOuterJoin
@ScriptApi public static Table leftOuterJoin(@NotNull @NotNull Table leftTable, @NotNull @NotNull Table rightTable, @NotNull @NotNull String columnsToMatch, @NotNull @NotNull String columnsToAdd) Returns a table that has one column for each of the left table columns, and one column corresponding to each of the right table columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from the source table if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
leftTable
- input tablerightTable
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to add- Returns:
- a table that has one column for each of the left table columns, and one column corresponding to each column listed in columnsToAdd. If columnsToAdd.length==0 one column corresponding to each column of the right table columns whose names don't overlap with the name of a column from the left table is added. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values.
-
leftOuterJoin
@ScriptApi public static Table leftOuterJoin(@NotNull @NotNull Table leftTable, @NotNull @NotNull Table rightTable, @NotNull @NotNull String columnsToMatch) Returns a table that has one column for each of leftTable columns, and all the columns from rightTable whose names don't overlap with the name of a column from leftTable. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values.- Parameters:
leftTable
- input tablerightTable
- input tablecolumnsToMatch
- match criteria- Returns:
- a table that has one column for each of the left table columns, and one column corresponding to each column listed in columnsToAdd. If columnsToAdd.length==0 one column corresponding to each column of the right table columns whose names don't overlap with the name of a column from the left table is added. The returned table will have one row for each matching set of keys between the left table and right table plus one row for any left table key set that doesn't match the right table. Columns from the right table for which there was no match will have null values. Note that this method will cause tick expansion with ticking tables.
-
fullOuterJoin
@ScriptApi public static Table fullOuterJoin(@NotNull @NotNull Table table1, @NotNull @NotNull Table table2, @NotNull @NotNull Collection<String> columnsToMatch, @NotNull @NotNull Collection<String> columnsToAdd) Returns a table that has one column for each of table1 columns, and one column corresponding to each of table2 columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
table1
- input tabletable2
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to add- Returns:
- a table that has one column for each of table1's columns, and one column corresponding to each of table2's columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values.
-
fullOuterJoin
@ScriptApi public static Table fullOuterJoin(@NotNull @NotNull Table table1, @NotNull @NotNull Table table2, @NotNull @NotNull Collection<String> columnsToMatch) Returns a table that has one column for each of table1 columns, and all the columns from table2 whose names don't overlap with the name of a column from table1. The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
table1
- input tabletable2
- input tablecolumnsToMatch
- match criteria- Returns:
- a table that has one column for each of table1's columns, and one column corresponding to each of table2's columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values.
-
fullOuterJoin
@ScriptApi public static Table fullOuterJoin(@NotNull @NotNull Table table1, @NotNull @NotNull Table table2, @NotNull @NotNull String columnsToMatch, @NotNull @NotNull String columnsToAdd) Returns a table that has one column for each of table1 columns, and one column corresponding to each of table2 columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
table1
- input tabletable2
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to add- Returns:
- a table that has one column for each of table1's columns, and one column corresponding to each of table2's columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values.
-
fullOuterJoin
@ScriptApi public static Table fullOuterJoin(@NotNull @NotNull Table table1, @NotNull @NotNull Table table2, @NotNull @NotNull String columnsToMatch) Returns a table that has one column for each of table1 columns, and all the columns from table2 whose names don't overlap with the name of a column from table1. The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values. Note that this method will cause tick expansion with ticking tables.- Parameters:
table1
- input tabletable2
- input tablecolumnsToMatch
- match criteria- Returns:
- a table that has one column for each of table1's columns, and one column corresponding to each of table2's columns listed in the columns to add (or all the columns whose names don't overlap with the name of a column from table1 if the columnsToAdd is length zero). The returned table will have one row for each matching set of keys between the first and second tables, plus one row for any first table key set that doesn't match the second table and one row for each key set from the second table that doesn't match the first table. Columns from the either table for which there was no match in the other table will have null values.
-