carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anubhav100 <...@git.apache.org>
Subject [GitHub] incubator-carbondata issue #630: [CARBONDATA-730]added decimal type in carbo...
Date Thu, 09 Mar 2017 15:50:54 GMT
Github user anubhav100 commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/630
  
    @jackylk 
    
    i tried this with decimal value 
    val employee = List(Employee("anubhav", 20000.5))
    val employeeRDD = cc.sc.parallelize(employee)
    val employeeDataFrame = employeeRDD.toDF("name", "salary")
    
    employeeDataFrame.printSchema()
    employeeDataFrame.write
      .format("carbondata")
      .option("tableName", "carbon3")
      .option("compress", "true")
      .mode(SaveMode.Overwrite)
      .save()
    
    
    
    cc.sql("SELECT * FROM carbon3").show()
    
    |   name|salary|
    +-------+------+
    |anubhav| 20001|
    +-------+------+
    
    it seems like it is rounding off the values can you suggest something



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