Skip to content

[WIP][SPARK-41666][PYTHON] Support parameterized SQL by PySpark sql()#39159

Closed
MaxGekk wants to merge 2 commits into
apache:masterfrom
MaxGekk:parameterized-sql-pyspark-2
Closed

[WIP][SPARK-41666][PYTHON] Support parameterized SQL by PySpark sql()#39159
MaxGekk wants to merge 2 commits into
apache:masterfrom
MaxGekk:parameterized-sql-pyspark-2

Conversation

@MaxGekk
Copy link
Copy Markdown
Member

@MaxGekk MaxGekk commented Dec 21, 2022

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@@ -1376,7 +1376,8 @@ def sql(self, sqlQuery: str, **kwargs: Any) -> DataFrame:
if len(kwargs) > 0:
Copy link
Copy Markdown
Member

@HyukjinKwon HyukjinKwon Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way is to keep the signature same as Scala's. e.g.)

def sql(self, sqlQuery: str, args: Dict[str, str] = {}, **kwargs: Any) -> DataFrame:
    # Use args for SQL mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants