blob: e1ef5be67d500a60868c38574f19cd1cb6e3968f [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
drop dataverse `pull-select-above-eq-join` if exists;
create dataverse `pull-select-above-eq-join`;
use `pull-select-above-eq-join`;
create type `pull-select-above-eq-join`.UserType as
{
uid : integer,
name : string,
city : string,
lottery_numbers : {{integer}}
};
create type `pull-select-above-eq-join`.VisitorType as
{
vid : integer,
name : string,
city : string,
lottery_numbers : {{integer}}
};
create nodegroup group1 if not exists on
asterix_nc1,
asterix_nc2
;
create dataset Users(UserType) primary key uid WITH {"node-group":{"name":"group1"}};
create dataset Visitors(VisitorType) primary key vid WITH {"node-group":{"name":"group1"}};
select element {'uid':user.uid,'vid':visitor.vid}
from Users as user,
Visitors as visitor
where ((user.name = visitor.name) and (user.city != visitor.city))
;