eugenegujing opened a new pull request, #8122:
URL: https://github.com/apache/texera/pull/8122
### What changes were proposed in this PR?
This PR extends test coverage for `IcebergUtil` error and edge contracts
without changing production behavior.
| Contract | Added coverage |
| --- | --- |
| Amber `ANY` type | Rejects it with the documented
`IllegalArgumentException` |
| Unsupported Iceberg primitive | Rejects `DateType` with the
unsupported-type error |
| Catalog without namespace support | Reports the concrete catalog class
before attempting table operations |
| Existing table with override enabled | Recreates the table and persists
the replacement schema |
| Existing table with override disabled | Raises `AlreadyExistsException`
and preserves the original schema |
| Missing table metadata | Returns `None` through a real `HadoopCatalog` |
| Catalog load failure | Returns `None` when `loadTable` raises another
runtime exception |
### Any related issues, documentation, discussions?
Closes #8120
### How was this PR tested?
The complete `IcebergUtilSpec` was run with JDK 17 while excluding an
unrelated failing DAO test classpath:
```bash
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
PATH=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
sbt -Dsbt.log.noformat=true \
'set WorkflowCore / Test / sources := Seq((WorkflowCore /
baseDirectory).value /
"src/test/scala/org/apache/texera/amber/util/IcebergUtilSpec.scala",
(WorkflowCore / baseDirectory).value /
"src/test/java/org/apache/texera/common/tags/NonParallelTest.java")' \
'set WorkflowCore / Test / internalDependencyClasspath := (WorkflowCore /
Compile / fullClasspath).value' \
'WorkflowCore/testOnly org.apache.texera.amber.util.IcebergUtilSpec' \
'WorkflowCore/Test/scalafmtCheck'
```
Result: 23 tests passed and the target test source passed the formatting
check.
`git diff --check` also passed.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-5.6-sol)
--
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]