forked from finos/legend-engine
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Frame in OLAP protocol (finos#3014)
* Add support for OLAP frame * Update Pure version
- Loading branch information
1 parent
cb65777
commit 7a29ff9
Showing
71 changed files
with
1,044 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...-pure/src/main/resources/core_functions_relation/relation/functions/olap/frame/range.pure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright 2024 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::*; | ||
|
||
Class meta::pure::functions::relation::_Range extends Frame | ||
{ | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::_range(offsetFrom:Integer[1], offsetTo:Integer[1]):_Range[1] | ||
{ | ||
^_Range(offsetFrom = ^FrameIntValue(value=$offsetFrom), offsetTo = ^FrameIntValue(value=$offsetTo)); | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::_range(offsetFrom:meta::pure::functions::relation::UnboundedFrameValue[1], offsetTo:Integer[1]):_Range[1] | ||
{ | ||
^_Range(offsetFrom = $offsetFrom, offsetTo = ^FrameIntValue(value=$offsetTo)); | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::_range(offsetFrom:Integer[1], offsetTo:meta::pure::functions::relation::UnboundedFrameValue[1]):_Range[1] | ||
{ | ||
^_Range(offsetFrom = ^FrameIntValue(value=$offsetFrom), offsetTo = $offsetTo); | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::_range(offsetFrom:meta::pure::functions::relation::UnboundedFrameValue[1], offsetTo:meta::pure::functions::relation::UnboundedFrameValue[1]):_Range[1] | ||
{ | ||
^_Range(offsetFrom = $offsetFrom, offsetTo = $offsetTo); | ||
} |
51 changes: 51 additions & 0 deletions
51
...n-pure/src/main/resources/core_functions_relation/relation/functions/olap/frame/rows.pure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright 2024 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::*; | ||
|
||
Class meta::pure::functions::relation::Rows extends Frame | ||
{ | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::rows(offsetFrom:Integer[1], offsetTo:Integer[1]):Rows[1] | ||
{ | ||
^Rows(offsetFrom = ^FrameIntValue(value=$offsetFrom), offsetTo = ^FrameIntValue(value=$offsetTo)); | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::rows(offsetFrom:meta::pure::functions::relation::UnboundedFrameValue[1], offsetTo:Integer[1]):Rows[1] | ||
{ | ||
^Rows(offsetFrom = $offsetFrom, offsetTo = ^FrameIntValue(value=$offsetTo)); | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::rows(offsetFrom:Integer[1], offsetTo:meta::pure::functions::relation::UnboundedFrameValue[1]):Rows[1] | ||
{ | ||
^Rows(offsetFrom = ^FrameIntValue(value=$offsetFrom), offsetTo = $offsetTo); | ||
} | ||
|
||
function | ||
<<functionType.NormalizeRequiredFunction, | ||
PCT.function>> | ||
meta::pure::functions::relation::rows(offsetFrom:meta::pure::functions::relation::UnboundedFrameValue[1], offsetTo:meta::pure::functions::relation::UnboundedFrameValue[1]):Rows[1] | ||
{ | ||
^Rows(offsetFrom = $offsetFrom, offsetTo = $offsetTo); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ion-pure/src/main/resources/core_functions_relation/relation/functions/ranking/ntile.pure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2024 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 <<PCT.function>> meta::pure::functions::relation::ntile<T>(w:Relation<T>[1], r:T[1], tileCount:Integer[1]):Integer[1]; |
18 changes: 18 additions & 0 deletions
18
...re/src/main/resources/core_functions_relation/relation/functions/ranking/percentRank.pure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2024 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 <<PCT.function>> meta::pure::functions::relation::percentRank<T>(w:Relation<T>[1], r:T[1]):Float[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.