GridGain Community Edition

Expand all | Collapse all

Ignite DDL script column data types change issue

  • 1.  Ignite DDL script column data types change issue

     
    Posted 30 days ago
    Hi Team,

    We are using the DDL script to create the Ignite cache if there is an column data type change needed due to change in cache value type model. Cache operations are failing with error like column data type change not supported. Try deleting work/marshaller folder.

    Deleting above folder is working. Is it the way to solve the problem and recommended for production?

    Few other observations related to the same issue: (without delete work/marshaller folder)
    1. Even delete and recreate the table with modified column and new datatype, same error.
    2. Even new table name with new cache name is also producing the same error.
    3. New table name with new cache name and new model class as value type is working.  

    Is binary objects as cache value types solves the problem? Looks to be existing filed data type change not supported for binary objects as well.
    CREATE TABLE IF NOT EXISTS "PUBLIC".EMPLOYEE(
    Id VARCHAR,
    name VARCHAR,
    title VARCHAR,
    age INT,
    PRIMARY KEY (Id)
    )WITH "backups=1,KEY_TYPE=java.lang.String,CACHE_NAME=EMP_CACHE,
    VALUE_TYPE=com.demo.model.EmployeeModel";

    Your feedback is highly appreciated.

    Thanks
    Chandra

    ------------------------------
    Chandra Donthoji
    SE
    NisumSE
    ------------------------------


  • 2.  RE: Ignite DDL script column data types change issue

    Posted 28 days ago
    Hello!

    Changing the type of column is historically not possible in Apache Ignite.

    However, the upcoming GridGain release 8.7.22 will support removal of type metadata from cluster using control.sh, so you can do the following:

    - Drop the table and make sure the old values are not present anywhere in the cluster.
    - Issue ./control.sh --meta remove --typename com.demo.model.EmployeeModel
    - Re-create the table.

    Regards,


    ------------------------------
    Ilya Kasnacheev
    Community Support Specialist
    GridGain
    ------------------------------