aglinxinyuan commented on code in PR #4268:
URL: https://github.com/apache/texera/pull/4268#discussion_r3034663418


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/udf/python/source/PythonUDFSourceOpDescV2.scala:
##########
@@ -27,18 +27,20 @@ import 
org.apache.texera.amber.core.virtualidentity.{ExecutionIdentity, Workflow
 import org.apache.texera.amber.core.workflow.{OutputPort, PhysicalOp, 
SchemaPropagationFunc}
 import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, 
OperatorInfo}
 import org.apache.texera.amber.operator.source.SourceOperatorDescriptor
+import 
org.apache.texera.amber.operator.udf.python.{PythonUdfUiParameterInjector, 
UiUDFParameter}
 
 class PythonUDFSourceOpDescV2 extends SourceOperatorDescriptor {
 
   @JsonProperty(
     required = true,
-    defaultValue = "# from pytexera import *\n" +
-      "# class GenerateOperator(UDFSourceOperator):\n" +
-      "# \n" +
-      "#     @overrides\n" +
-      "#     \n" +
-      "#     def produce(self) -> Iterator[Union[TupleLike, TableLike, 
None]]:\n" +
-      "#         yield\n"
+    defaultValue =

Review Comment:
   avoid unnecessary change.



##########
frontend/src/app/workspace/component/menu/coeditor-user-icon/coeditor-user-icon.component.css:
##########
@@ -16,4 +16,3 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-

Review Comment:
   avoid unnecessary change.



##########
frontend/src/app/workspace/types/workflow-compiling.interface.ts:
##########
@@ -70,8 +70,50 @@ export type CompilationStateInfo = Readonly<
       operatorErrors: Readonly<Record<string, WorkflowFatalError>>;
     }
 >;
+
 // possible types of an attribute
-export type AttributeType = "string" | "integer" | "double" | "boolean" | 
"long" | "timestamp" | "binary"; // schema: an array of attribute names and 
types
+// Canonical frontend / JSON schema names
+export type AttributeType =
+  | "string"
+  | "integer"
+  | "long"
+  | "double"
+  | "boolean"
+  | "timestamp"
+  | "binary"
+  | "large_binary";
+
+// Java enum constant names (AttributeType.java)
+export const JAVA_ATTRIBUTE_TYPE_NAMES = [
+  "STRING",
+  "INTEGER",
+  "LONG",
+  "DOUBLE",
+  "BOOLEAN",
+  "TIMESTAMP",
+  "BINARY",
+  "LARGE_BINARY",
+] as const;
+
+export type JavaAttributeTypeName = (typeof JAVA_ATTRIBUTE_TYPE_NAMES)[number];
+
+// Python enum constant names (core.models.AttributeType)
+export const PYTHON_ATTRIBUTE_TYPE_NAMES = [
+  "STRING",
+  "INT",
+  "LONG",
+  "DOUBLE",
+  "BOOL",
+  "TIMESTAMP",
+  "BINARY",
+  "LARGE_BINARY",
+] as const;
+
+export type PythonAttributeTypeName = (typeof 
PYTHON_ATTRIBUTE_TYPE_NAMES)[number];
+
+// Useful when parsing code from either side
+export type AttributeTypeToken = AttributeType | JavaAttributeTypeName | 
PythonAttributeTypeName;

Review Comment:
   Why do we need to define types manually in each language? Shouldn't they be 
converted automatically, or consider using the protobuf class?



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