Skip to content

Commit d197150

Browse files
committed
add hdfs test
1 parent ede0e49 commit d197150

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

.github/workflows/pr_build_linux.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ jobs:
182182
suites: |
183183
org.apache.comet.parquet.ParquetReadFromFakeHadoopFsSuite
184184
org.apache.comet.parquet.ParquetReadFromHdfsSuite
185+
- value: "hdfs"
186+
suites: |
187+
org.apache.comet.parquet.ParquetReadFromHdfsSuite
185188
fail-fast: false
186189
name: ${{ matrix.os }}/java ${{ matrix.java_version }}-features [${{ matrix.features.value }}]
187190
runs-on: ${{ matrix.os }}
@@ -202,6 +205,6 @@ jobs:
202205
with:
203206
artifact_name: ${{ matrix.os }}-java-${{ matrix.java_version }}-features-${{ matrix.features.value }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
204207
features: ${{ matrix.features.value }}
205-
maven_opts: "-Dtest=none"
208+
maven_opts: "-Dtest=none -Dfeatures=${{ matrix.features.value }}"
206209
suites: ${{ matrix.features.suites }}
207210
upload-test-reports: true

spark/src/test/scala/org/apache/comet/parquet/ParquetReadFromFakeHadoopFsSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class ParquetReadFromFakeHadoopFsSuite extends CometTestBase with AdaptiveSparkP
7575
}
7676

7777
test("test native_datafusion scan on fake fs") {
78+
assume(featureEnabled("hdfs-opendal"))
79+
7880
val testFilePath =
7981
s"${FakeHDFSFileSystem.PREFIX}${fake_root_dir.getAbsolutePath}/data/test-file.parquet"
8082
writeTestParquetFile(testFilePath)

spark/src/test/scala/org/apache/comet/parquet/ParquetReadFromHdfsSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class ParquetReadFromHdfsSuite
6363
}
6464

6565
test("test native_datafusion scan on hdfs") {
66+
assume(featureEnabled("hdfs") || featureEnabled("hdfs-opendal"))
67+
6668
withTmpHdfsDir { dir =>
6769
{
6870
val testFilePath = dir.toString

spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,4 +1138,9 @@ abstract class CometTestBase
11381138
usingDataSourceExec(conf) &&
11391139
!CometConf.COMET_SCAN_ALLOW_INCOMPATIBLE.get(conf)
11401140
}
1141+
1142+
def featureEnabled(feature: String): Boolean = {
1143+
System.getProperty("feature", "").split(",").contains(feature)
1144+
}
1145+
11411146
}

0 commit comments

Comments
 (0)