cloud-fan commented on a change in pull request #31281:
URL: https://github.com/apache/spark/pull/31281#discussion_r562451393



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/CharTypePadding.scala
##########
@@ -17,63 +17,23 @@
 
 package org.apache.spark.sql.execution.datasources
 
-import org.apache.spark.sql.catalyst.catalog.HiveTableRelation
 import org.apache.spark.sql.catalyst.expressions.{Attribute, BinaryComparison, 
Expression, In, Literal, StringRPad}
-import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, Project}
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
 import org.apache.spark.sql.catalyst.rules.Rule
 import org.apache.spark.sql.catalyst.util.CharVarcharUtils
-import org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation
 import org.apache.spark.sql.types.{CharType, StringType}
 import org.apache.spark.unsafe.types.UTF8String
 
 /**
- * This rule performs char type padding and length check for both char and 
varchar.
- *
- * When reading values from column/field of type CHAR(N) or VARCHAR(N), the 
underlying string value
- * might be over length (e.g. tables w/ external locations), it will fail in 
this case.
- * Otherwise, right-pad the values to length N for CHAR(N) and remain the same 
for VARCHAR(N).
+ * This rule performs char type padding both char.

Review comment:
       `This rule performs string padding for char type comparison.`




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