sunchao commented on pull request #32354:
URL: https://github.com/apache/spark/pull/32354#issuecomment-827154440


   Also it seems 
[SPARK-33901](https://issues.apache.org/jira/browse/SPARK-33901) (#30918) 
doesn't work for nested type. For instance, this test:
   ```scala
     test("SPARK-XXXXX: create table like should should not change table's 
schema (nested type)") {
       withTable( "tt") {
         sql(s"CREATE TABLE tt(s1 struct<i: CHAR(5), j: int>, s2 struct<c: 
VARCHAR(4), d: int>) " +
           s"USING $format")
         withView("t") {
           sql("CREATE VIEW t AS SELECT s1.i, s2.c FROM tt")
           checkTableSchemaTypeStr(Seq(Row("char(5)"), Row("varchar(4)")))
         }
       }
     }
   ```
   doesn't work even with this fix. It seems this is related to how the 
metadata is handled: in nested schema the metadata is associated with the 
top-level field (e.g., `s1`, `s2`) instead of leaf nodes (e.g., `i`, `c`). cc 
@yaooqinn @cloud-fan 


-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to