Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8990#discussion_r41417693
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -354,6 +354,25 @@ private[hive] class ClientWrapper(
         qlTable
       }
     
    +  override def createView(view: HiveTable): Unit = withHiveState {
    +    // TODO: this is duplicated with `toQlTable` except the table type 
stuff.
    +    val tbl = new metadata.Table(view.database, view.name)
    +    tbl.setTableType(HTableType.VIRTUAL_VIEW)
    +    tbl.setSerializationLib(null)
    +    tbl.clearSerDeInfo()
    +    tbl.setViewOriginalText(view.viewText.get)
    +    tbl.setViewExpandedText(view.viewText.get)
    --- End diff --
    
    Let's add a note at here to explain that we will save the same sql to 
original text and expanded text, which is not the case for Hive.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to