DanielLeens opened a new pull request, #11493: URL: https://github.com/apache/seatunnel/pull/11493
## Purpose of this pull request Add a JSON logical type whose physical Java representation is valid JSON text, and map Snowflake `VARIANT` to that type. Closes #10774. ## What is changed - Add `SqlType.JSON` and `BasicType.JSON_TYPE` without changing existing enum ordinals. - Parse `json` and `array<json>` schema declarations. - Preserve JSON objects, arrays, scalars, JSON null, and SQL null in the JSON format; reject empty, incomplete, and trailing-token input. - Treat JSON as its String physical representation in Spark translation. - Map Snowflake `VARIANT` to/from JSON. - Generate `PARSE_JSON(:field)` for JSON fields in Snowflake INSERT and UPDATE statements; custom sink queries remain explicit. - Update English and Chinese schema and Snowflake connector documentation. - Remove the duplicate `setNullToStatementByDataType` method currently present on `dev`, which otherwise prevents the touched JDBC module from compiling. ## Compatibility This is additive. `JSON` is appended to `SqlType`, so existing enum ordinals remain unchanged. Existing connector behavior changes only where Snowflake explicitly maps `VARIANT` to JSON. ## Verification Local focused verification: - Spotless for API, JSON format, JDBC, translation base, and Spark translation modules: passed. - `JsonRowDataSerDeSchemaTest`: 21 tests passed. - `SnowflakeDataTypeConvertorTest`, `SnowflakeTypeConverterTest`, and `JdbcOutputFormatBuilderTest`: 11 tests passed. - Earlier focused API tests: 15 tests passed. - `git diff --check`: passed. The full reactor verification is intentionally delegated to GitHub CI for this Draft PR. A real Snowflake account is still needed to validate `TYPEOF`, path queries, JSON null, SQL NULL, and round-trip behavior because the repository Snowflake IT is disabled and account-dependent. -- 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]
