mchades opened a new pull request, #11290: URL: https://github.com/apache/gravitino/pull/11290
### What changes were proposed in this pull request? This PR fixes `SHOW PARTITIONS` failure in Spark connector when a Hive partition value is null and represented as the default Hive partition token for non-string partition columns. Changes include: - Treat `__HIVE_DEFAULT_PARTITION__` and `HIVE_DEFAULT_PARTITION` as null in `SparkPartitionUtils.getSparkPartitionValue(...)`. - Add unit assertions in `TestSparkPartitionUtils` to verify token-to-null conversion. - Extend Hive integration test coverage in `SparkHiveCatalogIT.testManagePartitionTable` with a null `INT` partition scenario for `SHOW PARTITIONS`. ### Why are the changes needed? `SHOW PARTITIONS` could throw `UnsupportedOperationException` / `NumberFormatException` by trying to parse Hive default partition tokens (for null values) as numeric types. Fix: #10302 ### Does this PR introduce _any_ user-facing change? Yes. `SHOW PARTITIONS` now works for Hive tables containing null values in non-string partition columns. ### How was this patch tested? - `./gradlew :spark-connector:spark-common:test --tests org.apache.gravitino.spark.connector.utils.TestSparkPartitionUtils` - `./gradlew :spark-connector:spark-3.5:test --tests org.apache.gravitino.spark.connector.integration.test.hive.SparkHiveCatalogIT35.testManagePartitionTable -PskipDockerTests=false` - `./gradlew :spark-connector:spark-3.4:test --tests org.apache.gravitino.spark.connector.integration.test.hive.SparkHiveCatalogIT34.testManagePartitionTable -PskipDockerTests=false` - `./gradlew :spark-connector:spark-3.3:test --tests org.apache.gravitino.spark.connector.integration.test.hive.SparkHiveCatalogIT33.testManagePartitionTable -PskipDockerTests=false` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
