JingsongLi commented on code in PR #9598:
URL: https://github.com/apache/paimon/pull/9598#discussion_r3931981969
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/read/BaseScan.scala:
##########
@@ -144,7 +144,16 @@ trait BaseScan extends Scan with SupportsReportStatistics
with Logging {
override def toBatch: Batch = {
val metadataColumns = metadataFields.map(
field => PaimonMetadataColumn.get(field.name,
SparkTypeUtils.toSparkPartitionType(table)))
- PaimonBatch(inputPartitions, readBuilder, coreOptions.blobAsDescriptor(),
metadataColumns)
+ val uriReaderFactory = table match {
+ case fileStoreTable: FileStoreTable =>
BlobDescriptorReaderFactory.create(fileStoreTable)
Review Comment:
[P1] Do not resolve the source table when descriptor output is requested
BlobDescriptorReaderFactory.create is called for every FileStoreTable before
checking coreOptions.blobAsDescriptor(). With blob-as-descriptor=true the
partition reader deliberately never uses this factory, but create may still
open the configured catalog and load blob-descriptor-source-table. A
descriptor-only query (or even a projection with no BLOB column) now fails if
that source table is unavailable, although returning the serialized descriptor
requires no source data access. Please gate factory creation on
!blobAsDescriptor (and preferably on the projected read type containing a BLOB)
so unused source-table resolution cannot break scans.
--
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]