[VL] Remove the unused veloxToArrow metric

Open
#13,341 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, java, scala
Domain
backend

Research direction

Trace veloxToArrow through ColumnarBatch, ResultIterator, Runtime::getMetrics, the JNI Metrics constructor, MetricsUtil.updateTransformerMetricsInternal, and JoinMetricsUpdater.updateJoinMetrics in the Velox and Bolt backends. Start by checking the JVM side after #3854 and the native metric’s production in VeloxColumnarBatch::ensureFlattened; remove its carrying code and the unused parameter. Done when no path sends or consumes the metric and the uninitialized exportNanos_ value is no longer sent.

Written by the indexing model from the issue text.

Description

The native veloxToArrow metric, the time VeloxColumnarBatch::ensureFlattened spends flattening a batch before it is exported, is sent to the JVM in Metrics.SingleMetric. Nothing on the JVM side has read it since #3854. The value is still carried through ColumnarBatch, ResultIterator, Runtime::getMetrics, the JNI Metrics constructor, MetricsUtil.updateTransformerMetricsInternal and JoinMetricsUpdater.updateJoinMetrics, which takes it as a parameter and ignores it. ResultIterator::exportNanos_ is also never initialized, so fetching metrics from an iterator that never produced a batch sends an indeterminate value to the JVM.

The metric and the code that carries it can be removed from the Velox and Bolt backends.

This issue was written with the assistance of AI (Claude Opus).

Dominant language
Scala
Stars
1.6k
Forks
679
Avg merge
4d 16h
Merged PRs (30d)
84

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/gluten

All issues in apache/gluten

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.