zhuanshenbsj1 opened a new pull request, #10655:
URL: https://github.com/apache/paimon/pull/10655
…BLOB fields on PK tables
### Purpose
In Java Paimon (`SchemaValidation.validateBlob`), BLOB columns are supported
on both append-only tables (`primaryKeys.isEmpty()`, requiring `row-tracking.
enabled = true` and `data-evolution.enabled = true`) and primary-key
tables (`!primaryKeys.isEmpty()`, with dedicated primary-key BLOB validation
rules in `validatePrimaryKeyBlob`).
However, in `pypaimon`:
1. `SchemaManager._validate_blob_fields` unconditionally required
`row-tracking.enabled = true` and `data-evolution.enabled = true` whenever a
table had any
`BLOB` column, which prevented creating any primary-key BLOB table from
Python (since `row-tracking.enabled` cannot be enabled on primary-key tables).
2. `FileStoreWrite._create_data_writer` blocked all primary-key tables
containing any `BLOB` column, even when all `BLOB` columns were inline-stored
(`blob-descriptor-field` or `blob-view-field`) and stored directly as `BYTES`
inside normal Parquet/ORC/Avro data files without `.blob` sidecar files or
`rowId`tracking.
This PR aligns `pypaimon` schema validation with Java and enables creating
primary-key BLOB tables, as well as writing and upserting inline BLOB fields
(`blob-descriptor-field` and `blob-view-field`) on primary-key tables in
Python.
### Tests
- `pytest paimon-python/pypaimon/tests/schema_manager_test.py` (12
passed)
- `pytest paimon-python/pypaimon/tests/blob_table_test.py` (14 passed)
- `python3 paimon-python/dev/check_license_header.py` (Passed)
--
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]