Steven Jacobs has posted comments on this change.

Change subject: [COMP] Maintain schemas for delegate operators
......................................................................


Patch Set 7:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/2726/7/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/DelegateOperator.java
File 
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/DelegateOperator.java:

Line 93:         return delegate.getSchema();
> I still don't see why this is needed. DelegateOperator is the owner of the 
The issue here is that getSchema() and setSchema() don't currently match. One 
sets the delegate schema only and one gets the DelegateOperator schema only. 
This will not work properly when the schema is re-calculated bottom-up for an 
operator above the DelegateOperator. setSchema() will set the schema for the 
delegate, and then when an operator above calls getSchema(), it won't be the 
one that was set.

There is currently no situation where it comes up, but I saw it when I was 
messing with plans on the BAD branch. I think the change is needed to make it 
future-proof. There are two choices:

1) Keep the schema on the DelegateOperator
2) Keep the schema on the delegate

I think both will work fine. I originally did (2) but Xikui suggested that (1) 
was better. I don't care either way, but the main thing is that getSchema() and 
setSchema() need to match in some way. Let me know what you think.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2726
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icc8723e686d741bf3098ff44d046cde5239e204b
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <sjaco...@ucr.edu>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dmitry.lycha...@couchbase.com>
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Steven Jacobs <sjaco...@ucr.edu>
Gerrit-Reviewer: Xikui Wang <xkk...@gmail.com>
Gerrit-HasComments: Yes

Reply via email to