Skip to content

Commit 5598e52

Browse files
Chong Gaores-life
authored andcommitted
Enable partial clustering test on fixed Spark versions
Signed-off-by: Chong Gao <chongg@nvidia.com>
1 parent 9e22654 commit 5598e52

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

iceberg/iceberg-1-11-x/src/main/spark411/java/com/nvidia/spark/rapids/iceberg/GpuInternalRow.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
/*** spark-rapids-shim-json-lines
1717
{"spark": "411"}
18+
{"spark": "412"}
19+
{"spark": "413"}
1820
spark-rapids-shim-json-lines ***/
1921

2022
package com.nvidia.spark.rapids.iceberg;

iceberg/iceberg-1-11-x/src/main/spark411/scala/com/nvidia/spark/rapids/iceberg/iceberg111x/IcebergProviderImpl.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
/*** spark-rapids-shim-json-lines
1717
{"spark": "411"}
18+
{"spark": "412"}
19+
{"spark": "413"}
1820
spark-rapids-shim-json-lines ***/
1921

2022
package com.nvidia.spark.rapids.iceberg.iceberg111x

iceberg/iceberg-1-11-x/src/main/spark411/scala/org/apache/iceberg/spark/source/GpuSparkIncrementalAppendScan.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
/*** spark-rapids-shim-json-lines
1717
{"spark": "411"}
18+
{"spark": "412"}
19+
{"spark": "413"}
1820
spark-rapids-shim-json-lines ***/
1921

2022
package org.apache.iceberg.spark.source

integration_tests/src/main/python/iceberg/iceberg_test.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
from iceberg import get_full_table_name, iceberg_unsupported_mark, _build_tblprops, \
2323
_BASE_TBLPROPS_SQL, create_iceberg_table
2424
from marks import allow_non_gpu, iceberg, ignore_order
25-
from spark_session import is_databricks_runtime, is_spark_359, is_spark_403_or_404, \
26-
with_cpu_session, with_gpu_session
25+
from spark_session import is_databricks_runtime, is_spark_35x, is_spark_40x, is_spark_41x, \
26+
spark_version, with_cpu_session, with_gpu_session
2727

2828
iceberg_map_gens = [MapGen(f(nullable=False), f()) for f in [
2929
BooleanGen, ByteGen, ShortGen, IntegerGen, LongGen, FloatGen, DoubleGen, DateGen, TimestampGen ]] + \
@@ -50,10 +50,18 @@
5050
pytestmark = iceberg_unsupported_mark
5151

5252

53+
def _is_spark_patch_at_least(minimum):
54+
return int(spark_version().split(".")[2]) >= minimum
55+
56+
5357
@iceberg
5458
@ignore_order(local=True)
5559
@pytest.mark.skipif(
56-
not (is_spark_359() or is_spark_403_or_404()),
60+
not (
61+
(is_spark_35x() and _is_spark_patch_at_least(9))
62+
or (is_spark_40x() and _is_spark_patch_at_least(3))
63+
or (is_spark_41x() and _is_spark_patch_at_least(2))
64+
),
5765
reason="Requires Spark's partial-clustering correctness fix and GPU Iceberg scan support")
5866
def test_iceberg_spj_partial_clustering_distinct(spark_tmp_table_factory):
5967
left_table = get_full_table_name(spark_tmp_table_factory)

0 commit comments

Comments
 (0)