aglinxinyuan opened a new pull request, #9515: URL: https://github.com/apache/texera/pull/9515
### What changes were proposed in this PR? Simplifies transient collection allocations, repeated traversals, and redundant metadata/regex builds across `common/workflow-core` and `common/workflow-operator` (**+335/-231** production lines; **+521/-231** total including characterization tests), with no change to observable behavior, serialized UIDs (`Schema`, `MachineLearningScorerOpDesc`), or generated code: - **Tuple & Arrow conversion:** Streams lowercase name checks through a shared `lowerCaseAttributeNames` helper in `Schema`, avoids intermediate sequence/map allocations in `Tuple`, `Tuple.Builder`, and `SeqTupleLike.enforceSchema`, and populates Arrow field arrays and schemas without extra temporary collections in `ArrowUtils`. - **UI UDF parameter injection:** Validates and binds UI parameter resources in single passes (`UiUdfParameterContract`, `UdfUiParameterSupport`), replaces incremental `String.patch` edits and duplicate AST field scans in `JavaUdfUiParameterInjector`, avoids line splitting and pre-compiles the reserved hook regex in `PythonUdfUiParameterInjector`, and formats sorted manifest entries via `HexFormat` and a shared `formatEntries` helper in `RUdfUiParameterInjector`. - **Text & ML scorer operators:** Hoists dictionary stop-word sets and skips unused literal rendering in conjunction mode (`DictionaryMatcherOpDesc`, `DictionaryMatcherOpExec`), removes intermediate wrappers in `CaseSensitiveAnalyzer`, `KeywordSearchOpDesc`, and `KeywordSearchOpExec`, avoids leading regex flag list allocations in `RegexOpDesc`, and streamlines column validation and metric schema building in `MachineLearningScorerOpDesc`. ### Any related issues, documentation, discussions? Closes #9514. ### How was this PR tested? Added characterization tests across 10 zero-overlap unit suites first (`a347f3d946`), then applied the cleanups and helper extractions (`eeb039181d`). On final `HEAD` (`eeb039181d`): ```bash sbt "WorkflowCore/scalafix --check" "WorkflowCore/Test/scalafix --check" "WorkflowOperator/scalafix --check" "WorkflowOperator/Test/scalafix --check" "WorkflowCore/scalafmtCheck" "WorkflowCore/Test/scalafmtCheck" "WorkflowOperator/scalafmtCheck" "WorkflowOperator/Test/scalafmtCheck" STORAGE_ICEBERG_CATALOG_TYPE=hadoop sbt "WorkflowCore/testOnly * -- -l org.apache.texera.common.tags.NonParallelTest" UDF_PYTHON_PATH="<python3.12>" sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.dictionary.* org.apache.texera.amber.operator.keywordSearch.* org.apache.texera.amber.operator.machineLearning.Scorer.* org.apache.texera.amber.operator.regex.* org.apache.texera.amber.operator.udf.*" STORAGE_ICEBERG_CATALOG_TYPE=hadoop sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.sendsemantics.partitioners.PartitionersSpec org.apache.texera.amber.engine.common.storage.EmptyRecordStorageSpec org.apache.texera.amber.engine.common.storage.SequentialRecordStorageSpec org.apache.texera.amber.engine.common.storage.VFSRecordStorageSpec" ``` - Format & Scalafix checks: all 4 `scalafix --check` and 4 `scalafmtCheck` targets passed. - `WorkflowCore` non-Docker suites (`-l org.apache.texera.common.tags.NonParallelTest`): 54 suites completed, 710 succeeded, 0 failed, 1 pre-existing pending (Docker daemon unavailable locally for Testcontainers S3/LakeFS suites). - `WorkflowOperator` affected packages: 26 suites completed, 380 succeeded, 0 failed (including live Python 3.12 pandas/sklearn scoring and regex checks). - `WorkflowExecutionService` downstream tuple/storage suites: 4 suites completed, 40 succeeded, 0 failed. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Antigravity IDE (Gemini 3.8 Flash) -- 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]
