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

    https://github.com/apache/spark/pull/16910#discussion_r103143673
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala ---
    @@ -114,22 +116,34 @@ class HadoopTableReader(
         val tablePath = hiveTable.getPath
         val inputPathStr = applyFilterIfNeeded(tablePath, filterOpt)
     
    -    // logDebug("Table input: %s".format(tablePath))
    -    val ifc = hiveTable.getInputFormatClass
    -      .asInstanceOf[java.lang.Class[InputFormat[Writable, Writable]]]
    -    val hadoopRDD = createHadoopRdd(tableDesc, inputPathStr, ifc)
    +    val locationPath = new Path(inputPathStr)
    +    val fs = locationPath.getFileSystem(broadcastedHadoopConf.value.value)
     
    -    val attrsWithIndex = attributes.zipWithIndex
    -    val mutableRow = new SpecificInternalRow(attributes.map(_.dataType))
    +    // if the location of the table which is not created by 'stored by' 
does not exist,
    +    // return an empty RDD
    +    // TODO: after SparkSQL supports 'stored by', we should check if this 
condition
    +    // is still proper.
    +    val storageHandler = 
hiveTable.getParameters.getOrDefault(STORAGE_HANDLER_KEY, null)
    --- End diff --
    
    Replace `STORAGE_HANDLER_KEY ` by `META_TABLE_STORAGE`, which has been 
defined in `hive_metastoreConstants`


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