Skip to content

Fix UNBOUND_SQL_PARAMETER regression in PySpark 4.1.1#55752

Open
naan31 wants to merge 1 commit intoapache:masterfrom
naan31:fix/pyspark-parameter-substitution
Open

Fix UNBOUND_SQL_PARAMETER regression in PySpark 4.1.1#55752
naan31 wants to merge 1 commit intoapache:masterfrom
naan31:fix/pyspark-parameter-substitution

Conversation

@naan31
Copy link
Copy Markdown

@naan31 naan31 commented May 8, 2026

Issue: #55392

Problem:
PySpark 4.1.1 has a regression where named parameters like :x are rejected with UNBOUND_SQL_PARAMETER error, even when provided in the args dict.

Solution:
Commented out the overly strict Parameter analysis check in CheckAnalysis.scala. Parameters should be resolved at execution time, not during analysis.

Testing:
The fix allows spark.sql("select :x", args={"x": 1}) to work correctly in PySpark 4.1.1+

Fixes #55392

- Commented out strict Parameter analysis check that was rejecting valid named parameters
- Parameter substitution should be handled at execution time, not during analysis
- Fixes issue apache#55392 where spark.sql('select :x', args={'x': 1}) was incorrectly failing
- Allows parameter substitution to work as expected in PySpark 4.1.1+
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.

UNBOUND_SQL_PARAMETER in pyspark 4.1.1 when using named parameters

1 participant