-
Notifications
You must be signed in to change notification settings - Fork 95
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
[NU-1977] Key
variable change in window components
#7553
base: staging
Are you sure you want to change the base?
Conversation
6ef97d7
to
230bc1b
Compare
…g different from string
…more complex cases
e6a94db
to
cf099e5
Compare
@@ -92,6 +92,7 @@ | |||
* Kafka source has "offset reset strategy" parameter that controls starting point for reading events. | |||
* Configuration entry `kafkaEspProperties.forceLatestRead` is replaced with `kafkaEspProperties.defaultOffsetResetStrategy` | |||
* [#7545](https://github.com/TouK/nussknacker/pull/7545) Added `useMiniClusterForDeployment` option allowing to run Flink scenarios on Flink MiniCluster | |||
* [#7553](https://github.com/TouK/nussknacker/pull/7553) Key variable created in window component doesn't have to be string |
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.
Let's write what it is now, and add a little note to the migration guide.
@@ -46,7 +46,7 @@ export function useGroupByParamsSerializer(): [(text: string) => string[], (para | |||
|
|||
switch (paramName) { | |||
case "groupBy": | |||
return `{ ${content} }.toString`; | |||
return `${content}`; |
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.
IMO we should wrap keys in list if there is more than one key (now the widget works odd if we put multiple key)
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.
ctx.withVariable(VariableConstants.KeyVariableName, key) | ||
|
||
def contextTransformation(ctx: ValidationContext)( | ||
implicit nodeId: NodeId | ||
): ValidatedNel[ProcessCompilationError, ValidationContext] = | ||
ctx.withVariableOverriden(VariableConstants.KeyVariableName, Typed[String], None) | ||
ctx.withVariableOverriden(VariableConstants.KeyVariableName, Unknown, None) |
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.
Shouldn't we type the key
output variable according to type put in groupBy
parameter? e.g. String
or List[String]
.
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.
Describe your changes
key
variable was created in window components by taking values fromgroupBy
and parsing them to a list in string. Now it will be passed as a value which was provided, eg.For old scenarios users would need to go into aggregation components and edit
groupBy
field for it to take effect. Otherwise it will still createkey
variable as stringChecklist before merge