You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Andrey Aleksandrov (Jira)" <ji...@apache.org> on 2019/09/10 14:47:00 UTC

[jira] [Created] (IGNITE-12159) Ignite spark doesn't support Alter Column syntax

Andrey Aleksandrov created IGNITE-12159:
-------------------------------------------

             Summary: Ignite spark doesn't support Alter Column syntax
                 Key: IGNITE-12159
                 URL: https://issues.apache.org/jira/browse/IGNITE-12159
             Project: Ignite
          Issue Type: Bug
          Components: spark
    Affects Versions: 2.7.5
            Reporter: Andrey Aleksandrov
             Fix For: 2.8


Steps:

1)Start the server
2)Run next SQL commands

CREATE TABLE person (id LONG, name VARCHAR(64), age LONG, city_id DOUBLE, zip_code LONG, PRIMARY KEY (name)) WITH "backups=1"
ALTER TABLE person ADD COLUMN (first_name VARCHAR(64), last_name VARCHAR(64))

3)After that run next spark code:

       String configPath = "client.xml";
      
       SparkConf sparkConf = new SparkConf()
               .setMaster("local")
               .setAppName("Example"); 

      IgniteSparkSession.builder()
               .appName("Spark Ignite catalog example")
               .master("local")
               .config("ignite.disableSparkSQLOptimization", true)
               .igniteConfig(configPath)
               .getOrCreate();
 
      Dataset<Row> df2 = igniteSession.sql("select * from person1");       
      df2.show();

The result will contain only 5 columns from CREATE TABLE call.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)