-
Notifications
You must be signed in to change notification settings - Fork 439
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-8010][CORE] Don't generate native metrics if transformer don't generate relNode #8011
Changes from 1 commit
2336fb4
416ca53
9bafdd8
78f2c93
0ddc7b3
9e4b75f
3affe1c
a0d15f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,9 @@ case class ExpandExecTransformer( | |
AttributeSet.fromAttributeSets(projections.flatten.map(_.references)) | ||
} | ||
|
||
override def metricsUpdater(): MetricsUpdater = if (projections == null || projections.isEmpty) { | ||
override def isLoop: Boolean = projections == null || projections.isEmpty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/isLoop/isNoop/ |
||
|
||
override def metricsUpdater(): MetricsUpdater = if (isLoop) { | ||
MetricsUpdater.None | ||
} else { | ||
BackendsApiManager.getMetricsApiInstance.genExpandTransformerMetricsUpdater(metrics) | ||
|
@@ -115,7 +117,7 @@ case class ExpandExecTransformer( | |
|
||
override protected def doTransform(context: SubstraitContext): TransformContext = { | ||
val childCtx = child.asInstanceOf[TransformSupport].transform(context) | ||
if (metricsUpdater == MetricsUpdater.None) { | ||
if (isLoop) { | ||
// The computing for this Expand is not needed. | ||
return childCtx | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,9 @@ case class SortExecTransformer( | |
@transient override lazy val metrics = | ||
BackendsApiManager.getMetricsApiInstance.genSortTransformerMetrics(sparkContext) | ||
|
||
override def metricsUpdater(): MetricsUpdater = if (sortOrder == null || sortOrder.isEmpty) { | ||
override def isLoop: Boolean = sortOrder == null || sortOrder.isEmpty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/isLoop/isNoop/ |
||
|
||
override def metricsUpdater(): MetricsUpdater = if (isLoop) { | ||
MetricsUpdater.None | ||
} else { | ||
BackendsApiManager.getMetricsApiInstance.genSortTransformerMetricsUpdater(metrics) | ||
|
@@ -106,7 +108,7 @@ case class SortExecTransformer( | |
|
||
override protected def doTransform(context: SubstraitContext): TransformContext = { | ||
val childCtx = child.asInstanceOf[TransformSupport].transform(context) | ||
if (metricsUpdater == MetricsUpdater.None) { | ||
if (isLoop) { | ||
// The computing for this project is not needed. | ||
return childCtx | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,9 +51,9 @@ case class WindowExecTransformer( | |
@transient override lazy val metrics = | ||
BackendsApiManager.getMetricsApiInstance.genWindowTransformerMetrics(sparkContext) | ||
|
||
override def metricsUpdater(): MetricsUpdater = if ( | ||
windowExpression == null || windowExpression.isEmpty | ||
) { | ||
override def isLoop: Boolean = windowExpression == null || windowExpression.isEmpty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/isLoop/isNoop/ |
||
|
||
override def metricsUpdater(): MetricsUpdater = if (isLoop) { | ||
MetricsUpdater.None | ||
} else { | ||
BackendsApiManager.getMetricsApiInstance.genWindowTransformerMetricsUpdater(metrics) | ||
|
@@ -182,7 +182,7 @@ case class WindowExecTransformer( | |
|
||
override protected def doTransform(context: SubstraitContext): TransformContext = { | ||
val childCtx = child.asInstanceOf[TransformSupport].transform(context) | ||
if (metricsUpdater == MetricsUpdater.None) { | ||
if (isLoop) { | ||
// The computing for this operator is not needed. | ||
return childCtx | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/isLoop/isNoop/