Description
When FilterExec has a fetch value (from limit pushdown), the TreeRender display format does not include it in the output, while Default/Verbose formats correctly show fetch=N.
This means EXPLAIN FORMAT TREE output is incomplete — the limit information is silently dropped from the FilterExec node.
Steps to Reproduce
CREATE TABLE t1 (a INT) AS VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-- Default format shows fetch:
EXPLAIN SELECT a FROM t1 WHERE a > 3 LIMIT 5;
-- FilterExec: a@0 > 3, fetch=5 ✅
-- Tree format does NOT show fetch:
EXPLAIN FORMAT TREE SELECT a FROM t1 WHERE a > 3 LIMIT 5;
-- predicate: a > 3 ❌ (missing fetch=5)
Root Cause
In FilterExec::fmt_as, the TreeRender branch only outputs the predicate:
DisplayFormatType::TreeRender => {
write!(f, "predicate={}", fmt_sql(self.predicate.as_ref()))
}
While Default/Verbose correctly includes fetch:
write!(f, "FilterExec: {}{}{}", self.predicate, display_projections, fetch)
Description
When
FilterExechas afetchvalue (from limit pushdown), theTreeRenderdisplay format does not include it in the output, whileDefault/Verboseformats correctly showfetch=N.This means
EXPLAIN FORMAT TREEoutput is incomplete — the limit information is silently dropped from the FilterExec node.Steps to Reproduce
Root Cause
In
FilterExec::fmt_as, theTreeRenderbranch only outputs the predicate:While
Default/Verbosecorrectly includes fetch: