lidavidm commented on issue #3319:
URL: https://github.com/apache/arrow-adbc/issues/3319#issuecomment-3222760767

   Ok, it seems the old behavior was to treat `None` and `[]` as to effectively 
not execute the query, while the new behavior is to treat them both as 
executing the query once.
   
   I believe the "right" behavior should be that None is the same as executing 
the query once, and `[]` is the same as not executing the query at all.
   
   Looking at PEP-249, it states:
   > Modules are free to implement this method using multiple calls to the 
[.execute()](https://peps.python.org/pep-0249/#id21) method
   
   I'm interpreting this as saying that semantically, it should be like 
   
   ```python
   for paramset in parameters:
       self.execute(query, paramset)
   ```
   
   And so an empty list corresponds to no behavior. 
   
   By the spec, I don't think `None` is actually defined. `psycopg` appears to 
reject None, while also treating `[]` the same as not executing the query.


-- 
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]

Reply via email to