ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-11604) Drop column does not remove column from internal schema
Date Mon, 25 Mar 2019 11:55:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-11604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16800608#comment-16800608

Vladimir Ozerov commented on IGNITE-11604:

This appears to be a bit complicated matter. First, it is true that {{QuerySchema.finish}}
works incorrectly. Name of the field may be not present in {{QueryEntity.fields}}, but instead
be in {{QueryEntity.aliases}}. This is especially prevalent for static cache configurations.

But more important, I have doubts that actual removal from the table {{GridH2Table#dropColumns}}
works fine. Somehow even after successful removal of a column in this method, it is still
returned back in query. Moreover, it is not clear what would happen with indexes which depended
on the column. Will they be deleted? 

Need to investigate both places carefully and add more tests.

> Drop column does not remove column from internal schema
> -------------------------------------------------------
>                 Key: IGNITE-11604
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11604
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Alexey Goncharuk
>            Priority: Major
>             Fix For: 2.8
> Discovered this during the work on IGNITE-11541 (see {{StaticCacheDdlTest.testDropColumn}}).
> After a quick debug I see the following: in {{GridQueryProcessor#onSchemaFinishDiscovery}}
we call {{DynamicCacheDescriptor.schemaChangeFinish(msg)}}, which eventually calls {{QuerySchema.finish(op)}}.
> Inside that method we have the following: the {{message.columns()}} collection has the
field name in upper case (in the test it's "FIELD_TO_DROP"), but the entity's fields map contains
lower-case names ("field_to_drop"). As a result, we do not remove the field from the query
entity, this query entity is saved to the stored cache data and field re-appears after restart.

This message was sent by Atlassian JIRA

View raw message