blob: adcb144a4bd1c2f01e0de2c91d5c82cc8c42f3d8 [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.
*/
E = source(line,"../tests/data/points.txt",",",type( < X: double, Y: double > ));
repeat xx = select x from <X:x,Y:y> in E
step select (n,true) from x in xx group by n: x
limit 3;
repeat xx = {1,2}
step select x+1 from x in xx
limit 2;
repeat xx = {1,2}
step select (x+1,true) from x in xx
limit 2;
repeat xx = select x from <X:x,Y:y> in E
step select x+1 from x in xx
limit 2;
repeat xx = select x from <X:x,Y:y> in E
step select (x+1,true) from x in xx
limit 2;
repeat (xx,yy) = ({1,2},{3,4})
step ((select x+y from x in xx, y in yy),
(select x*y from x in xx, y in yy))
limit 2;
repeat xx = {1,2}
step select (x+y as int) from x in xx, <X:*,Y:y> in E
limit 1;
repeat xx = {1,2}
step select (x+y as int,true) from x in xx, <X:*,Y:y> in E
limit 1;
repeat (xx,yy) = ((select x from <X:x,Y:y> in E where y < 10),
(select y from <X:x,Y:y> in E where x < 10))
step ((select x+y from x in xx, y in yy where x=y),
(select x*y from x in xx, y in yy where x=y))
limit 2;