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

[CORE] Simplify TransformSupport #3426

Merged
merged 2 commits into from
Oct 19, 2023
Merged

[CORE] Simplify TransformSupport #3426

merged 2 commits into from
Oct 19, 2023

Conversation

ulysses-you
Copy link
Contributor

@ulysses-you ulysses-you commented Oct 17, 2023

What changes were proposed in this pull request?

  1. Removes unused methods getBuildPlans and getStreamedLeafPlan
  2. Add new triat LeafTransformSupport and UnaryTransformSupport to simplify columnarInputRDDs
  3. Pull out doExecute and supportsColumnar to TransformSupport
  4. remove COLUMNAR_ITERATOR_ENABLED config

How was this patch tested?

Pass CI

@github-actions
Copy link

Thanks for opening a pull request!

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

https://github.com/oap-project/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
Copy link

Run Gluten Clickhouse CI

1 similar comment
@ulysses-you
Copy link
Contributor Author

Run Gluten Clickhouse CI

@ulysses-you ulysses-you changed the title [WIP] [CORE] Simplify TransformSupport Oct 17, 2023
@@ -58,18 +65,14 @@ trait TransformSupport extends GlutenPlan {
*/
def columnarInputRDDs: Seq[RDD[ColumnarBatch]]

def getBuildPlans: Seq[(SparkPlan, SparkPlan)]

def getStreamedLeafPlan: SparkPlan
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two methods are from first initial commit, but it seems we never use them now. I'm not sure the original idea. cc @rui-mo @zhztheplayer @PHILO-HE @zzcclp if you have some context

Copy link
Contributor

Choose a reason for hiding this comment

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

It's some legacy code copied from Gazelle.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. It looks good to me to remove them from the code.

s"${this.getClass.getSimpleName} doesn't support doExecute")
}

final override lazy val supportsColumnar: Boolean = GlutenConfig.getConf.enableColumnarIterator
Copy link
Contributor

Choose a reason for hiding this comment

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

This config is NOT applicable to velox backend, as only columnar iterator is supported. @zzcclp, @baibaichen, is this config still workable for CH backend? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm +1 to remove this config if does not break CH backend

Copy link
Contributor

Choose a reason for hiding this comment

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

@loneylee, could you please help confirm? Thanks!

@github-actions
Copy link

Run Gluten Clickhouse CI

1 similar comment
@github-actions
Copy link

Run Gluten Clickhouse CI

@github-actions
Copy link

Run Gluten Clickhouse CI

@github-actions
Copy link

Run Gluten Clickhouse CI

1 similar comment
@ulysses-you
Copy link
Contributor Author

Run Gluten Clickhouse CI

@zhouyuan
Copy link
Contributor

/Benchmark Velox

@zhouyuan
Copy link
Contributor

CC @JkSelf

case _ => false
}
.map(_.asInstanceOf[TransformSupport].metricsUpdater())
.getOrElse(new NoopMetricsUpdater)
Copy link
Contributor

Choose a reason for hiding this comment

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

As NoopMetricsUpdater doesn't do any specific thing, maybe, we can change NoopMetricsUpdater from class to object type. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed

Copy link
Contributor

@zhouyuan zhouyuan left a comment

Choose a reason for hiding this comment

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

+1
nice clean up!

@@ -28,8 +28,7 @@ import java.util
import scala.collection.JavaConverters._

case class FilterExecTransformer(condition: Expression, child: SparkPlan)
extends FilterExecTransformerBase(condition, child)
with TransformSupport {
extends FilterExecTransformerBase(condition, child) {
Copy link
Contributor

Choose a reason for hiding this comment

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

FilterExecTransformerBase already extends TransfromSupport

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@github-actions
Copy link

Run Gluten Clickhouse CI

@GlutenPerfBot
Copy link
Contributor

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query log/native_3426_time.csv log/native_master_10_18_2023_4dbb181cc_time.csv difference percentage
q1 40.82 43.58 2.764 106.77%
q2 24.70 24.34 -0.358 98.55%
q3 40.85 35.79 -5.060 87.61%
q4 33.90 41.52 7.622 122.49%
q5 69.91 70.78 0.876 101.25%
q6 8.68 5.74 -2.946 66.07%
q7 102.76 86.23 -16.533 83.91%
q8 101.52 80.16 -21.358 78.96%
q9 161.65 117.35 -44.300 72.59%
q10 76.15 47.73 -28.428 62.67%
q11 23.98 20.15 -3.836 84.01%
q12 39.86 25.94 -13.923 65.07%
q13 70.79 49.65 -21.133 70.15%
q14 23.43 15.32 -8.111 65.38%
q15 46.30 27.13 -19.169 58.60%
q16 24.69 16.07 -8.621 65.08%
q17 107.19 122.53 15.334 114.31%
q18 217.15 163.25 -53.904 75.18%
q19 25.83 13.15 -12.680 50.91%
q20 40.40 25.17 -15.231 62.30%
q21 335.14 235.27 -99.877 70.20%
q22 16.48 15.49 -0.984 94.03%
total 1632.17 1282.32 -349.858 78.56%

Copy link
Contributor

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks! Will merge the patch soon if no other review comment.

@PHILO-HE PHILO-HE merged commit 6090cea into apache:main Oct 19, 2023
14 checks passed
@ulysses-you ulysses-you deleted the clean branch October 19, 2023 05:30
@GlutenPerfBot
Copy link
Contributor

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query log/native_3426_time.csv log/native_master_10_18_2023_4dbb181cc_time.csv difference percentage
q1 40.28 43.58 3.301 108.19%
q2 24.40 24.34 -0.059 99.76%
q3 39.24 35.79 -3.452 91.20%
q4 35.16 41.52 6.362 118.10%
q5 69.28 70.78 1.504 102.17%
q6 8.63 5.74 -2.891 66.49%
q7 107.06 86.23 -20.830 80.54%
q8 106.49 80.16 -26.331 75.27%
q9 167.76 117.35 -50.413 69.95%
q10 74.83 47.73 -27.107 63.78%
q11 24.62 20.15 -4.475 81.83%
q12 33.09 25.94 -7.153 78.38%
q13 77.60 49.65 -27.944 63.99%
q14 25.06 15.32 -9.739 61.13%
q15 46.14 27.13 -19.006 58.80%
q16 20.95 16.07 -4.886 76.68%
q17 107.37 122.53 15.160 114.12%
q18 219.65 163.25 -56.409 74.32%
q19 26.54 13.15 -13.382 49.57%
q20 37.88 25.17 -12.711 66.44%
q21 326.67 235.27 -91.403 72.02%
q22 16.24 15.49 -0.748 95.39%
total 1634.93 1282.32 -352.611 78.43%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants