Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-7068][CORE] Fix issue updating leaf input metrics #7067

Merged
merged 9 commits into from
Sep 4, 2024

Conversation

ivoson
Copy link
Contributor

@ivoson ivoson commented Aug 30, 2024

What changes were proposed in this pull request?

Fix issue #7068 collecting input metrics such as bytesRead and recordsRead from file scan.

How was this patch tested?

UT added.

Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Aug 30, 2024
Copy link

Run Gluten Clickhouse CI

@ivoson ivoson force-pushed the fix-input-metrics branch from c8c1d4c to a3388f6 Compare August 30, 2024 08:45
Copy link

Run Gluten Clickhouse CI

@ivoson ivoson changed the title Fix issue updating leaf input metrics [GLUTEN-7068][CORE] Fix issue updating leaf input metrics Aug 30, 2024
Copy link

#7068

@ivoson ivoson marked this pull request as ready for review August 30, 2024 09:09
Copy link

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 2, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 2, 2024

Run Gluten Clickhouse CI

@ivoson
Copy link
Contributor Author

ivoson commented Sep 2, 2024

cc @zhztheplayer @ulysses-you can you please review? Thanks

Copy link
Member

@zhztheplayer zhztheplayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching. Just some nits.

Comment on lines 376 to 378
val leavesBuffer = new ArrayBuffer[TransformSupport]()
collectTransformSupportLeaves(child, leavesBuffer)
val leavesMetricsUpdater = leavesBuffer.map(_.metricsUpdater())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: leafBuffer and leafMetricsUpdater? As one should already know they are for leaves.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks.

case t: TransformSupport if t.children.forall(!_.isInstanceOf[TransformSupport]) => true
case _ => false
private def leafInputMetricsUpdater(): InputMetricsWrapper => Unit = {
def collectTransformSupportLeaves(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could rename to collectLeaves? To simplify code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will update in next iteration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

…oleStageTransformer.scala

Co-authored-by: Hongze Zhang <[email protected]>
Copy link

github-actions bot commented Sep 3, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 3, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 3, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 3, 2024

Run Gluten Clickhouse CI

Copy link
Member

@zhztheplayer zhztheplayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link

github-actions bot commented Sep 3, 2024

Run Gluten Clickhouse CI

@zhztheplayer zhztheplayer merged commit 8bc1842 into apache:main Sep 4, 2024
43 checks passed
@ivoson ivoson deleted the fix-input-metrics branch September 4, 2024 09:01
@ulysses-you
Copy link
Contributor

late lgtm

dcoliversun pushed a commit to dcoliversun/gluten that referenced this pull request Sep 11, 2024
sharkdtu pushed a commit to sharkdtu/gluten that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE works for Gluten Core VELOX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants