Skip to content

[spark] Add _ROW_ID existing check before adding _ROW_ID#7601

Draft
XiaoHongbo-Hope wants to merge 5 commits into
apache:masterfrom
XiaoHongbo-Hope:spark_row_id_fix
Draft

[spark] Add _ROW_ID existing check before adding _ROW_ID#7601
XiaoHongbo-Hope wants to merge 5 commits into
apache:masterfrom
XiaoHongbo-Hope:spark_row_id_fix

Conversation

@XiaoHongbo-Hope
Copy link
Copy Markdown
Contributor

@XiaoHongbo-Hope XiaoHongbo-Hope commented Apr 7, 2026

Purpose

When a table has row-tracking.enabled=true, querying its $row_tracking system table (e.g., SELECT *
FROM table$row_tracking) throws:

IllegalArgumentException: Row tracking field name '_ROW_ID' conflicts with existing field names.

This PR fix duplicate _ROW_ID field addition in BaseScan.tableRowType when reading from tables whose rowType() already contains _ROW_ID (e.g., $row_tracking system table).

Tests

Covered by existing RowTrackingTest cases.

@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review May 14, 2026 15:59
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as draft May 14, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant