
platform_functions_relation.relation.functions.drop.pure Maven / Gradle / Ivy
// Copyright 2023 Goldman Sachs
//
// Licensed 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.
import meta::pure::test::pct::*;
import meta::pure::metamodel::relation::*;
native function <> meta::pure::functions::relation::drop(rel:Relation[1], size:Integer[1]):Relation[1];
function <> meta::pure::functions::relation::tests::drop::testSimpleDropShared(f:Function<{Function<{->T[m]}>[1]->T[m]}>[1]):Boolean[1]
{
let expr = {
|#TDS
val, str
1, a
3, ewe
4, qw
5, wwe
6, weq
#->drop(3)
};
let res = $f->eval($expr);
assertEquals( '#TDS\n'+
' val,str\n'+
' 5,wwe\n'+
' 6,weq\n'+
'#', $res->toString());
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy