carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xubo245 (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CARBONDATA-1551) There is an error when table has Array<STRING> column and compact
Date Sun, 29 Oct 2017 13:48:00 GMT

    [ https://issues.apache.org/jira/browse/CARBONDATA-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224002#comment-16224002
] 

xubo245 commented on CARBONDATA-1551:
-------------------------------------

[~jackylk] please confirm it.

> There is an error when table has Array<STRING> column and compact
> -----------------------------------------------------------------
>
>                 Key: CARBONDATA-1551
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1551
>             Project: CarbonData
>          Issue Type: Bug
>          Components: data-load
>    Affects Versions: 1.1.1
>            Reporter: xubo245
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> There is an error when table has Array<STRING> column and ENABLE_AUTO_LOAD_MERGE
is true
> {code:java}
>     //unfinish
>     sql("drop table if exists array_table")
>     CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE,
"true")
>     sql(
>       s"""
>          | CREATE TABLE array_table(
>          | complexData ARRAY<STRING>
>          | )
>          | STORED BY 'carbondata'
>          | TBLPROPERTIES('sort_columns'='')
>        """.stripMargin)
>     val storeLocation = s"$rootPath/integration/spark-common-test/src/test/resources/bool/ArrayString.csv"
>     for (i <- 0 until 4) {
>       sql(
>         s"""
>            | LOAD DATA LOCAL INPATH '${storeLocation}'
>            | INTO TABLE array_table
>            | options('FILEHEADER'='complexData')
>            """.stripMargin)
>     }
>     checkAnswer(
>       sql("select count(*) from array_table"),
>       Seq(Row(40))
>     )
>     val segments = sql("SHOW SEGMENTS FOR TABLE array_table")
>     val SegmentSequenceIds = segments.collect().map { each => (each.toSeq) (0) }
>     assert(!SegmentSequenceIds.contains("0.1"))
>     assert(SegmentSequenceIds.length == 4)
>     CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE,
>       CarbonCommonConstants.DEFAULT_ENABLE_AUTO_LOAD_MERGE)
>     sql("drop table if exists array_table")
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message