Hi Dan,

If you are ok with this, I can add the comments to the patch and send it out on the alias.

thanks
Shreyas

Shreyas Kaushik wrote:

Ok. Thanks for your suggestions I will do it.

The idea behibd adding that peice of code is:

The *delete from* did not have support for handling correlation names. So when we are creating a fresh ResultColumnList
and the FromBaseTable we need to pass the correlation name to this newly created FromBaseTable object from the target table where it will stored.


thanks
Shreyas

Daniel John Debrunner wrote:

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);








Reply via email to