br1ghtyang / asterixdb

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

[Severity-BetaBlocker]Job failed error when trying to use query nested open data elements #350

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
FIRST DOING THIS ON OUR TinySocial EXAMPLE:

use dataverse TinySocial;

insert into dataset TweetMessages
(
   {"tweetid":"13",
    "user":
        {"screen-name":"NathanGiesen@211",
         "lang":"en",
         "friends_count":39345,
         "statuses_count":479,
         "name":"Nathan Giesen",
         "followers_count":49420,
         "hobbies":["basket weaving","mud wrestling"]
        },
    "sender-location":point("47.44,80.65"),
    "send-time":datetime("2008-04-26T10:10:35"),
    "referred-topics":{{"tweeting"}},
    "message-text":"tweety tweet, my fellow tweeters!"
   }
);

AND THEN DOING THIS:

use dataverse TinySocial;

for $tm  in dataset TweetMessages
where (some $h in $tm.user.hobbies
               satisfies $h = "basket weaving")
return $tm;

YIELDS THIS NON-DESCRIPTIVE "Job Failed" FAILURE:

edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException: 
edu.uci.ics.hyracks.api.exceptions.HyracksException: Job Failed

INSTEAD OF:

Presumably, though I'm not 100% sure I got the logic right since I can't run 
the query, this query will retrieve (only) the newly inserted data item.  I 
tried to run it (with AdlAql101 in mind) as an illustration of our 
semi-structured data storing/querying capabilities thanks to open typing.

Original issue reported on code.google.com by dtab...@gmail.com on 13 Apr 2013 at 11:00

GoogleCodeExporter commented 8 years ago

Original comment by buyingyi@gmail.com on 19 Apr 2013 at 7:33

GoogleCodeExporter commented 8 years ago
Mike, 

what's your DDL statements?
I tried the query and it works.  Attached are my DDL, update, query and result.

Yingyi

Original comment by buyingyi@gmail.com on 28 Apr 2013 at 6:52

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry - filed a bunch of issues like this in a row last weekend and I guess I 
didn't attach the repro to all of them!  Attached now - try again with these 
types/datasets and you should hit the problem.  Let me know if it still refuses 
to show its face and I will try it again myself - but I think this'll do it for 
you.

Original comment by dtab...@gmail.com on 29 Apr 2013 at 7:55

Attachments:

GoogleCodeExporter commented 8 years ago
Ok, fails!

Original comment by buyingyi@gmail.com on 29 Apr 2013 at 8:22

GoogleCodeExporter commented 8 years ago
Just to update:

this is the optimized query plan:
distribute result [%0->$$0]
-- DISTRIBUTE_RESULT  |PARTITIONED|
  exchange 
  -- RANDOM_MERGE_EXCHANGE  |PARTITIONED|
    project ([$$0])
    -- STREAM_PROJECT  |PARTITIONED|
      select (%0->$$6)
      -- STREAM_SELECT  |PARTITIONED|
        project ([$$0, $$6])
        -- STREAM_PROJECT  |PARTITIONED|
          subplan {
                    aggregate [$$6] <- [function-call: asterix:non-empty-stream, Args:[]]
                    -- AGGREGATE  |LOCAL|
                      select (function-call: algebricks:eq, Args:[%0->$$1, AString: {basket weaving}])
                      -- STREAM_SELECT  |LOCAL|
                        unnest $$1 <- function-call: asterix:scan-collection, Args:[%0->$$8]
                        -- UNNEST  |LOCAL|
                          nested tuple source
                          -- NESTED_TUPLE_SOURCE  |LOCAL|
                 }
          -- SUBPLAN  |PARTITIONED|
            assign [$$8] <- [function-call: asterix:field-access-by-name, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {user}], AString: {hobbies}]]
            -- ASSIGN  |PARTITIONED|
              project ([$$0])
              -- STREAM_PROJECT  |PARTITIONED|
                exchange 
                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                  data-scan []<-[$$7, $$0] <- TinySocial:TweetMessages
                  -- DATASOURCE_SCAN  |PARTITIONED|
                    exchange 
                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                      empty-tuple-source
                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|

In the loaded dataset, users inside twitter messages do not have hobbies,  thus 
the parameter to scan-collection is NULL, but the function could not deals with 
NULL input properly.  I'm fixing it.

Original comment by buyingyi@gmail.com on 30 Apr 2013 at 5:30

GoogleCodeExporter commented 8 years ago
yingyi/asterix_beta_fix

Original comment by buyingyi@gmail.com on 30 Apr 2013 at 8:05

GoogleCodeExporter commented 8 years ago

Original comment by buyingyi@gmail.com on 8 May 2013 at 3:58