Search before asking
Problem
SQLContext stores options set through statements such as:
SET 'paimon.blob-as-descriptor' = 'true';
Normal Paimon table scans merge these session-scoped dynamic options into the loaded Table. The automatically registered vector_search table function instead captures the raw Catalog, loads the table directly, and materializes matched rows from that unmodified table.
As a result, vector_search ignores session dynamic options. In particular, selecting a BLOB column from vector_search resolves and reads the actual BLOB payload even when paimon.blob-as-descriptor is enabled, rather than returning the serialized descriptor.
Expected behavior
Tables loaded by the automatically registered vector_search function should receive the same session dynamic options as ordinary table scans. The standalone public registration API should remain backward compatible.
Proposed fix
Pass the shared dynamic-options map when SQLContext registers vector_search, and merge a snapshot of those options into the table before creating the vector-search provider. Add a regression test covering blob-as-descriptor.
Search before asking
Problem
SQLContextstores options set through statements such as:Normal Paimon table scans merge these session-scoped dynamic options into the loaded
Table. The automatically registeredvector_searchtable function instead captures the rawCatalog, loads the table directly, and materializes matched rows from that unmodified table.As a result,
vector_searchignores session dynamic options. In particular, selecting a BLOB column fromvector_searchresolves and reads the actual BLOB payload even whenpaimon.blob-as-descriptoris enabled, rather than returning the serialized descriptor.Expected behavior
Tables loaded by the automatically registered
vector_searchfunction should receive the same session dynamic options as ordinary table scans. The standalone public registration API should remain backward compatible.Proposed fix
Pass the shared dynamic-options map when
SQLContextregistersvector_search, and merge a snapshot of those options into the table before creating the vector-search provider. Add a regression test coveringblob-as-descriptor.