kunwp1 commented on code in PR #9419:
URL: https://github.com/apache/texera/pull/9419#discussion_r4580424746


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/PythonCodeFragment.scala:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization
+
+private[visualization] object PythonCodeFragment {
+  def render(code: String, indent: Int, keepLine: String => Boolean): String =

Review Comment:
   The `keepLine` filters only drop comment lines (RadarPlot 1, TreePlot 6) and 
blank lines (GaugeChart 5) from the exported script so it stays byte-identical, 
and NestedTable passes `_ => true`, so its `runtime` flag is dead. Since the 
point is one shared body, letting the export carry the same comments would drop 
`keepLine` and the four `runtime` flags. If byte-identical output is a hard 
rule for this PR, NestedTable's flag can still go.



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/StandaloneChartCode.scala:
##########
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization
+
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.pyStringLiteral
+
+private[visualization] object StandaloneChartCode {
+  def standaloneError(title: String, plural: Boolean = false, typed: Boolean = 
false): String =

Review Comment:
   A few exact copies of what these helpers produce are left: WordCloud still 
writes its constant "does not hold text" error page by hand next to the two it 
converts, and HierarchyChart and IcicleChart (outside this PR) carry the same 
`render_error` and save blocks.



-- 
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]

Reply via email to