Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix a comment
  • Loading branch information
windpiger committed Feb 21, 2017
commit b4caca761c9caffc39324b01b9e1aeecf2cc69fe
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class HadoopTableReader(
val locationPath = new Path(inputPathStr)
val fs = locationPath.getFileSystem(sparkSession.sessionState.newHadoopConf())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about replacing sparkSession.sessionState.newHadoopConf() by broadcastedHadoopConf.value.value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok~


// if the table location is not exists, return an empty RDD
// if the table location does not exist, return an empty RDD
if (!fs.exists(locationPath)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, how about hive serde tables with storage handler? their data is stored in somewhere else(maybe in hbase) and the table path is always non-existing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! Thanks!
I test it in Hive, when the table created by stored by(e.g. HBase), even if there is a table path created under warehouse path when we create the table, but there is no data files exist after we insert into the table, and it is ok to select data after we delete the table path.

new EmptyRDD[InternalRow](sparkSession.sparkContext)
} else {
Expand Down