Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-273] support spark311 #272

Merged
merged 19 commits into from
May 11, 2021
Merged

Conversation

zhouyuan
Copy link
Collaborator

@zhouyuan zhouyuan commented Apr 22, 2021

What changes were proposed in this pull request?

related #273
supports Spark 3.1.1
notable changes:

  • decimal sum adds isEmpty check
  • Shuffle API changes
  • Columnar ShuffledHashJoins/BroadcastHashjoins extends from a new baseclass

How was this patch tested?

locally verified

@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/native-sql-engine/issues

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

[NSE-${ISSUES_ID}] ${detailed message}

See also:

@zhouyuan zhouyuan force-pushed the wip_spark311 branch 2 times, most recently from 4304a6a to 054de03 Compare April 26, 2021 02:21
@zhouyuan zhouyuan changed the title [DNM] support spark311 [NSE-273] support spark311 May 7, 2021
@github-actions
Copy link

github-actions bot commented May 7, 2021

#273

zhouyuan added 14 commits May 10, 2021 10:16
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
zhouyuan added 3 commits May 10, 2021 10:43
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
@zhouyuan
Copy link
Collaborator Author

@rui-mo the scala unit tests are based on spark300, will disable these tests first and fixed them in following patches

<groupId>com.intel.oap</groupId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we only need to package on arrow-data-source-common now

<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: this is a requirement for thrift-server

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.3</version>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

remove this and use hadoop.version

@@ -168,12 +175,22 @@ case class ColumnarShuffledHashJoinExec(
s"ColumnarShuffledHashJoinExec doesn't support doExecute")
}
override def supportsColumnar = true

// override def inputRDDs(): Seq[RDD[InternalRow]] = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

remove dead code

// protected override def prepareRelation(ctx: CodegenContext): HashedRelationInfo = {
// throw new UnsupportedOperationException(
// "prepareRelation is used by codegen which we don't support")
// }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

dito

