You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ja...@apache.org on 2016/12/05 08:31:09 UTC
[1/2] incubator-carbondata git commit: fixInsertIntoFromEmptyTable
Repository: incubator-carbondata
Updated Branches:
refs/heads/master bfeb573dc -> 8a6733041
fixInsertIntoFromEmptyTable
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/a62b99bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/a62b99bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/a62b99bd
Branch: refs/heads/master
Commit: a62b99bd9293da9535b9ccfb532ee576c738e71c
Parents: bfeb573
Author: QiangCai <qi...@qq.com>
Authored: Mon Dec 5 15:08:39 2016 +0800
Committer: QiangCai <qi...@qq.com>
Committed: Mon Dec 5 15:08:39 2016 +0800
----------------------------------------------------------------------
.../spark/sql/execution/command/carbonTableSchema.scala | 7 +++++++
.../spark/sql/execution/command/carbonTableSchema.scala | 8 +++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a62b99bd/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
index 1b939f7..20bb4a3 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
@@ -367,6 +367,13 @@ case class LoadTable(
def run(sqlContext: SQLContext): Seq[Row] = {
+ if (dataFrame.isDefined) {
+ val rdd = dataFrame.get.rdd
+ if (rdd.partitions == null || rdd.partitions.length == 0) {
+ LOGGER.warn("DataLoading finished. No data was loaded.")
+ return Seq.empty
+ }
+ }
val dbName = getDB.getDatabaseName(databaseNameOp, sqlContext)
if (isOverwriteExist) {
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a62b99bd/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
index 52fc097..f94e396 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
@@ -293,8 +293,14 @@ case class LoadTable(
val LOGGER = LogServiceFactory.getLogService(this.getClass.getCanonicalName)
-
def run(sparkSession: SparkSession): Seq[Row] = {
+ if (dataFrame.isDefined) {
+ val rdd = dataFrame.get.rdd
+ if (rdd.partitions == null || rdd.partitions.length == 0) {
+ LOGGER.warn("DataLoading finished. No data was loaded.")
+ return Seq.empty
+ }
+ }
val dbName = databaseNameOp.getOrElse(sparkSession.catalog.currentDatabase)
val identifier = TableIdentifier(tableName, Option(dbName))
[2/2] incubator-carbondata git commit: [CARBONDATA-493]fix bug for
insert into select from empty table This closes #396
Posted by ja...@apache.org.
[CARBONDATA-493]fix bug for insert into select from empty table This closes #396
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/8a673304
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/8a673304
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/8a673304
Branch: refs/heads/master
Commit: 8a67330419129266eb8713a1ef0b6fd7fe9bcba0
Parents: bfeb573 a62b99b
Author: jackylk <ja...@huawei.com>
Authored: Mon Dec 5 16:30:43 2016 +0800
Committer: jackylk <ja...@huawei.com>
Committed: Mon Dec 5 16:30:43 2016 +0800
----------------------------------------------------------------------
.../spark/sql/execution/command/carbonTableSchema.scala | 7 +++++++
.../spark/sql/execution/command/carbonTableSchema.scala | 8 +++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------