db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [PATCH] Derby-156
Date Wed, 20 Apr 2005 04:14:44 GMT
Shreyas Kaushik wrote:
> Did anyone gfo through this?

I looked briefly. Do you have an explanation of your changes?
Adding comments to the code you added in DeleteNode, explaining what
exactly that new block is doing would be really useful.

I would say the chance of a fix being committed quickly increases
significantly if it is well explained and well commented. The code
changes really need to stand alone, ie. be understandable through
comments, as anyone looking through the code in the future will not have
a link to any e-mail discussion to help them along. Though a summary of
the changes with the contribution can be useful. Such a summary is also
a useful commit comment for the svn history of changes to the codeline.

Writing code comments is also very helpful to the writer of the code,
helps to cement the mental ideas into code. A good practise is to write
the comments first and then the code.

Dan.

>>>> Index: java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
>>>> ===================================================================
>>>> ---
>>>> java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java      
>>>> (revision 161449)
>>>> +++
>>>> java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java      
>>>> (working copy)
>>>> @@ -241,6 +241,13 @@
>>>>                       resultColumnList = new ResultColumnList();
>>>>
>>>>                       FromBaseTable fbt =
>>>> getResultColumnList(resultColumnList);
>>>> +
>>>> +                        if(targetTable instanceof FromBaseTable) {
>>>> +                            String correlationName;
>>>> +                            correlationName =
>>>> ((FromBaseTable)targetTable).correlationName;
>>>> +                            if(correlationName != null)
>>>> +                                fbt.correlationName = correlationName;
>>>> +                        }
>>>>
>>>>                       readColsBitSet = getReadMap(dataDictionary,
>>>>                                                                         
    
>>>> targetTableDescriptor);

> 



Mime
View raw message