IG-ABHINAV opened a new pull request, #903: URL: https://github.com/apache/hugegraph-toolchain/pull/903
## What Fixes #901. `DataTypeUtil.splitField()` threw `ClassCastException` for non-`List` collection values (e.g. `Set`) because it cast the input straight to `List`. ## Change (2 files, +43/−1) - `hugegraph-loader/.../util/DataTypeUtil.java` — `splitField()` returns the input unchanged only when it is actually a `List`; other `Collection` types (Set, Queue, …) are copied into an `ArrayList`, preserving iteration order (`LinkedHashSet` → `[b, a]` as the issue expects). `ArrayList` was already imported. - `hugegraph-loader/.../test/unit/DataTypeUtilTest.java` — new `testSplitFieldWithNonListCollection` covering `LinkedHashSet` (order preserved), `HashSet` (element-set asserted), Guava `ImmutableSet`, `ArrayDeque`, plus the existing `assertSame` List behaviour. ## Verification - **Red/green proof**: with only the fix stashed, the new test fails with exactly `java.lang.ClassCastException: class java.util.LinkedHashSet cannot be cast to class java.util.List`; with the fix it passes. - `mvn -pl hugegraph-loader -Dtest=DataTypeUtilTest test` → **15/15 pass, BUILD SUCCESS**. - CI unit profile (`mvn -pl hugegraph-loader test -P unit`) → **178 tests**; the 1 failure + 16 errors are **identical on a clean baseline** (verified by stashing and rerunning) — environmental only (`HADOOP_HOME` unset, Windows file-rename issues in `LoadOptionsTest`). Zero new failures. - `editorconfig:check` style gate passes; committed content is LF per the repo's `.editorconfig`. Fixes #901 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
