carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anubhav100 <...@git.apache.org>
Subject [GitHub] carbondata issue #897: [CARBONDATA-1024] added support for float data type i...
Date Mon, 05 Jun 2017 18:24:49 GMT
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/897
  
    @chenliang613 now i tested it manually as well with latest code can you merge it here
are logs to verify
     
    INSIDE SPARK SHELL 
    scala> carbon.sql("create table floattest(name string,salary float) stored by 'carbondata'")
    
    scala> carbon.sql("""load data inpath 'hdfs://localhost:54310/floatypetest.csv' into
table floattest""").show
    
    scala> carbon.sql("""SELECT * FROM floattest""").show
    +-------+-------+
    |   name| salary|
    +-------+-------+
    |ANUBHAV|20000.0|
    |  LIANG|  2.0E7|
    +-------+-------+
    
    INSIDE HIVE SHELL
    
    hive> create table floattesthive(NAME string,salary float);
    OK
    Time taken: 0.283 seconds
    hive> ALTER TABLE FLOATTESTHIVE SET FILEFORMAT
        > INPUTFORMAT "org.apache.carbondata.hive.MapredCarbonInputFormat"
        > OUTPUTFORMAT "org.apache.carbondata.hive.MapredCarbonOutputFormat"
        > SERDE "org.apache.carbondata.hive.CarbonHiveSerDe";
    OK
    Time taken: 0.386 seconds
    hive> ALTER TABLE floattesthive SET LOCATION 'hdfs://localhost:54310/opt/carbonStore/default/floattest'
;
    OK
    Time taken: 0.414 seconds
    hive> select * from floattesthive;
    OK
    ANUBHAV	20000.0
    LIANG	2.0E7
    Time taken: 0.085 seconds, Fetched: 2 row(s)
    



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