Skip to content

[core] Reject all-dedicated data-evolution schemas at validation - #10219

Open
LuciferYang wants to merge 2 commits into
apache:masterfrom
LuciferYang:m/core-040-rowtracking-assign
Open

LuciferYang wants to merge 2 commits into
apache:masterfrom
LuciferYang:m/core-040-rowtracking-assign

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

Purpose

A row-tracking data-evolution table that mixes a BLOB column and a VECTOR column with no other columns passed schema validation. The BLOB and VECTOR checks each required "other normal columns" but only counted their own dedicated kind, so each treated the other's column as normal and both passed. Such a table has no normal-file column to anchor first-row-id assignment, and every commit then fails with "This is a bug, blobStart ... should be less than start".

This adds a combined check: once any dedicated (BLOB or VECTOR) column exists, at least one column must be stored in neither dedicated kind, rejecting the schema up front instead of at commit time.

Tests

Added SchemaValidationTest.testAllDedicatedColumnsSchemaValidation, which pins that a data-evolution schema with only a BLOB and a VECTOR column is rejected at validation with "Table with BLOB or VECTOR type column must have other normal columns."

API and Format

No.

Documentation

No.

The BLOB and VECTOR column checks each required "other normal columns"
but only counted their own dedicated kind, so a table mixing BLOB and
VECTOR columns — no normal column at all — passed validation. The write
path then has no normal anchor file to assign first row ids from, and
every commit fails with "This is a bug, blobStart ... should be less
than start".

Add a combined check: when any dedicated column exists, at least one
column must be stored in neither dedicated kind.

Assisted-by: GLM-5.3
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