The GitHub Actions job "Required Checks" on texera.git/main has failed.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
b7993fbafac472d0ef1b87d86169978c42343ac4 / Suryaa Charan 
<[email protected]>
feat: add a delimiter picker with regex validation (#8644)

### What changes were proposed in this PR?

Delimiter properties were plain text boxes. A stored tab looked empty,
typing `\t` stopped at the backslash, and Unnest String accepted invalid
or degenerate regexes without a word. This replaces them with a
**delimiter picker**: common delimiters by name, plus a **Custom…**
entry. Each operator picks a mode through a schema hint
(`@JsonSchemaInject(json = UIWidget.UIWidgetCharDelimiter /
UIWidgetRegexDelimiter)`).

```
CSV scans (char)      Comma  Tab  Semicolon  Pipe  Space          | Custom…     
  (1 char; typed \t -> tab)
Unnest String (regex) Comma  Tab  Semicolon  Pipe (\|)  Whitespace (\s+)  New 
line | Custom regex… (validated)
```

| Area | Change |
|---|---|
| Frontend | New formly type `delimiter`
(`frontend/src/app/common/formly/delimiter/`). Works in the canvas
property panel and the Form View. Delimiter errors show immediately,
including for invalid values loaded from a saved workflow. |
| Regex check (browser) | Must compile, must not match the empty string
(`\|`, `\s*`), must not match every character (`.`). The last is
**exact**: it tests every BMP character other than line breaks, stopping
at the first miss, so `[a0-]` or `[^,]` pass. Patterns using Java-only
syntax (inline flags, possessive quantifiers, `\p{..}`, `\x{..}`,
`\Q..\E`, `\e`, `\h`, `\z`, …) are left to the backend, because
JavaScript can't parse them or reads them differently. |
| Regex check (backend) | `UnnestStringOpDesc` makes the same checks
with Java's engine during schema propagation, so a bad pattern is a
**compile error** instead of a runtime `PatternSyntaxException` or an
empty result. |
| CSV scans | `CSVFileScan`, `ParallelCSVFileScan`, `CSVOldFileScan` use
the char-mode widget. `maxLength: 1` is kept. |

**Saved workflows:** the stored value is still the delimiter itself, so
existing workflows load unchanged and a stored tab shows as "Tab".

**One intentional behavior change:** a saved Unnest String delimiter
that matches the empty string or every character (e.g. `|`, `.`) now
fails to compile. Previously it ran and silently split every character
apart, or output only line breaks.

#### Before / after

<!-- drag comparison/C1-csv-stored-tab.png here -->
<!-- drag comparison/C2-csv-typing-tab.png here -->
<!-- drag comparison/C3-csv-choices.png here -->
<!-- drag comparison/C4-csv-legacy-value.png here -->
<!-- drag comparison/C5-unnest-choices.png here -->
<!-- drag comparison/C6-unnest-pipe.png here -->
<!-- drag comparison/C7-unnest-dot.png here -->
<!-- drag comparison/C8-unnest-invalid.png here -->
<!-- drag comparison/C9-unnest-compile.png here -->
<img width="1124" height="425" alt="C1-csv-stored-tab"
src="https://github.com/user-attachments/assets/ab9ba44d-9598-4675-be5f-89f08325a576";
/>
<img width="1124" height="425" alt="C2-csv-typing-tab"
src="https://github.com/user-attachments/assets/29aac797-7da7-4b52-a300-cd64e22c3810";
/>
<img width="1124" height="1030" alt="C3-csv-choices"
src="https://github.com/user-attachments/assets/61fb0b71-3588-476c-9003-64cd2f0b9996";
/>
<img width="1124" height="574" alt="C4-csv-legacy-value"
src="https://github.com/user-attachments/assets/098d5824-22a1-4e9f-b96c-5c42ed750fe5";
/>
<img width="1124" height="1018" alt="C5-unnest-choices"
src="https://github.com/user-attachments/assets/babde8bb-faf3-4e0a-b46b-04da73496cdd";
/>
<img width="1124" height="607" alt="C6-unnest-pipe"
src="https://github.com/user-attachments/assets/1d7bf753-a114-40b4-bdec-62676530a443";
/>
<img width="1124" height="651" alt="C7-unnest-dot"
src="https://github.com/user-attachments/assets/e6157de3-5ff1-4eb1-80df-de1d9dd12da9";
/>
<img width="1124" height="562" alt="C8-unnest-invalid"
src="https://github.com/user-attachments/assets/d370d8af-86a4-4aaf-ae75-f1a722af5335";
/>
<img width="1884" height="750" alt="C9-unnest-compile"
src="https://github.com/user-attachments/assets/7de580fc-927a-4bdf-a5ba-43298c8fd48d";
/>



### Any related issues, documentation, discussions?

Closes #8638

### How was this PR tested?

**Automated.** Tests were written first and seen failing, then made to
pass.

| Suite | Result |
|---|---|
| Frontend, full (`ng test`) | 232 files, 6,376 passed |
| Delimiter / formly specs (included above) | presets for both modes,
custom-regex validation (valid, invalid, empty-match, every-character,
Java-only syntax), edge cases, and a rendered test that feeds the
backend's exact schema through formly-jsonschema |
| `WorkflowOperator/test`, full | 2,602 passed |
| New backend specs | each CSV preset read by all three CSV readers;
Unnest String split with every regex preset and custom patterns;
compile-time rejection with Java semantics |
| Lint / format / types / build | eslint, prettier-eslint, `tsc`, `ng
build`, scalafmt: clean |

**Manual, in the browser.** Local stack (`bin/local-dev.sh up`), Chrome
driven by Playwright, 1600×1000:
1. Open a workflow with CSV File Scan and Unnest String, click each
operator, and open the Delimiter picker.
2. Pick each preset; choose Custom… and type `#`, `\t`, `ab`.
3. For Unnest String, choose Custom regex… and type `[,;]\s*`, `(`,
`[a-`, `a{2,1}`, `|`, `\s*`, `.`, `\.`, `,++`, then clear the field.
4. Type `(?i)(` and `(?s).`: the browser leaves them to the backend, and
the Result Panel shows the compile error.

All 33 scripted checks pass. The before/after screenshots above come
from this run and from the same flow on the base commit.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: suryaacharan <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/37083137770

With regards,
GitHub Actions via GitBox

Reply via email to