Problem
Transform::from_str currently accepts invalid parameterized transform strings. For example, bucket[0] and truncate[0] deserialize successfully even though applying those transforms can later panic due to modulo or division by zero. The parser also accepts malformed strings such as bucket10 and truncate10 because it strips the transform prefix and trims brackets loosely.
Expected behavior
Parameterized transform parsing should require exact Iceberg syntax and validate the parameter value:
- accept
bucket[N] and truncate[W] when the value is greater than zero
- reject zero values such as
bucket[0] and truncate[0]
- reject malformed syntax such as
bucket10, truncate10, or trailing characters after the closing bracket
Impact
Invalid table metadata or user-provided transform strings can be accepted and fail later during transform evaluation. Rejecting them during parsing gives callers a normal validation error instead of allowing a later runtime panic.
Problem
Transform::from_strcurrently accepts invalid parameterized transform strings. For example,bucket[0]andtruncate[0]deserialize successfully even though applying those transforms can later panic due to modulo or division by zero. The parser also accepts malformed strings such asbucket10andtruncate10because it strips the transform prefix and trims brackets loosely.Expected behavior
Parameterized transform parsing should require exact Iceberg syntax and validate the parameter value:
bucket[N]andtruncate[W]when the value is greater than zerobucket[0]andtruncate[0]bucket10,truncate10, or trailing characters after the closing bracketImpact
Invalid table metadata or user-provided transform strings can be accepted and fail later during transform evaluation. Rejecting them during parsing gives callers a normal validation error instead of allowing a later runtime panic.