db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1062) Change the internal implemetation of SYSCS_INPLACE_COMPRESS_TABLE to share existing alter table
Date Thu, 08 May 2008 16:04:55 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595303#action_12595303

Mamta A. Satoor commented on DERBY-1062:

Currently, the way SYSCS_INPLACE_COMPRESS_TABLE is implemented, it allows inplace compress
of **system tables**. 

The goal of this jira entry is to use the existing ALTER TABLE code for SYSCS_INPLACE_COMPRESS_TABLE
rather than having SYSCS_INPLACE_COMPRESS_TABLE's own implementation in iapi.db.OnlineCompress.
One problem I am encountering when I have SYSCS_INPLACE_COMPRESS_TABLE use ALTER TABLE code
is that ALTER TABLE can't be issued on a system table. (See impl.sql.compile.AlterTableNode:init
method and bindStatement method). AlterTableNode uses getSchemaDescriptor() (which is implemented
in it's super class DDLStatementNode) call in it's init method to get the schema descriptor
for the requested schema. getSchemaDescriptor() will throw an exception if the schema is system
schema. Similarly, in bindStatement() in AlterTableNode, we use getTableDescriptor (which
is implemented in it's super class DDLStatementNode) to get TableDescriptor. The getTableDescriptor()
method internally calls getSchemaDescriptor which will throw exception if we are dealing with
system schema.

In order to get around this system schema check for SYSCS_INPLACE_COMPRESS_TABLE, I am in
the process of changing/adding getters for SchemaDescriptor and TableDescriptor in case of
inplace compress. None of the junit tests will run without this fix because the junit tests
in their clean up database code issue inplace compress on system tables. 

I thought I would share where I was with this issue in case anyone has comments.

> Change the internal implemetation of SYSCS_INPLACE_COMPRESS_TABLE to share existing alter
> -----------------------------------------------------------------------------------------------
>                 Key: DERBY-1062
>                 URL: https://issues.apache.org/jira/browse/DERBY-1062
>             Project: Derby
>          Issue Type: Improvement
>          Components: Newcomer, SQL, Store
>    Affects Versions:
>            Reporter: Mike Matrigali
>            Assignee: Mamta A. Satoor
>            Priority: Minor
>  Change the internal implemetation of SYSCS_INPLACE_COMPRESS_TABLE to share existing
alter table
> code. One suggested approach is to use the same mechanism as SYSCS_COMPRESS_TABLE. Such
> an implementation would involve:
> o change the parser for alter table to accecpt some internal only syntax for SYSCS_INPLACE_COMPRESS_TABLE
> o change the alter table constant action to get the required information for inplace
> o move most of the inplace compress driving code to a routine in alter table execution,
following the same
>      coding pattern as existing alter table compress.
> I believe doing this will have multiple benefits:
> 1) shares existing alter table code, so things like error checking, security management,
... is all done by one piece of code
> 2) by sharing the code I believe the following outstanding JIRA issues will be addressed:
DERBY-719, DERBY-720 -
> 3) future changes addressing ddl like grant/revoke will automatically work.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message