KurtYoung commented on a change in pull request #10452:
[FLINK-15035][table-planner-blink] Introduce unknown memory setting to table in
blink planner
URL: https://github.com/apache/flink/pull/10452#discussion_r355101044
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/exec/ExecNode.scala
##########
@@ -99,3 +103,57 @@ trait ExecNode[E <: Planner, T] {
}
}
}
+
+object ExecNode {
+
+ /**
+ * Set memoryBytes to Transformation.setManagedMemoryWeight.
+ */
+ def setManagedMemoryWeight[T](
+ transformation: Transformation[T],
+ memoryBytes: Long = 0): Transformation[T] = {
+ if (transformation.getManagedMemoryWeight !=
Transformation.DEFAULT_MANAGED_MEMORY_WEIGHT) {
+ throw new TableException("Managed memory weight has been set, this
should not happen.")
+ }
+
+ // Using Bytes can easily overflow
+ // Using KibiBytes to cast to int
Review comment:
KiloBytes
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services