gracecluvohio commented on code in PR #4406:
URL: https://github.com/apache/texera/pull/4406#discussion_r3104568539


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * 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.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+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}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import 
org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = 
"""{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical 
cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")

Review Comment:
   Could we add a space: "Separate By Column"? It would look better on the UI 
in my opinion.



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * 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.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+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}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import 
org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = 
"""{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical 
cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into 
facets.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or 
cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": 
"probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription("Standard, reversed, or complementary ECDF mode.")

Review Comment:
   It'd be nice to specify what each mode means for UX. 



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * 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.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+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}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import 
org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = 
"""{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical 
cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into 
facets.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or 
cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": 
"probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription("Standard, reversed, or complementary ECDF mode.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": 
"standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": 
"vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Whether to display sample markers on the ECDF 
trace.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "true")
+  @JsonSchemaTitle("Show Lines")
+  @JsonPropertyDescription("Whether to display connecting ECDF lines.")

Review Comment:
   May be good to add a note that it is forced to show lines if "Show Markers" 
is unchecked.
   
   Also maybe simplify the description to "whether to draw lines between 
markers". 



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * 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.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+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}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import 
org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = 
"""{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical 
cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into 
facets.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or 
cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": 
"probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription("Standard, reversed, or complementary ECDF mode.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": 
"standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": 
"vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Whether to display sample markers on the ECDF 
trace.")

Review Comment:
   I think "ECDF trace" is a bit technical; "line" or "plot" would be better in 
my opinion. 



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * 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.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+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}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import 
org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = 
"""{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical 
cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into 
facets.")

Review Comment:
   "Facets" seems a bit abstract; maybe "subplots" would be better?



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