[
https://issues.apache.org/jira/browse/CARBONDATA-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15467188#comment-15467188 ]
ASF GitHub Bot commented on CARBONDATA-201:
-------------------------------------------
Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/118#discussion_r77617020
--- Diff: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataWithHiveSyntax.scala ---
@@ -590,6 +590,23 @@ class TestLoadDataWithHiveSyntax extends QueryTest with BeforeAndAfterAll {
checkAnswer(sql("select * from carbontable1"), sql("select * from hivetable1"))
}
+ test("test data loading with comment option") {
+ sql("drop table if exists comment_test")
+ sql(
+ "create table comment_test(imei string, age int, task bigint, num double, level decimal(10," +
+ "3), productdate timestamp, mark int, name string) STORED BY 'org.apache.carbondata.format'"
+ )
+ sql(
+ "LOAD DATA local inpath './src/test/resources/comment.csv' INTO TABLE comment_test " +
+ "options('DELIMITER' = ',', 'QUOTECHAR' = '.', 'COMMENTCHAR' = '?','FILEHEADER'='imei,age,task,num,level,productdate,mark,name')"
+ )
+ checkAnswer(sql("select imei from comment_test"),Seq(Row("\"huawei"),Row("#huawei"), Row(""),
+ Row("~huawei")))
+ sql("drop table if exists comment_test")
--- End diff --
Better to drop table in the method afterAll
> Add comment Option
> -------------------
>
> Key: CARBONDATA-201
> URL:
https://issues.apache.org/jira/browse/CARBONDATA-201> Project: CarbonData
> Issue Type: Bug
> Reporter: Lionx
>
> add csv comment option to csv paser, and fix one bug when passing qutochar.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)