You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "FWLamb (via GitHub)" <gi...@apache.org> on 2023/03/17 10:26:17 UTC

[GitHub] [incubator-seatunnel] FWLamb commented on a diff in pull request #4084: [HotFix][Transform-v2][Spark] fix FieldMapper ClassCastException

FWLamb commented on code in PR #4084:
URL: https://github.com/apache/incubator-seatunnel/pull/4084#discussion_r1140052518


##########
seatunnel-core/seatunnel-spark-starter/seatunnel-spark-2-starter/src/main/java/org/apache/seatunnel/core/starter/spark/execution/TransformExecuteProcessor.java:
##########
@@ -125,6 +130,22 @@ private Dataset<Row> sparkTransform(SeaTunnelTransform transform, Dataset<Row> s
         transform.setTypeInfo(seaTunnelDataType);
         StructType structType =
                 (StructType) TypeConverterUtils.convert(transform.getProducedType());
+        StructField[] newStructFields =

Review Comment:
   Modifications in TypeConverterUtils.convert may affect other modules.
   The root cause of this problem is that for `TIMESTAMP` Type, the `TimestampType` in spark is returned in `TypeConverterUtils.convert`, while the `Long` Type is returned in `InternalRowConverter.convert`.
   Inconsistent types cause spark to report an error.



-- 
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: commits-unsubscribe@seatunnel.apache.org

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