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 Sat, 14 Jan 2017 04:22:17 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/528#discussion_r96108503
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonMetastore.scala
---
    @@ -782,7 +782,47 @@ 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 {
    +        val output = CarbonMetastoreTypes.toDataType {
    --- End diff --
    
    can you add comment in code to describe this conversion


---
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