Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbey committed Sep 3, 2024
1 parent f398dfb commit 3e49602
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-store-relational-java</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-dsl-mapping-java</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,30 @@ function <<test.Test>> meta::relational::tests::exec::testS3Execution() : Boolea

let resultJson = meta::legend::executeLegendQuery($func, [], meta::relational::extension::relationalExtensions());

assertEquals('', $resultJson);
let result = meta::protocols::pure::vX_X_X::invocation::execution::execute::legendBuildResultFromJSON(
$resultJson,
@TabularDataSet,
meta::relational::tests::exec::EmptyMapping,
$runtime,
[],
meta::relational::extension::relationalExtensions()
);

let values = $result.values->cast(@TabularDataSet)->toOne();

meta::relational::functions::asserts::assertSameSQL('select "taxis_0".vendor_id as "vendor_id", "taxis_0".trip_id as "trip_id", "taxis_0".store_and_fwd_flag as "store_and_fwd_flag" from (select * from iceberg_scan(\'s3://warehouse/wh/nyc/taxis\', allow_moved_paths = true) as "iceberg_scan_taxis") as "taxis_0"', $result);
assertSameElements( [
'1|1000371|N',
'1|1000374|Y',
'2|1000372|N',
'2|1000373|N'
], $values.rows->map(r|$r.values->makeString('|')));
}

###Mapping
Mapping meta::relational::tests::exec::EmptyMapping()


###Relational
Database meta::relational::tests::exec::S3Database
(
Expand Down

0 comments on commit 3e49602

Please sign in to comment.