You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ma...@apache.org on 2017/12/15 06:23:36 UTC
carbondata git commit: [CARBONDATA-1897] Remove column group in
describe command
Repository: carbondata
Updated Branches:
refs/heads/master 29af71f75 -> 02aa39701
[CARBONDATA-1897] Remove column group in describe command
Column group information is not valid, remove it from DESC TABLE output
This closes #1663
Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/02aa3970
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/02aa3970
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/02aa3970
Branch: refs/heads/master
Commit: 02aa3970159a098a4da12157c1594eace1969042
Parents: 29af71f
Author: Jacky Li <ja...@qq.com>
Authored: Fri Dec 15 11:35:02 2017 +0800
Committer: manishgupta88 <to...@gmail.com>
Committed: Fri Dec 15 11:56:42 2017 +0530
----------------------------------------------------------------------
.../table/CarbonDescribeFormattedCommand.scala | 18 ------------------
1 file changed, 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/carbondata/blob/02aa3970/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 d0baa61..807c8e5 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
@@ -38,23 +38,6 @@ private[sql] case class CarbonDescribeFormattedCommand(
tblIdentifier: TableIdentifier)
extends MetadataCommand {
- private def getColumnGroups(dimensions: List[CarbonDimension]): Seq[(String, String, String)] = {
- var results: Seq[(String, String, String)] =
- Seq(("", "", ""), ("##Column Group Information", "", ""))
- val groupedDimensions = dimensions.groupBy(x => x.columnGroupId()).filter {
- case (groupId, _) => groupId != -1
- }.toSeq.sortBy(_._1)
- val groups = groupedDimensions.map(colGroups => {
- colGroups._2.map(dim => dim.getColName).mkString(", ")
- })
- var index = 1
- groups.foreach { x =>
- results = results :+ (s"Column Group $index", x, "")
- index = index + 1
- }
- results
- }
-
override def processMetadata(sparkSession: SparkSession): Seq[Row] = {
val relation = CarbonEnv.getInstance(sparkSession).carbonMetastore
.lookupRelation(tblIdentifier)(sparkSession).asInstanceOf[CarbonRelation]
@@ -135,7 +118,6 @@ private[sql] case class CarbonDescribeFormattedCommand(
.map(column => column).mkString(","), ""))
val dimension = carbonTable
.getDimensionByTableName(relation.carbonTable.getTableName)
- results ++= getColumnGroups(dimension.asScala.toList)
if (carbonTable.getPartitionInfo(carbonTable.getTableName) != null) {
results ++=
Seq(("Partition Columns", carbonTable.getPartitionInfo(carbonTable.getTableName)