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
fix: resolve distributed aggregation, sort merge, join columns, and subquery across shards
Bug 1 - Aggregation missing COUNT column: constant folding was replacing
aggregate functions (COUNT, SUM, AVG, etc.) with NULL when they had no
column references (e.g., COUNT(*)). Fixed by treating aggregate functions
as non-foldable in the constant folding rule. Also added output_exprs to
MERGE_AGGREGATE for proper column naming.
Bug 2 - Sort+Limit returning wrong results: MySQL DECIMAL values were
stored as TAG_STRING instead of TAG_DECIMAL, causing string comparison
("90000" > "110000") instead of numeric. Fixed by returning TAG_DECIMAL
from the MySQL executor and adding TAG_DECIMAL handling to Value::to_double()
and Value::to_int64().
Bug 3 - Cross-shard JOIN columns NULL: collect_tables() recursed into both
sides of SET_OP (UNION ALL) nodes, duplicating table entries and inflating
column offsets so the PROJECT resolver addressed beyond the actual row width.
Fixed by only collecting tables from the left side of SET_OP nodes.
Bug 4 - Distributed subquery empty: SubqueryExecutor built and executed
subquery plans without going through the distributed planner or setting
up the remote executor. Fixed by adding a distribute callback to
PlanExecutor that Session wires up, and propagating remote_executor to
inner subquery executors. Also prevented filter-with-subquery pushdown
to remote shards.
0 commit comments