kz930 commented on code in PR #8346:
URL: https://github.com/apache/texera/pull/8346#discussion_r4088048583


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/polarChart/PolarChartOpDesc.scala:
##########
@@ -125,4 +129,34 @@ class PolarChartOpDesc extends PythonOperatorDescriptor {
        |"""
     finalCode.encode
   }
+
+  override def producesDataFrame(): Boolean = false
+
+  override def generateStandaloneCode(): String = {
+    val rLit = pyStringLiteral(r)
+    val thetaLit = pyStringLiteral(theta)
+    s"""import numpy as np
+       |
+       |if in1df is None or in1df.empty:
+       |    with open(outputHtml, "w", encoding="utf-8") as output:
+       |        output.write('<h3>No data available for Polar Chart</h3>')
+       |elif $rLit not in in1df.columns or $thetaLit not in in1df.columns:
+       |    with open(outputHtml, "w", encoding="utf-8") as output:
+       |        output.write('<h3>Selected columns not found in input 
table</h3>')
+       |elif not np.issubdtype(in1df[$rLit].dtype, np.number) or not 
np.issubdtype(in1df[$thetaLit].dtype, np.number):

Review Comment:
   Fixed in d0e4378d4: the check now uses pandas' `is_numeric_dtype` minus 
booleans, and the spec runs your Int64 frame alongside a plain-int control.



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