You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by gi...@apache.org on 2026/07/27 20:10:46 UTC

(texera) branch gh-readonly-queue/main/pr-6804-49f9e2c414b116bf328bdb9154cc97dc4d1e7e9e created (now 305cf286d9)

This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a change to branch gh-readonly-queue/main/pr-6804-49f9e2c414b116bf328bdb9154cc97dc4d1e7e9e
in repository https://gitbox.apache.org/repos/asf/texera.git


      at 305cf286d9 chore(operators): Add proper descriptions to text source fields (#6804)

This branch includes the following new commits:

     new 305cf286d9 chore(operators): Add proper descriptions to text source fields (#6804)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(texera) 01/01: chore(operators): Add proper descriptions to text source fields (#6804)

Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-6804-49f9e2c414b116bf328bdb9154cc97dc4d1e7e9e
in repository https://gitbox.apache.org/repos/asf/texera.git

commit 305cf286d93476813cb68c0e98f52d7561bcec7a
Author: Neil Ketteringham <53...@users.noreply.github.com>
AuthorDate: Mon Jul 27 13:10:24 2026 -0700

    chore(operators): Add proper descriptions to text source fields (#6804)
    
    ### What changes were proposed in this PR?
    Added descriptions to fields in `TextSourceOpDesc` and
    `TextInputSourceOpDesc`. Currently these operators suffer heavily from a
    lack of information.
    
    <img width="344" height="543" alt="image"
    src="https://github.com/user-attachments/assets/fbd4d184-db2f-4b32-81de-32f094ded0b3"
    />
    
    ### Any related issues, documentation, discussions?
    Closes #6802. Related idea in #6798
    
    ### How was this PR tested?
    Deployed changes locally via docker and `./bin/local-dev.sh up`
    
    ### Was this PR authored or co-authored using generative AI tooling?
    No.
    
    ---------
    
    Signed-off-by: Neil Ketteringham <53...@users.noreply.github.com>
    Co-authored-by: Copilot Autofix powered by AI <17...@users.noreply.github.com>
---
 .../source/scan/text/TextInputSourceOpDesc.scala       |  3 ++-
 .../operator/source/scan/text/TextSourceOpDesc.scala   | 18 +++++++++++++++---
 .../operator-property-edit-frame.component.scss        |  7 +++++++
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDesc.scala b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDesc.scala
index cfb14940f4..50de683f70 100644
--- a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDesc.scala
+++ b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDesc.scala
@@ -19,7 +19,7 @@
 
 package org.apache.texera.amber.operator.source.scan.text
 
-import com.fasterxml.jackson.annotation.JsonProperty
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
 import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
 import org.apache.texera.amber.core.executor.OpExecWithClassName
 import org.apache.texera.amber.core.tuple.Schema
@@ -34,6 +34,7 @@ class TextInputSourceOpDesc extends SourceOperatorDescriptor with TextSourceOpDe
   @JsonProperty(required = true)
   @JsonSchemaTitle("Text")
   @JsonSchemaInject(json = UIWidget.UIWidgetTextArea)
+  @JsonPropertyDescription("Enter the input text. By default, each line becomes one tuple.")
   var textInput: String = _
 
   override def getPhysicalOp(
diff --git a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextSourceOpDesc.scala b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextSourceOpDesc.scala
index afa4a3604c..07a773580f 100644
--- a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextSourceOpDesc.scala
+++ b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/source/scan/text/TextSourceOpDesc.scala
@@ -19,7 +19,7 @@
 
 package org.apache.texera.amber.operator.source.scan.text
 
-import com.fasterxml.jackson.annotation.JsonProperty
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize
 import com.kjetland.jackson.jsonSchema.annotations.{
   JsonSchemaInject,
@@ -37,6 +37,10 @@ import org.apache.texera.amber.operator.source.scan.FileAttributeType
 trait TextSourceOpDesc {
   @JsonProperty(defaultValue = "string", required = true)
   @JsonSchemaTitle("Attribute Type")
+  @JsonPropertyDescription(
+    "The output field type. Each line becomes a separate tuple, except for " +
+      "'single string' / 'binary' / 'large binary', where the entire text becomes one tuple."
+  )
   var attributeType: FileAttributeType = FileAttributeType.STRING
 
   @JsonProperty(defaultValue = "line", required = true)
@@ -44,8 +48,12 @@ trait TextSourceOpDesc {
   @JsonDeserialize(contentAs = classOf[java.lang.String])
   var attributeName: String = "line"
 
-  @JsonSchemaTitle("Limit")
+  @JsonSchemaTitle("Limit (lines)")
   @JsonDeserialize(contentAs = classOf[Int])
+  @JsonPropertyDescription(
+    "Maximum number of lines to output. Leave empty to read all lines. " +
+      "(Ignored when reading the whole file as one tuple.)"
+  )
   @JsonSchemaInject(
     strings = Array(
       new JsonSchemaString(path = HideAnnotation.hideTarget, value = "attributeType"),
@@ -58,7 +66,11 @@ trait TextSourceOpDesc {
   )
   var fileScanLimit: Option[Int] = None
 
-  @JsonSchemaTitle("Offset")
+  @JsonSchemaTitle("Offset (lines)")
+  @JsonPropertyDescription(
+    "Number of lines to skip from the start before reading. " +
+      "(Ignored when reading the whole file as one tuple.)"
+  )
   @JsonDeserialize(contentAs = classOf[Int])
   @JsonSchemaInject(
     strings = Array(
diff --git a/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.scss b/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.scss
index 0c65243884..740ac59204 100644
--- a/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.scss
+++ b/frontend/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.scss
@@ -60,6 +60,13 @@
     nz-input-number {
       width: 100%;
     }
+    // preserve newlines (\n) in property descriptions rendered via nzExtra,
+    // and give them breathing room from the input above
+    .ant-form-item-extra {
+      white-space: pre-line;
+      margin-top: 6px;
+      line-height: 1.4;
+    }
   }
 }