-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WX-964 suffix() #7363
WX-964 suffix() #7363
Conversation
expressionValueEvaluator | ||
) | ||
) { (suffix, arr) => | ||
EvaluatedValue(WomArray(arr.value.map(v => WomString(v.valueString + suffix.value))), Seq.empty).validNel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the part that actually does the suffix-ing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in /cascades/
and /biscayne/
looks reasonable to me, not sure about the purpose of modifying /draft-3/
(though I do see a test, that presumably passes)
final case class Suffix(suffix: ExpressionElement, array: ExpressionElement) extends TwoParamFunctionCallElement { | ||
override def arg1: ExpressionElement = suffix | ||
override def arg2: ExpressionElement = array | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
draft-3
is not supposed to support suffix
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but all the other post-1.0 engine functions (ex. min
, max
, sep
) have their case classes in here so I followed that convention. There aren't equivalent files in the other language version packages, though I can make that change if desirable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like those functions may have been put in there before a next language version was declared and/or before we had our current organization scheme. I do think that separating them out (both current and the new addition) would be optimal, though maybe that's a separate ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed off-github and decided to leave this as-is.
wdl/transforms/new-base/src/main/scala/wdl/transforms/base/wdlom2wdl/WdlWriterImpl.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for adding the version table to the description, too.
Adds support for
suffix
engine function. This function was added in WDL 1.1, so Cromwell support has been added for WDL versions starting with our 1.1 development branch.suffix
supportdraft-2
draft-2
1.0
1.0
draft-3
(AKAarcadia
... in my heart)1.1
development-1.1
biscayne
1.2
or2.0
)development
cascades