stevomitric commented on code in PR #56965:
URL: https://github.com/apache/spark/pull/56965#discussion_r3537433873


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/types/ops/ParquetTypeOps.scala:
##########
@@ -249,4 +252,25 @@ private[parquet] object ParquetTypeOps {
   private[parquet] def getVectorUpdaterOrNull(
       dt: DataType, descriptor: ColumnDescriptor): ParquetVectorUpdater =
     apply(dt).flatMap(_.getVectorUpdater(descriptor)).orNull
+
+  /**
+   * Reverse lookup for filter pushdown: given a Parquet field's logical 
annotation and
+   * primitive type (from the file schema), returns the framework filter ops 
that owns that
+   * encoding, if any. Used by `ParquetFilters` (via its FrameworkFilterOps 
extractor) so
+   * framework types participate in predicate pushdown with no per-type 
changes there.
+   */
+  private[parquet] def filterOpsFor(
+      logicalTypeAnnotation: LogicalTypeAnnotation,
+      primitiveTypeName: PrimitiveTypeName): Option[ParquetFilterOps] =
+    filterOpsList.find { ops =>
+      ops.primitiveTypeName == primitiveTypeName &&
+        ops.logicalTypeAnnotation == logicalTypeAnnotation
+    }

Review Comment:
   added note.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to