Github user adrian-wang commented on a diff in the pull request: https://github.com/apache/spark/pull/3131#discussion_r20051975 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala --- @@ -68,19 +66,25 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with tableName: String, alias: Option[String]): LogicalPlan = synchronized { val (databaseName, tblName) = processDatabaseAndTableName( - db.getOrElse(hive.sessionState.getCurrentDatabase), tableName) + db.getOrElse(hive.sessionState.getCurrentDatabase), tableName) val table = client.getTable(databaseName, tblName) - val partitions: Seq[Partition] = - if (table.isPartitioned) { - HiveShim.getAllPartitionsOf(client, table).toSeq - } else { - Nil - } + if (table.isView) { + // if the unresolved relation is from hive view + // parse the text into logic node. + HiveQl.createPlanForView(table, alias) --- End diff -- I don't think we have to lowercase names. In resolving reference we will decide whether we should ignore case, and will get all names resolved accordingly.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org