Changes

Summary

  1. [SPARK-37548][INFRA][R][TESTS] Add Java17 SparkR daily test coverage (details)
  2. [SPARK-37545][SQL] V2 CreateTableAsSelect command should qualify (details)
Commit 0843e0da5609e7ce1096bae1701d32919c3cae5f by dongjoon
[SPARK-37548][INFRA][R][TESTS] Add Java17 SparkR daily test coverage

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

This PR aims to add `Java 17` SparkR daily test coverage.

### Why are the changes needed?

To support `Java 17` for SparkR in Apache Spark 3.3.0.

I manually tested SparkR UT on `Java 17` on `MacBook Pro (16-inch, 2021) Apple Silicon M1 Max`.
```
$ java -version
openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu17.30+15-CA (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM Zulu17.30+15-CA (build 17.0.1+12-LTS, mixed mode, sharing)

$ build/sbt -Phive -Psparkr test:package

$ R/install-dev.sh

$ env SPARK_HOME=$PWD R/run-tests.sh
...
══ Skipped ═════════════════════════════════════════════════════════════════════
1. sparkJars tag in SparkContext (test_Windows.R:22:5) - Reason: This test is only for Windows, skipped

══ DONE ════════════════════════════════════════════════════════════════════════
...
+ popd
Tests passed.
```

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

No.

### How was this patch tested?

Manually review. This should be tested after merging.

Closes #34808 from dongjoon-hyun/SPARK-37548.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
The file was modified.github/workflows/build_and_test.yml (diff)
Commit feba5ac32f2598f6ca8a274850934106be0db64d by huaxin_gao
[SPARK-37545][SQL] V2 CreateTableAsSelect command should qualify location

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

Currently, v2 CTAS command doesn't qualify the location:
```
spark.sql("CREATE TABLE testcat.t USING foo LOCATION '/tmp/foo' AS SELECT id FROM source")
spark.sql("DESCRIBE EXTENDED testcat.t").filter("col_name = 'Location'").show

+--------+-------------+-------+
|col_name|    data_type|comment|
+--------+-------------+-------+
|Location|/tmp/foo     |       |
+--------+-------------+-------+
```
, whereas v1 command qualifies the location as `file:/tmp/foo` which is the correct behavior since the default filesystem can change for different sessions.

### Why are the changes needed?

This PR proposes to store the qualified location in order to prevent the issue where default filesystem changes for different sessions.

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

Yes, now, v2 CTAS command will store qualified location:
```
+--------+-------------+-------+
|col_name|    data_type|comment|
+--------+-------------+-------+
|Location|file:/tmp/foo|       |
+--------+-------------+-------+
```

### How was this patch tested?

Added new test

Closes #34806 from imback82/v2_ctas_qualified_loc.

Authored-by: Terry Kim <yuminkim@gmail.com>
Signed-off-by: Huaxin Gao <huaxin_gao@apple.com>
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2DataFrameSessionCatalogSuite.scala (diff)