namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

UnnestingFunctionCallExpression cannot be cast to ScalarFunctionCallExpression #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Raman,

This runtime test is currently ignored, it fails when run individually on 64 
bit Ubuntu.

Steps to reproduce the problem on latest asterix code from google code using 
latest hyracks_dev_next branch.

Input statements:

drop dataverse test if exists;

create dataverse test;

use dataverse test;

for $l in [1]
return subset-collection([1, 2, 3, 4], 1, 2)

Duration of all jobs: 0.032

Here is the logical plan with the exception

Logical plan:

write [%0->$$2] -- |UNPARTITIONED|
  project ([$$2]) -- |UNPARTITIONED|
    assign [$$2] <- [function-call: asterix:subset-collection, Args:[function-call: asterix:ordered-list-constructor, Args:[AInt32: {1}, AInt32: {2}, AInt32: {3}, AInt32: {4}], AInt32: {1}, AInt32: {2}]] -- |UNPARTITIONED|
      unnest $$0 <- function-call: asterix:scan-collection, Args:[function-call: asterix:ordered-list-constructor, Args:[AInt32: {1}]] -- |UNPARTITIONED|
        empty-tuple-source -- |UNPARTITIONED|
java.lang.ClassCastException: 
edu.uci.ics.hyracks.algebricks.core.algebra.expressions.UnnestingFunctionCallExp
ression cannot be cast to 
edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpres
sion

Build details are;

khurram@ubuntu:~/google-code/trunk/asterix$ svn info
Path: .
URL: http://asterixdb.googlecode.com/svn/trunk/asterix
Repository Root: http://asterixdb.googlecode.com/svn
Repository UUID: eaa15691-b419-025a-1212-ee371bd00084
Revision: 29
Node Kind: directory
Schedule: normal
Last Changed Author: vinayakb
Last Changed Rev: 26
Last Changed Date: 2012-03-13 12:17:32 -0700 (Tue, 13 Mar 2012)

khurram@ubuntu:~/google-code/trunk/hyracks_dev_next$ svn info
Path: .
URL: http://hyracks.googlecode.com/svn/branches/hyracks_dev_next
Repository Root: http://hyracks.googlecode.com/svn
Repository UUID: 123451ca-8445-de46-9d55-352943316053
Revision: 1287
Node Kind: directory
Schedule: normal
Last Changed Author: vinayakb
Last Changed Rev: 1274
Last Changed Date: 2012-03-05 23:01:47 -0800 (Mon, 05 Mar 2012)

Original issue reported on code.google.com by khfaraaz82 on 14 Mar 2012 at 6:06

GoogleCodeExporter commented 9 years ago

Original comment by vinay...@gmail.com on 6 Apr 2012 at 10:40

GoogleCodeExporter commented 9 years ago

Original comment by khfaraaz82 on 20 Nov 2012 at 6:23

GoogleCodeExporter commented 9 years ago
This is not bug, because "subset-collection" is defined as an unnesting 
function instead of a scalar function. An unnesting function returns a series 
of values one-by-one instead of a single value. Therefore you cannot say:

return subset-collection([1, 2, 3, 4], 1, 2)

Original comment by buyingyi@gmail.com on 25 Nov 2012 at 7:31