You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "Zouxxyy (via GitHub)" <gi...@apache.org> on 2024/08/30 09:50:09 UTC

[PR] [spark] Add string length check for char while writing [paimon]

Zouxxyy opened a new pull request, #4105:
URL: https://github.com/apache/paimon/pull/4105

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   for char should auto add to respect charVarcharAsString
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [spark] Add string length check for char while writing [paimon]

Posted by "YannByron (via GitHub)" <gi...@apache.org>.
YannByron merged PR #4105:
URL: https://github.com/apache/paimon/pull/4105


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [spark] Add string length check for char while writing [paimon]

Posted by "Zouxxyy (via GitHub)" <gi...@apache.org>.
Zouxxyy closed pull request #4105: [spark] Add string length check for char while writing
URL: https://github.com/apache/paimon/pull/4105


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [spark] Add string length check for char while writing [paimon]

Posted by "YannByron (via GitHub)" <gi...@apache.org>.
YannByron commented on code in PR #4105:
URL: https://github.com/apache/paimon/pull/4105#discussion_r1740668378


##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/PaimonAnalysis.scala:
##########
@@ -275,6 +274,17 @@ class PaimonAnalysis(session: SparkSession) extends Rule[LogicalPlan] {
     cast.setTagValue(Compatibility.castByTableInsertionTag, ())
     cast
   }
+
+  private def withStrLenCheck(expr: Expression, metadata: Metadata): Expression = {

Review Comment:
   use `processStringForCharVarchar` same with org.apache.spark.sql.catalyst.util.CharVarcharUtils.processStringForCharVarchar ?



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [spark] Add string length check for char while writing [paimon]

Posted by "YannByron (via GitHub)" <gi...@apache.org>.
YannByron commented on code in PR #4105:
URL: https://github.com/apache/paimon/pull/4105#discussion_r1740669520


##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis/PaimonAnalysis.scala:
##########
@@ -275,6 +274,17 @@ class PaimonAnalysis(session: SparkSession) extends Rule[LogicalPlan] {
     cast.setTagValue(Compatibility.castByTableInsertionTag, ())
     cast
   }
+
+  private def withStrLenCheck(expr: Expression, metadata: Metadata): Expression = {

Review Comment:
   `stringLengthCheck` ?



-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org