Iceberg processor writes 0 into a required column when the record has no value for it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- data-engineering
Research direction
Start with appendColumnValues in internal/sink/iceberg.go, where the issue says missing or unparsable values are appended as null without checking Required. Trace how the Iceberg writer handles nulls for required fields and find the related tests. Done means a record missing a required value is rejected or reported instead of appearing as a normal row with 0, with behavior covered by a test.
Written by the indexing model from the issue text.
Description
The Iceberg processor writes records that have no value for a required: true column. The column is NOT NULL in the table, so the missing value lands as 0 instead of the record being rejected or reported.
Steps
-
Map a topic with a required column, for example:
mappings: - topic: orders table: kafscale.orders mode: append create_table_if_missing: true schema: columns: - {name: order_id, type: long, required: true} - {name: status, type: string} -
Produce one record that is not JSON (value
hello) and some valid JSON records such as{"order_id":1,"status":"paid"}. -
Query the table.
Expected
The record without order_id is not written as a normal row (skipped and counted, or the batch fails), or the docs say what happens.
Actual
KafScale v2.2.0 (fc9ed22), schema mode off:
record_id order_id status value
orders:3:0 0 NULL r2
orders:1:0 0 NULL hello
DESCRIBE shows order_id bigint not null. appendColumnValues in internal/sink/iceberg.go calls appendNull() for a missing or unparsable value without checking Required, and the writer turns the null into 0 for the required field. Readers cannot tell a missing order_id from a real 0.
- Dominant language
- Go
- Stars
- 59
- Forks
- 16
- Avg merge
- 5h 46m
- Merged PRs (30d)
- 121
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from KafScale/platform
-
Iceberg processor: S3 discovery still lists every segment and rereads every footer on each pollOpen
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
All issues in KafScale/platform
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opensandbox-group/OpenSandbox#3278 ·
Maintainers usually reply within 1 day
-
type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightgauge/nightgauge#3819 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jasonfen/terminal-space-program#1075 ·
Maintainers usually reply within 1 day
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100