You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ra...@apache.org on 2016/08/01 10:05:13 UTC

[15/47] incubator-carbondata git commit: [bug]fix store format bug in complex type example(#477)

[bug]fix store format bug in complex type example(#477)

[bug]fix store format bug in complex type example(#477)

Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/9f269d19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/9f269d19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/9f269d19

Branch: refs/heads/master
Commit: 9f269d196900f3a233b877488e5c58a0ac730846
Parents: 1b16f76
Author: Gin-zhj <zh...@huawei.com>
Authored: Mon Jul 25 11:52:04 2016 +0800
Committer: david <qi...@qq.com>
Committed: Mon Jul 25 11:52:04 2016 +0800

----------------------------------------------------------------------
 .../scala/org/carbondata/examples/ComplexTypeExample.scala     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/9f269d19/examples/src/main/scala/org/carbondata/examples/ComplexTypeExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/carbondata/examples/ComplexTypeExample.scala b/examples/src/main/scala/org/carbondata/examples/ComplexTypeExample.scala
index 070dff1..2202a9c 100644
--- a/examples/src/main/scala/org/carbondata/examples/ComplexTypeExample.scala
+++ b/examples/src/main/scala/org/carbondata/examples/ComplexTypeExample.scala
@@ -55,10 +55,10 @@ object ComplexTypeExample {
                                  activeDeactivedate: array<string>>,
                   gamePointId double,
                   contractNumber double)
-                row format delimited fields terminated by ','
-                collection items terminated by '$$' map keys terminated by ':' """)
+              STORED BY 'org.apache.carbondata.format' """)
 
-    cc.sql(s"LOAD DATA LOCAL INPATH '$dataPath' INTO TABLE $tableName")
+    cc.sql(s"load data local inpath '$dataPath' into table $tableName " +
+      "options ('COMPLEX_DELIMITER_LEVEL_1'='$', 'COMPLEX_DELIMITER_LEVEL_2'=':')")
 
     // filter on complex ARRAY type with index filter
     cc.sql(s"SELECT mobile, proddate.activeDeactivedate, MAC[0] FROM $tableName " +