LadyForest commented on code in PR #23752:
URL: https://github.com/apache/flink/pull/23752#discussion_r1445602009
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalJoin.scala:
##########
@@ -116,13 +123,27 @@ class StreamPhysicalJoin(
}
override def translateToExecNode(): ExecNode[_] = {
+ val stateTtlFromHint = new util.HashMap[JInt, JLong]
+ getHints
+ .filter(hint => StateTtlHint.isStateTtlHint(hint.hintName))
+ .forEach {
+ hint =>
+ hint.kvOptions.forEach(
+ (input, ttl) =>
+ stateTtlFromHint
+ .put(
+ if (input == FlinkHints.LEFT_INPUT) 0 else 1,
Review Comment:
> In the explain syntax, if the user uses "1d" in the state ttl hint, I
think it is easier to understand by displaying "1d" than by displaying
"86400000 ms".
The key lies in whether the explained digest requires a normalized format of
everything. If there's no explicit constraint, I'm ok with leaving it unchanged.
> The redundancy of the code is only about the
"TimeUtils.parseDuration(ttl).toMillis" section, which I think is tolerable.
Otherwise, based on the first consideration, we will add
"TimeUtils.parseDuration(ttl)" to explain, which will also cause some
redundancy.
Actually, I was suggesting adding a normalizer, like
`CapitalizeQueryHintsShutle`, instead of formatting it in the `RelWriterImpl`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]