apache / apache/texera

Optimized Python can mutate finalized tuples

Open
#8,219 1 comment 0 reactions 1 assignee Claimed by @carloea2 View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

### Feature Summary

Tuple finalization protects its immutable schema with an assert. Optimized Python removes that guard, so a finalized tuple can be finalized again under another schema and its stored values can mutate.

Before: finalize integer tuple as binary -> value changes into pickle bytes

After: finalize an already finalized tuple -> ValueError and original value remains

Reproduction evidence:

Run optimized Python, finalize a tuple under an INTEGER schema, then finalize the same tuple under a BINARY schema.

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

**Commit Hash**

70c21145887920528d7d5540e3fb790b43e8b759

**What browsers are you seeing the problem on?**

Not browser-specific.

**Relevant log output**

```text
optimized= True
before= 1 int
after= b'pickle ...' bytes
error_raised= False
```

### Proposed Solution or Design

After: finalize an already finalized tuple -> ValueError and original value remains

### Affected Area

Workflow Engine (Amber)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.