asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taewoo Kim <wangs...@gmail.com>
Subject Re: Type promotion on range
Date Mon, 10 Oct 2016 17:50:11 GMT
@Steven:

I tried the following and it works fine.

let $x := range(1,2)
from $y in dataset Accounts
*from $z in $x*
where $y.id = *$z*
return $y



Best,
Taewoo

On Mon, Oct 10, 2016 at 10:45 AM, Steven Jacobs <sjaco002@ucr.edu> wrote:

> Hi, the following returns an empty result set on master:
>
> drop dataverse test if exists;
> create dataverse test;
> use dataverse test;
>
> create type account as open
> { id: int, sum:int }
>
> create dataset Accounts(account) primary key id;
>
> insert into dataset Accounts(
> {"id": 1, "sum":100}
> )
> insert into dataset Accounts(
> {"id": 2, "sum":150}
> )
>
> let $x := range(1,2)
> from $y in dataset Accounts
> where $y.id = $x
> return $y
>
>
> Is this the desired behavior or an issue? I've never worked closely with
> range, so I wasn't sure whether it has strict type constraints.
> Steven
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message