@@ -52,8 +52,7 @@ import scala.util.Random
case class ColumnarWindowExec(windowExpression: Seq[NamedExpression],
partitionSpec: Seq[Expression],
orderSpec: Seq[SortOrder],
child: SparkPlan) extends WindowExecBase(windowExpression,
partitionSpec, orderSpec, child) {
child: SparkPlan) extends WindowExecBase {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

WindowExecBase is a trait in spark311

@@ -121,45 +121,15 @@ class ColumnarShuffleManager(conf: SparkConf) extends ShuffleManager with Loggin
* Called on executors by reduce tasks.
*/
override def getReader[K, C](
handle: ShuffleHandle,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: API changes in Shuffle

Signed-off-by: Yuan Zhou <[email protected]>
@zhouyuan zhouyuan merged commit 975fcaa into oap-project:master May 11, 2021
zhouyuan added a commit that referenced this pull request May 13, 2021
* [NSE-262] fix remainer loss in decimal divide (#263)

* fix decimal divide int issue

* correct cpp uts

* use const reference

Co-authored-by: Yuan <[email protected]>

Co-authored-by: Yuan <[email protected]>

* [NSE-261] ArrowDataSource: Add S3 Support (#270)

Closes #261

* [NSE-196] clean up configs in unit tests (#271)

* remove testing config

* remove unused configs

* [NSE-265] Reserve enough memory before UnsafeAppend in builder (#266)

* change the UnsafeAppend to Append

* fix buffer builder in shuffle

shuffle builder use UnsafeAppend API for better performance. it
tries to reserve enough space based on results of last recordbatch,
this maybe not buggy if there's a dense recordbatch after a sparse one.

this patch adds below fixes:
- adds Reset() after Finish() in builder
- reserve length for offset_builder in binary builder

A further clean up on the reservation logic should be needed.

Signed-off-by: Yuan Zhou <[email protected]>

Co-authored-by: Yuan Zhou <[email protected]>

* [NSE-274] Comment to trigger tpc-h RAM test (#275)

Closes #274

* bump cmake to 3.16 (#281)

Signed-off-by: Yuan Zhou <[email protected]>

* [NSE-276] Add option to switch Hadoop version (#277)

Closes #276

* [NSE-119] clean up on comments (#288)

Signed-off-by: Yuan Zhou <[email protected]>

* [NSE-206]Update installation guide and configuration guide. (#289)

* [NSE-206]Update installation guide and configuration guide.

* Fix numaBinding setting issue. & Update description for protobuf

* [NSE-206]Fix Prerequisite and Arrow Installation Steps. (#290)

* [NSE-245]Adding columnar RDD cache support (#246)

* Adding columnar RDD cache support

Signed-off-by: Chendi Xue <[email protected]>

* Directly save reference, only convert to Array[Byte] when calling by BlockManager

Signed-off-by: Chendi Xue <[email protected]>

* Add DeAllocator to construction to make sure this instance will be released once it be deleted by JVM

Signed-off-by: Chendi Xue <[email protected]>

* Delete cache by adding a release in InMemoryRelation

Since unpersist only delete RDD object, seems our deAllocator wasn't being called along
Now we added a release function in InMemoryRelation clearCache() func, may need to think
a new way for 3.1.0

Signed-off-by: Chendi Xue <[email protected]>

* [NSE-207] fix issues found from aggregate unit tests (#233)

* fix incorrect input in Expand

* fix empty input for aggregate

* fix only result expressions

* fix empty aggregate expressions

* fix res attr not found issue

* refine

* fix count distinct with null

* fix groupby of NaN, -0.0 and 0.0

* fix count on mutiple cols with null in WSCG

* format code

* support normalize NaN and 0.0

* revert and update

* support normalize function in WSCG

* [NSE-206]Update documents and License for 1.1.0 (#292)

* [NSE-206]Update documents and remove duplicate parts

* Modify documents by comments

* [NSE-293] fix unsafemap with key = '0' (#294)

Signed-off-by: Yuan Zhou <[email protected]>

* [NSE-257] fix multiple slf4j bindings (#291)

* [NSE-297] Disable incremental compiler in GHA CI (#298)

Closes #297

* [NSE-285] ColumnarWindow: Support Date input in MAX/MIN (#286)

Closes #285

* [NSE-304] Upgrade to Arrow 4.0.0: Change basic GHA TPC-H test target OAP Arrow branch (#306)

* [NSE-302] remove exception (#303)

* [NSE-273] support spark311 (#272)

* support spark 3.0.2

Signed-off-by: Yuan Zhou <[email protected]>

* update to use spark 302 in unit tests

Signed-off-by: Yuan Zhou <[email protected]>

* support spark 311

Signed-off-by: Yuan Zhou <[email protected]>

* fix

Signed-off-by: Yuan Zhou <[email protected]>

* fix missing dep

Signed-off-by: Yuan Zhou <[email protected]>

* fix broadcastexchange metrics

Signed-off-by: Yuan Zhou <[email protected]>

* fix arrow data source

Signed-off-by: Yuan Zhou <[email protected]>

* fix sum with decimal

Signed-off-by: Yuan Zhou <[email protected]>

* fix c++ code

Signed-off-by: Yuan Zhou <[email protected]>

* adding partial sum decimal sum

Signed-off-by: Yuan Zhou <[email protected]>

* fix hashagg in wscg

Signed-off-by: Yuan Zhou <[email protected]>

* fix partial sum with number type

Signed-off-by: Yuan Zhou <[email protected]>

* fix AQE shuffle copy

Signed-off-by: Yuan Zhou <[email protected]>

* fix shuffle redudant reat

Signed-off-by: Yuan Zhou <[email protected]>

* fix rebase

Signed-off-by: Yuan Zhou <[email protected]>

* fix format

Signed-off-by: Yuan Zhou <[email protected]>

* avoid unecessary fallbacks

Signed-off-by: Yuan Zhou <[email protected]>

* on-demand scala unit tests

Signed-off-by: Yuan Zhou <[email protected]>

* clean up

Signed-off-by: Yuan Zhou <[email protected]>

* [NSE-311] Build reports errors (#312)

Closes #311

* [NSE-257] fix the dependency issue on v2

Co-authored-by: Rui Mo <[email protected]>
Co-authored-by: Hongze Zhang <[email protected]>
Co-authored-by: JiaKe <[email protected]>
Co-authored-by: Wei-Ting Chen <[email protected]>
Co-authored-by: Chendi.Xue <[email protected]>
Co-authored-by: Hong <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant