Re: [PR] feat: add a new radar chart operator [texera]

2026-03-04 Thread via GitHub


chenlica merged PR #4248:
URL: https://github.com/apache/texera/pull/4248


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-03-04 Thread via GitHub


Ma77Ball commented on PR #4248:
URL: https://github.com/apache/texera/pull/4248#issuecomment-4001213556

   As a follow-up on this pr #4217, where the changes were suggested. This pr 
LGTM! @chenlica, please review and merge. 


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-27 Thread via GitHub


chenlica commented on PR #4248:
URL: https://github.com/apache/texera/pull/4248#issuecomment-3976624676

   @Ma77Ball Please review it first.
   


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-27 Thread via GitHub


PG1204 commented on PR #4248:
URL: https://github.com/apache/texera/pull/4248#issuecomment-3976499046

   @Ma77Ball & @chenlica , requesting your review


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



[PR] feat: add a new radar chart operator [texera]

2026-02-27 Thread via GitHub


PG1204 opened a new pull request, #4248:
URL: https://github.com/apache/texera/pull/4248

   ### What changes were proposed in this PR?
   https://github.com/user-attachments/assets/68f1c752-37fc-4b77-9417-c25dd72afa43";
 />
   
   
   ### Any related issues, documentation, discussions?
   
   
   
   ### How was this PR tested?
   
   
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-25 Thread via GitHub


Ma77Ball commented on PR #4217:
URL: https://github.com/apache/texera/pull/4217#issuecomment-3958135887

   @PG1204, did you intend to delete the changes from your main (and, 
subsequently, this PR)? 


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-24 Thread via GitHub


PG1204 closed pull request #4217: feat: add a new radar chart operator
URL: https://github.com/apache/texera/pull/4217


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-24 Thread via GitHub


PG1204 commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2851209932


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,196 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+  private def validateConfig(): Unit = {
+require(nameColumn != null && nameColumn.nonEmpty, "nameColumn must be 
specified and non-empty")
+require(
+  valueColumns != null && valueColumns.nonEmpty,
+  "valueColumns must be specified and non-empty"
+)
+require(!valueColumns.contains(nameColumn), "nameColumn must not be 
included in valueColumns")
+require(
+  valueColumns.distinct.size == valueColumns.size,
+  "valueColumns must not contain duplicates"
+)
+  }
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = "entity_name"

Review Comment:
   Is EncodableString defined anywhere in the project so I can import it?



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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-24 Thread via GitHub


Ma77Ball commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2848873534


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,196 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+  private def validateConfig(): Unit = {
+require(nameColumn != null && nameColumn.nonEmpty, "nameColumn must be 
specified and non-empty")
+require(
+  valueColumns != null && valueColumns.nonEmpty,
+  "valueColumns must be specified and non-empty"
+)
+require(!valueColumns.contains(nameColumn), "nameColumn must not be 
included in valueColumns")
+require(
+  valueColumns.distinct.size == valueColumns.size,
+  "valueColumns must not contain duplicates"
+)
+  }
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = "entity_name"

Review Comment:
   Please use the new format for var string (e.g., `@AutofillAttributeName var 
: EncodableString = ""`)



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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-18 Thread via GitHub


PG1204 commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2825443443


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   Yeah understood, I'll be match my main with the upstream texera repo and 
then update my changes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
U

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-18 Thread via GitHub


PG1204 commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2825443443


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   Yeah understood, I'll be match my main with the upstream texera repo



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

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-18 Thread via GitHub


Ma77Ball commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2825371262


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   I might also recommend, since not many files were changed, that you make 
your main match the upstream Apache/Texera repo and create a fork of the 
original repo with your changes. I'm not sure why your files are different. 

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-18 Thread via GitHub


Ma77Ball commented on PR #4217:
URL: https://github.com/apache/texera/pull/4217#issuecomment-3924204843

   In the future, please respond to the comments and mention a little of what 
you did to address the issue after you can hit resolve comment at the bottom of 
each. This action helps with the review process.


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-18 Thread via GitHub


Ma77Ball commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2825258383


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   I recommend pulling and merging the upstream main repo into your repo. After 
checking the diff between your repo and the Texera main repo to see whether 
those changes are already present, or if a separate PR needs to be ra

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-17 Thread via GitHub


PG1204 commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2818806128


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   Or should I just push my changes alone for now and leave the 'sbt 
scalafixAll' changes to my local?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use t

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-17 Thread via GitHub


Ma77Ball commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2815714281


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   The changes should be specific to your local environment unless introduced 
from a previous pr. I recommend pushing the changes along with sbt scalafmtAll 
for review. (Although I'm not sure why yours would be different from

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-17 Thread via GitHub


Ma77Ball commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2811233458


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5

Review Comment:
   Make the default value show on the frontend. Also, it would be better to use 
0.1 increments for opacity instead of 1. 



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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-16 Thread via GitHub


PG1204 commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2815276725


##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']
+   |for col in value_cols:
+   |table[col] = pd.to_numeric(table[col], errors='coerce')
+   |table.dropna(subset=value_cols, inplace=True)
+   |""".stripMargin
+  }
+
+  def createPlotlyFigure(): String = {
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |# Create radar chart
+   |fig = go.Figure()
+   |categories = ['$valueColsList']

Review Comment:
   I have made all the mentioned changes. when I ran 'sbt scalafixAll', a few 
scala files (not related to my radar chart) were changed - are these changes 
specific to my local environment or should I push these changes as well?

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-16 Thread via GitHub


Ma77Ball commented on code in PR #4217:
URL: https://github.com/apache/texera/pull/4217#discussion_r2811167522


##
frontend/src/assets/operator_images/RadarChart.png:
##


Review Comment:
   Please change this image to be a valid png with no background. 



##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * 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.radarChart // namespace 
for operator
+
+// Jackson annotations - for JSON serialization (form fields → JSON → backend)
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, 
JsonSchemaTitle}
+
+// Core Texera types
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema} // for 
defining output schema
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode // for 
SINGLE_SNAPSHOT mode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, 
PortIdentity} // ports
+
+// Base class and metadata
+import org.apache.texera.amber.operator.PythonOperatorDescriptor // base class 
extend
+import org.apache.texera.amber.operator.metadata.annotations.{
+  AutofillAttributeName,
+  AutofillAttributeNameList
+} // auto-fills column names in UI
+import org.apache.texera.amber.operator.metadata.{
+  OperatorGroupConstants,
+  OperatorInfo
+} // for operator metadata
+
+import javax.validation.constraints.NotNull
+
+// type constraint: value can only be numeric
+@JsonSchemaInject(json = """
+{
+  "attributeTypeRules": {
+"valueColumns": {
+  "enum": ["integer", "long", "double"]
+}
+  }
+}
+""")
+class RadarChartOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(value = "nameColumn", required = true)
+  @JsonSchemaTitle("Name Column")
+  @JsonPropertyDescription("Column containing entity names for each radar")
+  @AutofillAttributeName
+  @NotNull(message = "Name column cannot be empty")
+  var nameColumn: String = ""
+
+  @JsonProperty(value = "valueColumns", required = true)
+  @JsonSchemaTitle("Value Columns")
+  @JsonPropertyDescription("Columns containing numeric values for radar chart 
axes")
+  @AutofillAttributeNameList
+  var valueColumns: List[String] = List()
+
+  @JsonProperty(value = "fillOpacity", required = true)
+  @JsonSchemaTitle("Fill Opacity")
+  @JsonPropertyDescription(
+"Opacity value for radar chart fill from 0.0 (transparent) to 1.0 (opaque)"
+  )
+  @JsonSchemaInject(json = """{ "minimum": 0.0, "maximum": 1.0 }""")
+  var fillOpacity: Double = 0.5
+
+  override def operatorInfo: OperatorInfo =
+OperatorInfo(
+  "Radar Chart",
+  "Visualize data in a Radar Chart",
+  OperatorGroupConstants.VISUALIZATION_SCIENTIFIC_GROUP,
+  inputPorts = List(InputPort()),
+  outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+)
+
+  override def getOutputSchemas(
+  inputSchemas: Map[PortIdentity, Schema]
+  ): Map[PortIdentity, Schema] = {
+val outputSchema = Schema()
+  .add("html-content", AttributeType.STRING)
+Map(operatorInfo.outputPorts.head.id -> outputSchema)
+  }
+
+  def manipulateTable(): String = {
+assert(nameColumn.nonEmpty && valueColumns != null && 
!valueColumns.isEmpty)
+val valueColsList = valueColumns.mkString("', '")
+s"""
+   |required_cols = ['$nameColumn', '$valueColsList']
+   |table.dropna(subset=required_cols, inplace=True)
+   |# Ensure all value columns are numeric
+   |value_cols = ['$valueColsList']

Review Comment:
   Causes an error when there is an apostrophe in the column name. I recommend 
substituting apostrophes in column names to \\' 
   
   https://github.com/user-attachments/assets/5751e685-7334-486b-bd8a-da0d5900d187";
 />



##
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/radarChart/RadarChartOpDesc.scala:
##
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See t

Re: [PR] feat: add a new radar chart operator [texera]

2026-02-15 Thread via GitHub


chenlica commented on PR #4217:
URL: https://github.com/apache/texera/pull/4217#issuecomment-3903695317

   @Ma77Ball Please review it first.


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



Re: [PR] feat: add a new radar chart operator [texera]

2026-02-14 Thread via GitHub


PG1204 commented on PR #4217:
URL: https://github.com/apache/texera/pull/4217#issuecomment-3903414690

   @Ma77Ball , @chenlica - requesting your review


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



[PR] feat: add a new radar chart operator [texera]

2026-02-14 Thread via GitHub


PG1204 opened a new pull request, #4217:
URL: https://github.com/apache/texera/pull/4217

   ### What changes were proposed in this PR?
   
   https://github.com/user-attachments/assets/1f3f6967-f830-4162-b7d8-cb1b0e936da3";
 />
   
   This change introduces a radar chart operator, which visualizes multivariate 
data by plotting multiple quantitative variables on axes that radiate from a 
central point.
   
   In a radar chart:
   
   - Each axis represents a distinct variable or feature.
   - Data points are plotted along each axis according to their value and 
connected to form a polygon.
   - Multiple observations can be overlaid for comparison.
   - The resulting shape and area provide intuitive insights into the 
strengths, weaknesses, and patterns across variables.
   - This visualization is especially useful for comparing feature profiles, 
identifying outliers, and understanding the distribution of values across 
several dimensions in a single, compact graphic.
   
   The operator takes as input a set of variables (features) for each 
observation and outputs a radar chart that enables easy visual comparison 
across all provided dimensions.
   
   
   ### Any related issues, documentation, discussions?
   
   No related issues, documentation, discussions have been linked to this 
feature at this time.
   
   
   ### How was this PR tested?
   
   A dedicated test file 
([TestRadarChart.scala](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html))
 was created to thoroughly test the radar chart operator, covering both typical 
and edge cases. The tests verify correct rendering and data handling for 
various input scenarios. In addition, all existing test cases were run using 
sbt test to ensure no regressions were introduced. Manual testing was also 
performed in the Texera UI to visually confirm the radar chart output.
   
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   This PR was co-authored by Perplexity AI.
   


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