carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [36/50] [abbrv] carbondata git commit: [CARBONDATA-1949, CARBONDATA-1950] Fixed bug related to describe formatted command as sort_scope was displayed twice
Date Sun, 07 Jan 2018 03:05:44 GMT
[CARBONDATA-1949, CARBONDATA-1950] Fixed bug related to describe formatted command as sort_scope
was displayed twice

Modified code to fix the issue for SORT_SCOPE getting displayed twice in describe formatted
command

This closes #1740


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/0c65aba0
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/0c65aba0
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/0c65aba0

Branch: refs/heads/carbonstore
Commit: 0c65aba0d4a27b3a31231e28c51577edc6e7e3f8
Parents: 852b1a4
Author: Geetika Gupta <geetika.gupta@knoldus.in>
Authored: Fri Dec 29 14:14:40 2017 +0530
Committer: manishgupta88 <tomanishgupta18@gmail.com>
Committed: Thu Jan 4 17:34:11 2018 +0530

----------------------------------------------------------------------
 .../table/CarbonDescribeFormattedCommand.scala    | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/0c65aba0/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala
index 3573e14..7e5edd8 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala
@@ -87,9 +87,11 @@ private[sql] case class CarbonDescribeFormattedCommand(
     results ++= Seq(("Table Name", relation.carbonTable.getTableName, ""))
     results ++= Seq(("CARBON Store Path ", CarbonProperties.getStorePath, ""))
     val carbonTable = relation.carbonTable
+
+    val tblProps = carbonTable.getTableInfo.getFactTable.getTableProperties
+
     // Carbon table support table comment
-    val tableComment = carbonTable.getTableInfo.getFactTable.getTableProperties.asScala
-      .getOrElse(CarbonCommonConstants.TABLE_COMMENT, "")
+    val tableComment = tblProps.asScala.getOrElse(CarbonCommonConstants.TABLE_COMMENT, "")
     results ++= Seq(("Comment", tableComment, ""))
     results ++= Seq(("Table Block Size ", carbonTable.getBlockSizeInMB + " MB", ""))
     val dataIndexSize = CarbonUtil.calculateDataIndexSize(carbonTable)
@@ -101,16 +103,12 @@ private[sql] case class CarbonDescribeFormattedCommand(
       results ++= Seq((CarbonCommonConstants.LAST_UPDATE_TIME,
         dataIndexSize.get(CarbonCommonConstants.LAST_UPDATE_TIME).toString, ""))
     }
-    results ++= Seq(("SORT_SCOPE", carbonTable.getTableInfo.getFactTable
-      .getTableProperties.asScala.getOrElse("sort_scope", CarbonCommonConstants
-      .LOAD_SORT_SCOPE_DEFAULT), CarbonCommonConstants.LOAD_SORT_SCOPE_DEFAULT))
-    val isStreaming = carbonTable.getTableInfo.getFactTable.getTableProperties.asScala
-      .getOrElse("streaming", "false")
-    results ++= Seq(("Streaming", isStreaming, ""))
 
-    val tblProps = carbonTable.getTableInfo.getFactTable.getTableProperties
     results ++= Seq(("SORT_SCOPE", tblProps.asScala.getOrElse("sort_scope", CarbonCommonConstants
-      .LOAD_SORT_SCOPE_DEFAULT), CarbonCommonConstants.LOAD_SORT_SCOPE_DEFAULT))
+      .LOAD_SORT_SCOPE_DEFAULT), tblProps.asScala.getOrElse("sort_scope", CarbonCommonConstants
+      .LOAD_SORT_SCOPE_DEFAULT)))
+    val isStreaming = tblProps.asScala.getOrElse("streaming", "false")
+    results ++= Seq(("Streaming", isStreaming, ""))
 
     // show table level compaction options
     if (tblProps.containsKey(CarbonCommonConstants.TABLE_MAJOR_COMPACTION_SIZE)) {


Mime
View raw message