-
Notifications
You must be signed in to change notification settings - Fork 653
Open
Description
I don't really know how is the columns ordered after a summarize() my expectation is in the order of:
- In the order of passed columnNames
- In the order of the original table
- In alphabetical order
But it seems to be in random order, and the column name seems to be a factor?
Here's a short example:
public Table createMockTable(String metricName1, String metricName2) {
Table mockTable = Table.create()
.addColumns(
StringColumn.create("id"),
LongColumn.create(metricName1),
LongColumn.create(metricName2)
);
Row row1 = mockTable.appendRow();
row1.setString("id", "123");
row1.setLong(metricName1, 123);
row1.setLong(metricName2, 234);
return mockTable
.summarize(List.of(metricName1, metricName2), AggregateFunctions.sum)
.by("id");
}
@Test
void wat() {
Table mockTable1 = createMockTable("metric1", "metric2");
Table mockTable2 = createMockTable("metricf1", "metricf2");
System.out.println(mockTable1.print());
System.out.println(mockTable2.print());
}And the result is:
null summary
id | Sum [metric1] | Sum [metric2] |
-------------------------------------------
123 | 123 | 234 |
null summary
id | Sum [metricf2] | Sum [metricf1] |
---------------------------------------------
123 | 234 | 123 |
I don't know if this is expected, if it is I can't seems to find this on the docs.
Metadata
Metadata
Assignees
Labels
No labels