hutiefang76 opened a new pull request, #12636:
URL: https://github.com/apache/seatunnel/pull/12636
### Purpose of this pull request
ARRAY and MAP type inference rejected signed and parenthesized expressions.
Accept the wrapped expression’s type and evaluate unary plus on its operand
rather than recursively on itself. Preserve numeric wrapper types for unary
minus, return null for a null operand, and keep BYTE array declarations and
mixed numeric values consistent.
### Does this PR introduce _any_ user-facing change?
Yes, in dev. Zeta SQL supports examples such as ARRAY(-1, +2, (3)),
MAP('negative', (-1)) and ARRAY((MAP('k', -2))). TINYINT arrays now declare
ARRAY<TINYINT> instead of ARRAY<STRING>; EN/ZH migration guidance explains
downstream schema updates and state restart requirements. The existing all-null
ARRAY runtime-type limitation is outside this patch.
### How was this patch tested?
- `./mvnw -pl seatunnel-transforms-v2
-Dtest=SQL*Test,Zeta*Test,*FunctionTest test`: 397 tests passed. Existing
SQLNestedTypeTest now covers literal/nested expressions, FLOAT/SHORT/BYTE
values, mixed BYTE/INT values, nullable MAP operands and schema-dependent row
size calculation. The existing nested-type E2E fixture is extended; container
E2E was not run.
- The 11-module transform dependency reactor passed `-DskipTests verify` and
Spotless.
- Full-repository `-DskipTests verify` was attempted but stopped at
`seatunnel-engine-ui`: the npm mirror returned HTTP 403 for `tslib-2.3.0.tgz`.
This is not a successful full-repository build.
### Check list
* [x] No new JAR binary or dependency is added.
* [x] EN/ZH documentation updated.
* [x] Incompatibility guide updated.
* [ ] Connector registration updates: not applicable.
Implemented with Codex assistance; the reproduction and checks above were
run against this branch.
---
[](https://github.com/EveryInc/compound-engineering-plugin)
--
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]