zhuanshenbsj1 opened a new pull request, #10646:
URL: https://github.com/apache/paimon/pull/10646

   ### Purpose
   BlobView` references an upstream BLOB value by `(table, fieldId, rowId)`, 
which fundamentally requires the upstream table to enable 
`'row-tracking.enabled' = 'true'` so that rows have stable `_ROW_ID`s and can 
be resolved
     via `withRowRanges(...)`.
   
       Previously, when a `BlobView` referenced an upstream table without 
`row-tracking.enabled` (for example, a primary-key table with BLOB columns or 
an intermediate primary-key `blob-view` table):
       1. **Write / construction path**: `BlobViewStruct.of(...)`, 
`Blob.fromView(...)`, Flink `sys.blob_view(...)`, and Spark 
`sys.blob_view(...)` only checked column existence and `BLOB` type, allowing 
invalid references to be written silently.
       2. **Read path**: `BlobViewLookup.loadTableDescriptorChunk(...)` 
attempted to project `SpecialFields.ROW_ID` from `table.rowTypeWithRowId()`, 
which does not include `_ROW_ID` when row tracking is disabled, failing with a
     confusing internal error:
          `java.lang.IllegalArgumentException: Field _ROW_ID does not exist in 
table schema.`
   
       This PR adds explicit validation on both the write/construction path and 
the read path, throwing a clear error message:
       `Upstream table <db.table> referenced by blob view must enable 
'row-tracking.enabled'.`
   
   ### Tests
       - BlobViewStructTest#testValidateUpstreamRowTracking
       - BlobTableTest#testBlobViewRejectsNonRowTrackingUpstreamTable (verifies 
both write-time construction rejection and read-time `BlobViewLookup` rejection)
       - BlobTableITCase#testBlobViewRejectsNonRowTrackingUpstreamTable
       - BlobTestBase` (`blob_view rejects upstream table without row tracking`)
   


-- 
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]

Reply via email to