Open GoogleCodeExporter opened 9 years ago
All of the functions that take spatial types should probably be inspected - it
may be that none of them are protecting themselves...
Original comment by dtab...@gmail.com
on 6 Dec 2014 at 1:48
Actually CreateCircleDescriptor has the following protection. I am not sure why
this is not triggered.
// Type check: (point, double)
if (outInput0.getByteArray()[0] != SER_POINT_TYPE_TAG
|| outInput1.getByteArray()[0] != SER_DOUBLE_TYPE_TAG) {
throw new AlgebricksException(AsterixBuiltinFunctions.CREATE_CIRCLE.getName()
+ ": expects input type (POINT, DOUBLE) but got ("
+ EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(outInput0.getByteArray()[0])
+ ", "
+ EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(outInput1.getByteArray()[0])
+ ")");
}
Original comment by wangs...@gmail.com
on 6 Dec 2014 at 1:57
Yeah actually in most cases it does throw a message saying that the type is
wrong. I had to work hard to produce this bug. It seems to correlate with using
it in a "for" statement.
Original comment by sjaco...@ucr.edu
on 6 Dec 2014 at 3:18
[deleted comment]
During the optimization, suddenly, all operators inside the function is gone.
If you check the final plan, it's so simple. And, the debugging tells me that
it does not go through "createCircleDescriptor". So, I think the problem exists
in the "edu.uci.ics.asterix.optimizer.rules.CancelUnnestWithNestedListifyRule"
rule.
Dec 05, 2014 7:29:03 PM
edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController
printRuleApplication
FINE: >>>> Rule class
edu.uci.ics.asterix.optimizer.rules.CancelUnnestWithNestedListifyRule fired.
Dec 05, 2014 7:29:03 PM
edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController
printRuleApplication
FINE: >>>> Before plan
distribute result [%0->$$1] -- |UNPARTITIONED|
project ([$$1]) -- |UNPARTITIONED|
unnest $$1 <- function-call: asterix:scan-collection, Args:[%0->$$17] -- |UNPARTITIONED|
group by ([$$18 := %0->$$23]) decor ([%0->$$0; %0->$$2]) {
aggregate [$$17] <- [function-call: asterix:listify, Args:[%0->$$20]] -- |UNPARTITIONED|
select (function-call: asterix:spatial-intersect, Args:[%0->$$21, %0->$$5]) -- |UNPARTITIONED|
assign [$$5] <- [function-call: asterix:create-circle, Args:[%0->$$2, ADouble: {30.0}]] -- |UNPARTITIONED|
assign [$$21] <- [function-call: asterix:field-access-by-name, Args:[%0->$$4, AString: {location}]] -- |UNPARTITIONED|
select (function-call: algebricks:not, Args:[function-call: algebricks:is-null, Args:[%0->$$22]]) -- |UNPARTITIONED|
nested tuple source -- |UNPARTITIONED|
} -- |UNPARTITIONED|
left outer join (function-call: asterix:contains, Args:[%0->$$20, %0->$$2]) -- |UNPARTITIONED|
assign [$$2] <- [function-call: asterix:field-access-by-index, Args:[%0->$$0, AInt32: {2}]] -- |UNPARTITIONED|
data-scan []<-[$$23, $$0] <- channels:TweetHistorySubscriptions -- |UNPARTITIONED|
empty-tuple-source -- |UNPARTITIONED|
assign [$$22] <- [TRUE] -- |UNPARTITIONED|
assign [$$20] <- [function-call: asterix:field-access-by-index, Args:[%0->$$4, AInt32: {5}]] -- |UNPARTITIONED|
data-scan []<-[$$19, $$4] <- channels:TweetMessages -- |UNPARTITIONED|
empty-tuple-source -- |UNPARTITIONED|
Dec 05, 2014 7:29:03 PM
edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController
printRuleApplication
FINE: >>>> After plan
distribute result [%0->$$1] -- |UNPARTITIONED|
project ([$$1]) -- |UNPARTITIONED|
assign [$$1] <- [%0->$$20] -- |UNPARTITIONED|
order (ASC, %0->$$23) -- |UNPARTITIONED|
assign [$$18] <- [%0->$$23] -- |UNPARTITIONED|
left outer join (function-call: asterix:contains, Args:[%0->$$20, %0->$$2]) -- |UNPARTITIONED|
assign [$$2] <- [function-call: asterix:field-access-by-index, Args:[%0->$$0, AInt32: {2}]] -- |UNPARTITIONED|
data-scan []<-[$$23, $$0] <- channels:TweetHistorySubscriptions -- |UNPARTITIONED|
empty-tuple-source -- |UNPARTITIONED|
assign [$$22] <- [TRUE] -- |UNPARTITIONED|
assign [$$20] <- [function-call: asterix:field-access-by-index, Args:[%0->$$4, AInt32: {5}]] -- |UNPARTITIONED|
data-scan []<-[$$19, $$4] <- channels:TweetMessages -- |UNPARTITIONED|
empty-tuple-source -- |UNPARTITIONED|
Original comment by wangs...@gmail.com
on 6 Dec 2014 at 3:39
Original comment by sjaco...@ucr.edu
on 15 Dec 2014 at 6:54
Wierd! Once the problem is fixed, then, I guess this won't happen - too bad
since I was going to suggest an error message like "AsterixDB doesn't accept
pointless calls to this function." :-)
Original comment by dtab...@gmail.com
on 16 Dec 2014 at 6:43
Original issue reported on code.google.com by
sjaco...@ucr.edu
on 5 Dec 2014 at 9:05