MaxGekk commented on code in PR #43334:
URL: https://github.com/apache/spark/pull/43334#discussion_r1379164499
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -508,9 +508,11 @@ class Dataset[T] private[sql](
* @group basic
* @since 3.4.0
*/
- def to(schema: StructType): DataFrame = withPlan {
- val replaced =
CharVarcharUtils.failIfHasCharVarchar(schema).asInstanceOf[StructType]
- Project.matchSchema(logicalPlan, replaced, sparkSession.sessionState.conf)
+ def to(schema: StructType): DataFrame = withOrigin() {
Review Comment:
@cloud-fan For example, **with** `withOrigin` in `select`, we stop at index
3:
<img width="853" alt="Screenshot 2023-11-01 at 21 25 06"
src="https://github.com/apache/spark/assets/1580697/7080a1bb-7128-4c23-baaf-64aab6f7cd0a">
Without `withOrigin` in `select`, the picture is different. We are in
`withOrigin` in `Column`'s constructor, and stoped at the index 5:
<img width="862" alt="Screenshot 2023-11-01 at 21 29 18"
src="https://github.com/apache/spark/assets/1580697/c6747280-fc30-4500-a26c-e0a063544966">
--
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]