ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shravya Nethula <shravya.neth...@aline-consulting.com>
Subject Issue in Alter Table - Drop Column functionality
Date Wed, 02 Sep 2020 17:27:02 GMT
Hi,

When I am trying the following query from GridGain, it works as expected.
ALTER TABLE person DROP COLUMN (age)

But when I try to execute the same query as a thick client with following Java code, its throwing
IgniteSQLException.
Java Code:
String sql = "ALTER TABLE person DROP COLUMN (age)";
FieldsQueryCursor cursor = cache.query(new SqlFieldsQuery(sql));

Output:
javax.cache.CacheException
    at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:817)
    at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:750)
    at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:424)
    at net.aline.cloudedh.base.database.IgniteTable._alterTable(IgniteTable.java:138)
    at net.aline.cloudedh.base.database.BigTable.alter(BigTable.java:697)
    at net.aline.cloudedh.base.framework.DACEngine.alterTable(DACEngine.java:1015)
    at net.aline.cloudedh.base.framework.DACOperationsTest.main(DACOperationsTest.java:89)
Caused by: class org.apache.ignite.internal.processors.query.IgniteSQLException: null
    at org.apache.ignite.internal.processors.query.h2.CommandProcessor.runCommandH2(CommandProcessor.java:888)
    at org.apache.ignite.internal.processors.query.h2.CommandProcessor.runCommand(CommandProcessor.java:418)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeCommand(IgniteH2Indexing.java:1048)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1130)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor$3.applyx(GridQueryProcessor.java:2406)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor$3.applyx(GridQueryProcessor.java:2402)
    at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2919)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$1(GridQueryProcessor.java:2422)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2460)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2396)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2323)
    at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:802)
    ... 6 more
Caused by: java.lang.NullPointerException
    at org.apache.ignite.internal.processors.query.h2.CommandProcessor.runCommandH2(CommandProcessor.java:834)
    ... 18 more


On the other hand, ALTER TABLE ADD COLUMN functionality is working in both GridGain and also
through thick client Java code.
Why is it so? Is there any parameter or configurations that are missing?
Please kindly let me know if you need any more details regarding the failure scenario.





Regards,

Shravya Nethula,

BigData Developer,

[cid:09c0df72-eaf4-487f-b018-60299eb21fc3]

Hyderabad.

Mime
View raw message