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

    https://github.com/apache/spark/pull/14155#discussion_r74665033
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala ---
    @@ -363,3 +503,82 @@ private[spark] class HiveExternalCatalog(client: 
HiveClient, hadoopConf: Configu
       }
     
     }
    +
    +object HiveExternalCatalog {
    +  val DATASOURCE_PREFIX = "spark.sql.sources."
    +  val DATASOURCE_PROVIDER = DATASOURCE_PREFIX + "provider"
    +  val DATASOURCE_SCHEMA = DATASOURCE_PREFIX + "schema"
    +  val DATASOURCE_SCHEMA_PREFIX = DATASOURCE_SCHEMA + "."
    +  val DATASOURCE_SCHEMA_NUMPARTS = DATASOURCE_SCHEMA_PREFIX + "numParts"
    +  val DATASOURCE_SCHEMA_NUMPARTCOLS = DATASOURCE_SCHEMA_PREFIX + 
"numPartCols"
    +  val DATASOURCE_SCHEMA_NUMSORTCOLS = DATASOURCE_SCHEMA_PREFIX + 
"numSortCols"
    +  val DATASOURCE_SCHEMA_NUMBUCKETS = DATASOURCE_SCHEMA_PREFIX + 
"numBuckets"
    +  val DATASOURCE_SCHEMA_NUMBUCKETCOLS = DATASOURCE_SCHEMA_PREFIX + 
"numBucketCols"
    +  val DATASOURCE_SCHEMA_PART_PREFIX = DATASOURCE_SCHEMA_PREFIX + "part."
    +  val DATASOURCE_SCHEMA_PARTCOL_PREFIX = DATASOURCE_SCHEMA_PREFIX + 
"partCol."
    +  val DATASOURCE_SCHEMA_BUCKETCOL_PREFIX = DATASOURCE_SCHEMA_PREFIX + 
"bucketCol."
    +  val DATASOURCE_SCHEMA_SORTCOL_PREFIX = DATASOURCE_SCHEMA_PREFIX + 
"sortCol."
    +
    +  def getProviderFromTableProperties(metadata: CatalogTable): 
Option[String] = {
    +    metadata.properties.get(DATASOURCE_PROVIDER)
    +  }
    +
    +  def getOriginalTableProperties(metadata: CatalogTable): Map[String, 
String] = {
    +    metadata.properties.filterNot { case (key, _) => 
key.startsWith(DATASOURCE_PREFIX) }
    --- End diff --
    
    For a pre-built spark, there is no way to read the raw data, right?


---
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

Reply via email to