You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] [spark] MergePaimonScalarSubqueries merges scans of a query-auth table that read different columns #11426
On a REST catalog, with PaimonSparkSessionExtensions loaded:
CREATETABLET (a INT, b INT) TBLPROPERTIES ('query-auth.enabled'='true');
INSERT INTO T VALUES (1, 10), (2, 20);
SELECT (SELECTsum(a) FROM T), (SELECTsum(b) FROM T);
The executed plan has one BatchScanExec reading a and b, so the catalog's authTableQuery is called once with [a, b] instead of once with [a] and once with [b].
What doesn't meet your expectations?
With query auth on, the scan sends the columns it reads to Catalog.authTableQuery(identifier, select) and applies the row filters and column masks it returns. MergePaimonScalarSubqueries.mergePaimonScan merges two scans that differ only in requiredSchema into one scan over the union of their columns. If a catalog's rules depend on the columns selected, each subquery is answered with the rules for the union, which can drop rows from or mask a subquery that would not have been affected on its own. The in-repo REST test server gives table-level rules, so its results do not change; the catalog interface does not promise that.
The option is honored whether it is set on the table, through spark.paimon.query-auth.enabled, or as a read option.
Anything else?
#11424 / #11425 cover Spark 4.3, where Paimon tables with query auth do not declare SCAN_MERGING.
Activity