You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While ordering for all columns is supported after #7678, GROUP BY will not work for varchar columns since for now orderedAggregate still uses the original column for merging. i.e
# scatter group by a text column, reuse existing weight_string
"select count(*) k, a, textcol1, b from user group by a, textcol1, b order by k, textcol1"
{
"QueryType": "SELECT",
"Original": "select count(*) k, a, textcol1, b from user group by a, textcol1, b order by k, textcol1",
"Instructions": {
"OperatorType": "Sort",
"Variant": "Memory",
"OrderBy": "0 ASC, 2 ASC",
"Inputs": [
{
"OperatorType": "Aggregate",
"Variant": "Ordered",
"Aggregates": "count(0)",
"Distinct": "false",
"GroupBy": "1, 4, 3",
"Inputs": [
{
"OperatorType": "Route",
"Variant": "SelectScatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select count(*) as k, a, textcol1, b, weight_string(textcol1), weight_string(a), weight_string(b) from `user` where 1 != 1 group by a, textcol1, b",
"OrderBy": "2 ASC, 1 ASC, 3 ASC",
"Query": "select count(*) as k, a, textcol1, b, weight_string(textcol1), weight_string(a), weight_string(b) from `user` group by a, textcol1, b order by textcol1 asc, a asc, b asc",
"Table": "`user`"
}
]
}
]
}
}
Notice that in the plan output the ordered aggregate is using 1,4 and 3 columns instead of 5,4 and 6. To support this the orderedAggregate will also have to store both the column and the weight_string column.
Use Case(s)
GROUP BY on varchar columns in shared keyspace for tables which are not authoritative.
The text was updated successfully, but these errors were encountered:
Feature Description
While ordering for all columns is supported after #7678,
GROUP BY
will not work for varchar columns since for now orderedAggregate still uses the original column for merging. i.eNotice that in the plan output the ordered aggregate is using 1,4 and 3 columns instead of 5,4 and 6. To support this the orderedAggregate will also have to store both the column and the weight_string column.
Use Case(s)
GROUP BY
on varchar columns in shared keyspace for tables which are not authoritative.The text was updated successfully, but these errors were encountered: