JingsongLi commented on code in PR #10652:
URL: https://github.com/apache/paimon/pull/10652#discussion_r4322388258
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonRecordReaderIterator.scala:
##########
@@ -37,14 +37,32 @@ case class PaimonRecordReaderIterator(
split: Split)
extends CloseableIterator[PaimonInternalRow] {
+ // Keep partition metadata restricted to the original DataSplit. Unwrapping
authorization
+ // here would expose raw partition values after the reader has applied
column masks.
if (
- metadataColumns.exists(c =>
PARTITION_AND_BUCKET_META_COLUMNS.contains(c.name)) && !split
+ metadataColumns.exists(_.name == PaimonMetadataColumn.PARTITION_COLUMN) &&
!split
.isInstanceOf[DataSplit]
) {
- throw new RuntimeException(
- "There need be DataSplit when path and index metadata columns are
required")
+ IOUtils.closeQuietly(reader)
+ throw new UnsupportedOperationException(
+ "Partition metadata is only supported for DataSplit without query
authorization.")
}
+ private val bucketMetadata =
Review Comment:
maybe lazied?
--
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]