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



##########
File path: 
spark/v3.2/spark-extensions/src/main/scala/org/apache/spark/sql/connector/expressions/TruncateTransform.scala
##########
@@ -17,21 +17,22 @@
  * under the License.
  */
 
+package org.apache.spark.sql.connector.expressions
 
-package org.apache.spark.sql.connector.iceberg.distributions.impl;
+import org.apache.spark.sql.types.IntegerType
 
-import 
org.apache.spark.sql.connector.iceberg.distributions.OrderedDistribution;
-import org.apache.spark.sql.connector.iceberg.expressions.SortOrder;
-
-public class OrderedDistributionImpl implements OrderedDistribution {
-  private SortOrder[] orderingExprs;
-
-  public OrderedDistributionImpl(SortOrder[] orderingExprs) {
-    this.orderingExprs = orderingExprs;
-  }
-
-  @Override
-  public SortOrder[] ordering() {
-    return orderingExprs;
+private[sql] object TruncateTransform {
+  def unapply(expr: Expression): Option[(Int, FieldReference)] = expr match {
+    case transform: Transform =>
+      transform match {
+        case NamedTransform("truncate", Seq(Ref(seq: Seq[String]), Lit(value: 
Int, IntegerType))) =>

Review comment:
       No need to fail because the user couldn't remember the order!




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