You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/05 23:00:57 UTC

[GitHub] [spark] dtenedor commented on pull request #36212: [SPARK-38914][SQL] Allow user to insert specified columns into insertable view

dtenedor commented on PR #36212:
URL: https://github.com/apache/spark/pull/36212#issuecomment-1119115713

   @morvenhuang @gengliangwang there might be a bug in this. Should this:
   
   ```
         case SubqueryAlias(_, r: View) if r.isTempView =>
           StructType(r.schema.fields.dropRight(
             enclosingInsert.get.partitionSpec.size))
   ```
   
   really be this?
   
   ```
         case SubqueryAlias(_, r: View) if r.isTempView =>
           StructType(r.desc.schema.fields.dropRight(
             enclosingInsert.get.partitionSpec.size))
   ```
   
   The `r.schema` may trigger an exception if the view is not resolved, whereas `r.desc.schema` should always work. Should we consider a follow up patch to fix?
   
   <img width="599" alt="image" src="https://user-images.githubusercontent.com/99207096/167040368-a11d5fe2-6d71-4b98-9be9-69081d2a3d31.png">
   


-- 
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: reviews-unsubscribe@spark.apache.org

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


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