You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ss...@apache.org on 2021/07/05 15:24:26 UTC
[systemds] branch master updated: [MINOR] Added function parameter
for order in frameSort
This is an automated email from the ASF dual-hosted git repository.
ssiddiqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/master by this push:
new 548eab7 [MINOR] Added function parameter for order in frameSort
548eab7 is described below
commit 548eab77e1f0ee378c800aeeeb21b6dfecc1727a
Author: Shafaq Siddiqi <sh...@tugraz.at>
AuthorDate: Mon Jul 5 17:23:19 2021 +0200
[MINOR] Added function parameter for order in frameSort
---
scripts/builtin/frameSort.dml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/builtin/frameSort.dml b/scripts/builtin/frameSort.dml
index 3d2f754..1a62f9f 100644
--- a/scripts/builtin/frameSort.dml
+++ b/scripts/builtin/frameSort.dml
@@ -38,7 +38,7 @@
-s_frameSort = function(Frame[String] F)
+s_frameSort = function(Frame[String] F, Boolean orderDesc = TRUE )
return (Frame[String] f_odered)
{
idx = matrix(1, 1, ncol(F))
@@ -47,6 +47,6 @@ return (Frame[String] f_odered)
# recode logical pipelines for easy handling
jspecR = "{ids:true, recode:["+index+"]}";
[X, M] = transformencode(target=F, spec=jspecR);
- ordered = order(target = X, by = 1, decreasing=TRUE, index.return=FALSE)
+ ordered = order(target = X, by = 1, decreasing=orderDesc, index.return=FALSE)
f_odered = transformdecode(target=ordered, spec=jspecR, meta=M);
}
\ No newline at end of file