rdblue commented on a change in pull request #2512:
URL: https://github.com/apache/iceberg/pull/2512#discussion_r624788162



##########
File path: 
spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/utils/RewriteRowLevelOperationHelper.scala
##########
@@ -229,4 +232,26 @@ object RewriteRowLevelOperationHelper {
   private final val AFFECTED_FILES_ACC_NAME = 
"internal.metrics.merge.affectedFiles"
   private final val AFFECTED_FILES_ACC_ALIAS_NAME = "_affectedFiles_"
   private final val SUM_ROW_ID_ALIAS_NAME = "_sum_"
+
+  def createScanRelation(
+      relation: DataSourceV2Relation,
+      scan: Scan,
+      outputAttrs: Seq[AttributeReference]): DataSourceV2ScanRelation = {
+    val ctor: DynConstructors.Ctor[DataSourceV2ScanRelation] =

Review comment:
       This constructor should be moved into a companion object so that the 
lookups don't happen every time the method is called.

##########
File path: 
spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/utils/DistributionAndOrderingUtils.scala
##########
@@ -118,7 +120,24 @@ object DistributionAndOrderingUtils {
     expr match {
       case s: SortOrder =>
         val catalystChild = toCatalyst(s.expression(), query, resolver)
-        catalyst.expressions.SortOrder(catalystChild, toCatalyst(s.direction), 
toCatalyst(s.nullOrdering), Set.empty)
+        val ctor: DynConstructors.Ctor[catalyst.expressions.SortOrder] =

Review comment:
       This constructor should be moved into a companion object so that the 
lookups don't happen every time the method is called.




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

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