Changes

Summary

  1. [SPARK-37056][CORE] Remove unused code in HistoryServer'ss unit test (details)
  2. [SPARK-37103][INFRA] Switch from Maven to SBT to build Spark on AppVeyor (details)
  3. Revert "[SPARK-37103][INFRA] Switch from Maven to SBT to build Spark on (details)
  4. [SPARK-37037][SQL] Improve byte array sort by unify compareTo function (details)
Commit 8f6af642bc5c48db04c8c99b5897ec052c1ae15e by srowen
[SPARK-37056][CORE] Remove unused code in HistoryServer'ss unit test

### What changes were proposed in this pull request?
Remove unused code in HistoryServer 's unit test.

Since `HistoryServer.initialize()` is called when construct the object, we should remove the call in unit test.

### Why are the changes needed?
Fix ut code

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Existed UT

Closes #34327 from AngersZhuuuu/SPARK-37056.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Sean Owen <srowen@gmail.com>
The file was modifiedcore/src/test/scala/org/apache/spark/deploy/history/RealBrowserUIHistoryServerSuite.scala (diff)
The file was modifiedcore/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala (diff)
Commit 3fc16fc7909937ebfa0bb8382ba20c7af641fba1 by gurwls223
[SPARK-37103][INFRA] Switch from Maven to SBT to build Spark on AppVeyor

### What changes were proposed in this pull request?

This PR proposes to switch from Maven to SBT to build Spark on AppVeyor.

### Why are the changes needed?

Recently, building Spark on AppVeyor almost always fails due to StackOverflowError at compile time.
We can't identify the reason so far but one workaround would be building with SBT.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

AppVeyor itself.

Closes #34373 from sarutak/appveyor-sbt.

Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
The file was modifiedproject/SparkBuild.scala (diff)
The file was modifiedappveyor.yml (diff)
The file was modifieddev/appveyor-install-dependencies.ps1 (diff)
The file was modifiedproject/build.properties (diff)
Commit 5c28b6e580dedd20666c7532e7d2786a6535ae36 by gurwls223
Revert "[SPARK-37103][INFRA] Switch from Maven to SBT to build Spark on AppVeyor"

This reverts commit 3fc16fc7909937ebfa0bb8382ba20c7af641fba1.
The file was modifiedproject/SparkBuild.scala (diff)
The file was modifieddev/appveyor-install-dependencies.ps1 (diff)
The file was modifiedappveyor.yml (diff)
The file was modifiedproject/build.properties (diff)
Commit 74d974a5af998c7c40f97a164f7b0eba2ccd2d4e by srowen
[SPARK-37037][SQL] Improve byte array sort by unify compareTo function of UTF8String and ByteArray

### What changes were proposed in this pull request?

Unify the compare function of `UTF8String` and `ByteArray`.

### Why are the changes needed?

`BinaryType` use `TypeUtils.compareBinary` to compare two byte array, however it's slow since it compares byte array using unsigned int comparison byte by bye.

We can compare them using `Platform.getLong` with unsigned long comparison if they have more than 8 bytes. And here is some histroy about this `TODO` https://github.com/apache/spark/pull/6755/files#r32197461

The benchmark result should be same with `UTF8String`, can be found in https://github.com/apache/spark/pull/19180 (https://github.com/apache/spark/pull/19180#issuecomment-329467838)

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Move test from `TypeUtilsSuite` to `ByteArraySuite`

Closes #34310 from ulysses-you/SPARK-37037.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Sean Owen <srowen@gmail.com>
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala (diff)
The file was modifiedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/TypeUtilsSuite.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TypeUtils.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/types/BinaryType.scala (diff)
The file was addedsql/core/benchmarks/ByteArrayBenchmark-jdk11-results.txt
The file was modifiedcommon/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java (diff)
The file was modifiedcommon/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java (diff)
The file was addedsql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/ByteArrayBenchmark.scala
The file was modifiedcommon/unsafe/src/test/java/org/apache/spark/unsafe/array/ByteArraySuite.java (diff)
The file was addedsql/core/benchmarks/ByteArrayBenchmark-results.txt