diff --git a/integration_tests/src/main/python/map_test.py b/integration_tests/src/main/python/map_test.py index 38ddd814c5d..5f8924d0557 100644 --- a/integration_tests/src/main/python/map_test.py +++ b/integration_tests/src/main/python/map_test.py @@ -13,7 +13,6 @@ # limitations under the License. import pytest -from py4j.protocol import Py4JJavaError from asserts import * from conftest import is_not_utc @@ -47,11 +46,6 @@ IntegerGen())] -# Keep the xfail limited to issue #15783 so plan-validation failures still propagate. -class _MapZipWithDecimalKnownIssue(Exception): - pass - - supported_key_map_gens = \ map_gens_sample + \ maps_with_binary_value + \ @@ -922,10 +916,6 @@ def do_it(spark): MapGen(DecimalGen(20, 2, nullable=False), DecimalGen(20, 2, nullable=False), nullable=False), ], ids=idfn) -@pytest.mark.xfail( - reason='https://github.com/NVIDIA/cudf-spark/issues/15783', - raises=_MapZipWithDecimalKnownIssue, - strict=True) @validate_execs_in_gpu_plan('GpuProjectExec') @allow_non_gpu(*non_utc_allow) def test_map_zip_with_decimal_identity(data_gen): @@ -935,25 +925,7 @@ def do_it(spark): 'map_zip_with(a, b, (key, value1, value2) -> value1) as ident1', 'map_zip_with(a, b, (key, value1, value2) -> value2) as ident2') - try: - assert_gpu_and_cpu_are_equal_collect(do_it, conf={'spark.sql.ansi.enabled': False}) - except AssertionError as error: - message = str(error) - is_known_decimal_failure = ( - 'CPU (null) values are different at ' in message - and ("'ident1'" in message or "'ident2'" in message)) - if is_known_decimal_failure: - raise _MapZipWithDecimalKnownIssue() from error - raise - except Py4JJavaError as error: - message = str(error) - is_known_decimal_failure = ( - 'java.lang.AssertionError:' in message - and 'value at ' in message - and ' is null' in message) - if is_known_decimal_failure: - raise _MapZipWithDecimalKnownIssue() from error - raise + assert_gpu_and_cpu_are_equal_collect(do_it, conf={'spark.sql.ansi.enabled': False}) @pytest.mark.parametrize('data_gen', [MapGen(IntegerGen(False, min_val=-5, max_val=5), ArrayGen(int_gen, max_length=5), min_length=7)], ids=idfn) @allow_non_gpu(*non_utc_allow) diff --git a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/higherOrderFunctions.scala b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/higherOrderFunctions.scala index 3ccfc417409..48849178ccc 100644 --- a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/higherOrderFunctions.scala +++ b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/higherOrderFunctions.scala @@ -1071,14 +1071,13 @@ case class GpuMapZipWith( boundIntermediate: Seq[GpuExpression] = Seq.empty) extends GpuMapTwoArgumentHigherOrderFunction { - @transient lazy val MapType(keyType1, valueType1, valueContainsNull1) = argument1.dataType - @transient lazy val MapType(keyType2, valueType2, valueContainsNull2) = argument2.dataType + @transient lazy val MapType(keyType1, _, _) = argument1.dataType + @transient lazy val MapType(keyType2, _, _) = argument2.dataType @transient lazy val keyType = TypeCoercion.findCommonTypeDifferentOnlyInNullFlags(keyType1, keyType2).get - override def dataType: DataType = MapType(keyType, function.dataType, - valueContainsNull1 || valueContainsNull2) + override def dataType: DataType = MapType(keyType, function.dataType, function.nullable) override def prettyName: String = "map_zip_with"