JingsongLi opened a new pull request, #1279: URL: https://github.com/apache/paimon-rust/pull/1279
### Purpose Closes #1275. Add common JSON text functions so callers can extract scalars or JSON fragments, validate text, and serialize JSON without rewriting those queries to Variant-specific functions. ### Brief change log - Register json_value/json_extract_scalar and get_json_object with get_json_string, json_extract_string, and json_get_str aliases. - Reuse Paimon's Variant parser and simple path evaluator, with separate scalar and fragment extraction behavior. - Add json_valid and json_format for JSON text; json_format also serializes existing Variant values while preserving JSON string quotes and JSON null. - Handle SQL nulls, Arrow Null arrays, malformed text, missing/invalid paths, and multiple Arrow string representations. ### Tests - Three regression tests cover scalar/fragment/null distinctions, tolerant extraction, strict formatting, Variant serialization including JSON null versus SQL null, and column inputs with dynamic paths across Utf8, LargeUtf8, and Utf8View. - Passed `TZ=UTC RUST_MIN_STACK=16777216 cargo test --locked -p paimon-datafusion --all-targets`. - Passed formatting and `cargo clippy --locked --no-deps -p paimon-datafusion --all-targets -- -D warnings`. ### API and Format Adds catalog-independent SQL functions registered by SQLContext. No storage format or Rust public API changes. ### Documentation Documented signatures, aliases, null/error behavior, and supported paths in the SQL guide. The existing Variant path subset and duplicate-key rejection apply; wildcard/recursive paths and full SQL/JSON RETURNING/ON EMPTY/ON ERROR clauses are outside this change. -- 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]
