diff options
author | w00228970 <wangfei1@huawei.com> | 2014-11-17 16:33:50 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-11-17 16:33:50 -0800 |
commit | 42389b1780311d90499b4ce2315ceabf5b6ab384 (patch) | |
tree | 734faea5f7a1179eac8df372172f376e39636559 /sql/hive/v0.13.1 | |
parent | 6b7f2f753d16ff038881772f1958e3f4fd5597a7 (diff) | |
download | spark-42389b1780311d90499b4ce2315ceabf5b6ab384.tar.gz spark-42389b1780311d90499b4ce2315ceabf5b6ab384.tar.bz2 spark-42389b1780311d90499b4ce2315ceabf5b6ab384.zip |
[SPARK-4443][SQL] Fix statistics for external table in spark sql hive
The `totalSize` of external table is always zero, which will influence join strategy(always use broadcast join for external table).
Author: w00228970 <wangfei1@huawei.com>
Closes #3304 from scwf/statistics and squashes the following commits:
568f321 [w00228970] fix statistics for external table
Diffstat (limited to 'sql/hive/v0.13.1')
-rw-r--r-- | sql/hive/v0.13.1/src/main/scala/org/apache/spark/sql/hive/Shim13.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/hive/v0.13.1/src/main/scala/org/apache/spark/sql/hive/Shim13.scala b/sql/hive/v0.13.1/src/main/scala/org/apache/spark/sql/hive/Shim13.scala index e4aee57f0a..91f7ceac21 100644 --- a/sql/hive/v0.13.1/src/main/scala/org/apache/spark/sql/hive/Shim13.scala +++ b/sql/hive/v0.13.1/src/main/scala/org/apache/spark/sql/hive/Shim13.scala @@ -154,6 +154,8 @@ private[hive] object HiveShim { def getStatsSetupConstTotalSize = StatsSetupConst.TOTAL_SIZE + def getStatsSetupConstRawDataSize = StatsSetupConst.RAW_DATA_SIZE + def createDefaultDBIfNeeded(context: HiveContext) = { context.runSqlHive("CREATE DATABASE default") context.runSqlHive("USE default") |