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 Wed, 14 May 2008 16:46:55 GMT

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

Mamta A. Satoor commented on DERBY-1062:
----------------------------------------

One of the review comments from Kunt is
************
I don't quite understand how the boolean[1] variables in sqlgrammar.alterTableBody() are used.
I don't see that they are changed from their default value anywhere. 
************

impl.sql.compile.AlterTableNode has couple of init methods and one of those init methods eventually
get called when the parser has code like following
	return (StatementNode) nodeFactory.getNode(
		C_NodeTypes.ALTER_TABLE_NODE,
		........,
		getContextManager());

One of the init methods in AlterTableNode has all the possible parameters that an alter table
can be called with. The signature of that method is as follows
	public void init(
		Object objectName,
		Object tableElementList,
		Object lockGranularity,
		Object changeType,
		Object behavior,
		Object sequential,
		Object purge,
		Object defragment,
		Object truncateEndOfTable )

And this method gets called by sqlgrammar.alterTableBody() when it issues following
		return (StatementNode) nodeFactory.getNode(
			C_NodeTypes.ALTER_TABLE_NODE,
			tableName,
			tableElementList,
			new Character(lockGranularity),
			changeType,
			behavior,
			sequential, 
			purge, 
			defragment, 
			truncateEndOfTable,
			getContextManager());

But the parameters sequential, purge, defragment, truncateEndOfTable will never be set to
true when coming through this alterTableBody path. I can work on removing these parameters
and see how it goes.

> Change the internal implemetation of SYSCS_INPLACE_COMPRESS_TABLE to share existing alter
table
> -----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1062
>                 URL: https://issues.apache.org/jira/browse/DERBY-1062
>             Project: Derby
>          Issue Type: Improvement
>          Components: Newcomer, SQL, Store
>    Affects Versions: 10.1.3.1
>            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
compress
> 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.


Mime
View raw message