Re: Empty frame [] should not destroy triples

Josh,

This is a bug that I also discovered while looking into the other issue 
you brought up with @embed in your previous email. When I get a chance, 
I'll fix both of them.

-Dave

On 11/23/2011 09:51 AM, Josh Mandel wrote:
> I'm not sure if this is a bug, a design decision, or the unintended
> but necessary consequence of a design decision... but I realized that
> part of what makes it difficult for me to construct useful frames is
> the behavior of am empty array frame:  [].
>
> As far as I'm concerned, an empty frame ought to preserve the triples
> in the input graph. But the current behavior is more subtle:  when a
> predicate has multiple URI objects, sometimes these objects are not
> preserved in the output.  Here's the simplest case I can construct
> that demonstrates the issue:
>
> 1.  Input asserts three URI nodes:  a "looker" which canSee "spotted"
> and "forgotten".   Input also re-asserts that "spotted" exists.
> 2.  Frame is [].
> 3.  Output loses this triple:<looker>  <canSee>  <forgotten>.
>
> INPUT
> {
>      "@subject": [{
>          "@subject": "looker",
>          "canSee": [{
>              "@iri": "forgotten"
>          }, {
>              "@iri": "spotted"
>          }]
>      }, {
>          "@subject": "spotted"
>      }]
> }
>
> FRAME
> []
>
> OUTPUT (where's "forgotten"?)
> [{
>      "@subject": {
>          "@iri": "looker"
>      },
>      "canSee": {
>          "@iri": "spotted"
>      }
> }, {
>      "@subject": {
>          "@iri": "spotted"
>      }
> }]
>
> The thing that's really giving me grief is probably a downstream
> consequence of this behavior.  But I figured I'd start at the root of
> the problem. Is the behavior known, understood, or intended?
>
> Thanks again,
>
>    Josh
>


-- 
Dave Longley
CTO
Digital Bazaar, Inc.

Received on Wednesday, 23 November 2011 19:58:28 UTC