GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — feat(dataframe): expose the executed physical plan with per-operator metrics · Issue #96 · apache/datafusion-java Open Copy link Labels enhancementNew feature or requestNew feature or request DescriptionIs your feature request related to a problem or challenge?Today there are two ways to inspect the physical plan of a
Both surface the plan as text rows. To answer "did this query produce more output rows than the last run?" or "which operator spilled?" today, callers run DataFusion's Rust API exposes the underlying structure already: Describe the solution you'd likeA new record ExecutedPlan( String name, // "HashAggregateExec" / "DataSourceExec" / etc. String displayDetails, // single-line rendering, e.g. "filter=x > 1" List<ExecutedPlan> children, OperatorMetrics metrics) { } record OperatorMetrics( OptionalLong outputRows, // OutputRows summed across partitions; absent if the operator doesn't track this OptionalLong elapsedComputeNanos, // ElapsedCompute summed across partitions OptionalLong outputBytes, OptionalLong outputBatches, OptionalLong spillCount, OptionalLong spilledBytes, OptionalLong spilledRows, OptionalLong currentMemoryUsage, // peak / latest Gauge value Map<String, Long> customCounters) { // any MetricValue::Count(name) the operator emits }
To make "same plan, before-and-after" work end-to-end, the native side stashes the planned try (DataFrame df = ctx.sql("SELECT count(*) FROM events WHERE ts > '2026-01-01'")) { ExecutedPlan before = df.executedPlan(); // structure, zero metrics System.out.println(before.name()); // "AggregateExec" System.out.println(before.children().get(0).name()); // "DataSourceExec" try (BufferAllocator alloc = new RootAllocator(); ArrowReader r = df.collect(alloc)) { while (r.loadNextBatch()) { /* ... */ } } ExecutedPlan after = df.executedPlan(); // same tree, populated metrics long rows = after.children().get(0).metrics().outputRows().orElse(-1L); } Describe alternatives you've consideredParse the text from Faithful 1:1 mirror of Bundle into the existing Eager getter that runs the query if not already run. Additional contextNo response ActivityMetadataMetadataAssigneesLabelsenhancementNew feature or requestNew feature or request TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |