apache / apache/iceberg

Spark 4.1: Fail fast when a parameter context reaches an Iceberg DDL command

Open
#16,683 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.2k
Forks
3.5k
Avg merge
2d 11h
Merged PRs (30d)
132

Description

### Feature Request / Improvement

Follow-up to #16626.

`IcebergSparkSqlExtensionsParser.parsePlanWithParameters` (Spark 4.1) intentionally does not propagate the `ParameterContext` to the Iceberg parse path, because Iceberg DDL grammars do not accept parameter markers (`?` / `:name`).

Today a non-empty `parameterContext` reaching an Iceberg command is silently ignored. Since that situation would indicate a caller bug rather than a valid query, it would be safer to fail fast (e.g. throw a clear exception) when a non-empty `parameterContext` is dispatched to an Iceberg command, instead of dropping it silently.

This was raised as a non-blocking review note on #16626 and split out so that PR stays scoped to the binding fix.

### Query engine

Spark

### Willingness to contribute

- [x] I can contribute this improvement/feature independently
- [ ] I would be willing to contribute this improvement/feature with guidance from the Iceberg community
- [ ] I cannot contribute this improvement/feature at this time

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.