Skip to content

Conversation

@openinx
Copy link
Contributor

@openinx openinx commented Dec 3, 2025

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

Related issue is: #5624

How was this patch tested?

If we want to do the locally test, which means we set up the local OSS uc server for the testing purpose, then we use this command to run:

./build/sbt -DsparkVersion=3.5.7 "testOnly io.sparkuctest.UCManagedTableDMLTest"

If we want to run the same tests against the external UC server, then we can use this command:

export UC_URI=$UC_URI
export UC_CATALOG_NAME=main
export UC_SCHEMA_NAME=demo_zh
export UC_BASE_LOCATION=$S3_BASE_LOCATION
export UC_TOKEN=$UC_TOKEN
export UC_EXTENSION_CLASS=io.sparkuctest.extension.RemoteUnityCatalogExtension
./build/sbt -DsparkVersion=3.5.7 "testOnly io.sparkuctest.UCManagedTableDMLTest"

In summary, with this abstracted UnityCatalogExtension, we provided two extension implementations:

  • LocalUnityCatalogExtension, which means run all the tests locally.
  • RemoteUnityCatalogExtension, which means run the same tests remotelly.

And the good point is: for the new tests developers, they never need to perceive the underlying setup, all they need is extending the UnityCatalogTestBase, and write the normal test codes.

Does this PR introduce any user-facing changes?

No.

tdas and others added 22 commits November 18, 2025 20:47
- Moved UnityCatalogSupport.scala and UnityCatalogSupportSuite.scala to com.sparkuctest package
- Updated package declarations from org.apache.spark.sql.delta to com.sparkuctest
- All 4 tests pass successfully with Spark 4.0
…y null checks, use checkAnswer; Remove unused import
- Replace Scala UnityCatalogSupport trait with Java abstract class
- Replace Scala UnityCatalogSupportSuite with Java JUnit tests
- Update build.sbt for Java test support
- Remove ScalaTest dependency, use JUnit exclusively
- Add Log4j logging instead of System.out.println
- Maintain all original test functionality
- Add spark.sql.extensions for DeltaSparkSessionExtension
- Add spark.sql.catalog.spark_catalog for DeltaCatalog
- Fixes test failures requiring Delta catalog configuration
Address PR comment: use io package instead of com package for test utilities
…s run agaist both locally OSS UC server and external OSS UC server

Signed-off-by: openinx <[email protected]>
@openinx openinx marked this pull request as draft December 3, 2025 21:14
Signed-off-by: openinx <[email protected]>
@openinx openinx marked this pull request as ready for review December 8, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants