carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #528: [CARBONDATA-617]Fix InsertInto test ...
Date Fri, 13 Jan 2017 08:52:32 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/528#discussion_r95956880
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonMetastore.scala
---
    @@ -782,7 +781,49 @@ case class CarbonRelation(
             nullable = true)())
       }
     
    -  override val output = dimensionsAttr ++ measureAttr
    +  override val output = {
    +    val columns = tableMeta.carbonTable.getCreateOrderColumn(tableMeta.carbonTable.getFactTableName)
    +      .asScala
    +    columns.filter(!_.isInvisible).map { column =>
    +      if (column.isDimesion()) {
    +        val output: DataType = column.getDataType.toString.toLowerCase match {
    +          case "array" =>
    +            CarbonMetastoreTypes.toDataType(s"array<${getArrayChildren(column.getColName)}>")
    +          case "struct" =>
    +            CarbonMetastoreTypes.toDataType(s"struct<${getStructChildren(column.getColName)}>")
    +          case dType =>
    +            val dataType = addDecimalScaleAndPrecision(column, dType)
    +            CarbonMetastoreTypes.toDataType(dataType)
    +        }
    +        AttributeReference(column.getColName, output,
    +          nullable = true
    +        )(qualifier = Option(tableName + "." + column.getColName))
    +      } else {
    +        AttributeReference(column.getColName, CarbonMetastoreTypes.toDataType(
    --- End diff --
    
    move `CarbonMetastoreTypes.toDataType` to previous line to make it more readable


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message