nemanja-boric-databricks commented on PR #47271:
URL: https://github.com/apache/spark/pull/47271#issuecomment-2219703691
The trick is that I cannot get this plan to be generated just with SQL
without connect:
```GlobalLimit 1
+- 'LocalLimit 1
+- 'NameParameterizedQuery [val], [1]
+- 'Project [*]
+- 'Filter ('val = namedparameter(val))
+- 'SubqueryAlias tab
+- 'UnresolvedInlineTable [date, val], [[cast(2022-12-25
10:30:00 as timestamp), 1]]
```
All my tries generate the plan that doesn't expose this bug, where the
NameParametizedQuery is over the Limit node:
```
df = spark.sql("select pickup_zip from nyctaxi.trips where fare_amount >
:amount limit 1", args = {"amount": 100})
```
generates
```
== Parsed Logical Plan ==
'NameParameterizedQuery [amount], [100]
+- 'GlobalLimit 1
+- 'LocalLimit 1
+- 'Project ['pickup_zip]
+- 'Filter ('fare_amount > namedparameter(amount))
+- 'UnresolvedRelation [nyctaxi, trips], [], false
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]