carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #478: [CARBONDATA-577]Fix carbon commands ...
Date Thu, 29 Dec 2016 04:16:29 GMT
GitHub user ravipesala opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/478

    [CARBONDATA-577]Fix carbon commands in spark shell

    With this PR, user can create CarbonSesion inside the spark shell and executes the carbon
commands,
    
    ```
    scala> import org.apache.spark.sql.SparkSession
    
    scala> import org.apache.spark.sql.CarbonSession._
    
    scala> val carbon = SparkSession.builder().master("local").appName("CarbonShellExample").enableHiveSupport().getOrCreateCarbonSession()
    
    scala> carbon.sql(
          s"""
             | CREATE TABLE carbon_table5(
             |    shortField short,
             |    intField int,
             |    bigintField long,
             |    doubleField double,
             |    stringField string,
             |    timestampField timestamp,
             |    decimalField decimal(18,2),
             |    dateField date,
             |    charField char(5)
             | )
             | STORED BY 'carbondata'
             | TBLPROPERTIES('DICTIONARY_INCLUDE'='dateField, charField')
           """.stripMargin)
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ravipesala/incubator-carbondata shell-bug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-carbondata/pull/478.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #478
    
----
commit e8d6547d9859e29f9bb919f06c0a3d9145bb4145
Author: ravipesala <ravi.pesala@gmail.com>
Date:   2016-12-29T04:03:02Z

    Fix using carbon commands in spark shell

----


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