carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [43/56] [abbrv] incubator-carbondata git commit: [Bug] add property CARBON_TIMESTAMP_FORMAT for CarbonExample(#696)
Date Thu, 23 Jun 2016 14:16:31 GMT
[Bug] add property CARBON_TIMESTAMP_FORMAT for CarbonExample(#696)

[Bug] add property CARBON_TIMESTAMP_FORMAT for CarbonExample(#696)

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

Branch: refs/heads/master
Commit: 398250c71645583d8b93b859fa28eaa3591d1f4b
Parents: 91951ac
Author: Jay <liujunjie9@huawei.com>
Authored: Mon Jun 20 15:48:13 2016 +0800
Committer: david <QiangCai@users.noreply.github.com>
Committed: Mon Jun 20 15:48:13 2016 +0800

----------------------------------------------------------------------
 .../main/scala/org/carbondata/examples/CarbonExample.scala   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/398250c7/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala b/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala
index 77907ab..20b2eae 100644
--- a/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala
+++ b/examples/src/main/scala/org/carbondata/examples/CarbonExample.scala
@@ -17,8 +17,8 @@
 
 package org.carbondata.examples
 
-import org.apache.spark.{SparkConf, SparkContext}
-
+import org.carbondata.core.constants.CarbonCommonConstants
+import org.carbondata.core.util.CarbonProperties
 import org.carbondata.examples.util.InitForExamples
 
 object CarbonExample {
@@ -26,6 +26,10 @@ object CarbonExample {
     val cc = InitForExamples.createCarbonContext("CarbonExample")
     val testData = InitForExamples.currentPath + "/src/main/resources/data.csv"
 
+    // Specify timestamp format based on raw data
+    CarbonProperties.getInstance()
+      .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/mm/dd")
+
     cc.sql("DROP TABLE IF EXISTS t3")
 
     cc.sql("""


Mime
View raw message