Nicoleee1108 commented on code in PR #4398:
URL: https://github.com/apache/texera/pull/4398#discussion_r3106366320


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/carpetPlot/CarpetPlotOpDesc.scala:
##########
@@ -0,0 +1,104 @@
+package org.apache.texera.amber.operator.visualization.carpetPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaTitle
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import 
org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import 
org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, 
OperatorInfo}
+
+class CarpetPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "a", required = true)
+  @JsonSchemaTitle("First Parameter Axis Column")
+  @JsonPropertyDescription("Column representing the first parameter axis (a)")
+  @AutofillAttributeName
+  var a: EncodableString = ""
+
+  @JsonProperty(value = "b", required = true)
+  @JsonSchemaTitle("Second Parameter Axis Column")
+  @JsonPropertyDescription("Column representing the second parameter axis (b)")
+  @AutofillAttributeName
+  var b: EncodableString = ""
+
+  @JsonProperty(value = "y", required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Column representing the value at each (a, b) 
coordinate")
+  @AutofillAttributeName
+  var y: EncodableString = ""
+
+  override def getOutputSchemas(
+                                 inputSchemas: Map[PortIdentity, Schema]
+                               ): Map[PortIdentity, Schema] = {
+    val outputSchema = Schema()
+      .add("html-content", AttributeType.STRING)
+    Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  override def operatorInfo: OperatorInfo =
+    OperatorInfo(

Review Comment:
   Adjusted



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