You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-55716][SQL][FOLLOWUP] Simplify NOT NULL preservation by skipping asNullable in resolveRelation
Instead of calling `dataSchema.asNullable` in `resolveRelation()` and then restoring nullability from the user schema in `CreateDataSourceTableCommand`, add a `forceNullable` parameter to `resolveRelation()` and pass `false` from the create-table path.
This eliminates the `restoreNullability` and `restoreDataTypeNullability` helper methods, simplifying the code significantly (-37 lines net).
The read path is unaffected: `resolveRelation()` defaults to `forceNullable = true` (preserving SPARK-13738 safety). Only the create-table path skips `asNullable` so the catalog stores the user's original nullability constraints.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments