You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/07/07 13:36:25 UTC

[GitHub] [phoenix-queryserver] richardantal opened a new pull request #71: PHOENIX-6407 phoenixdb for Python silently ignores placeholders < pla…

richardantal opened a new pull request #71:
URL: https://github.com/apache/phoenix-queryserver/pull/71


   …ceholder arguments
   
   Change-Id: I1715aca93420686585d5c6d4db7994c74bd39cba


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [phoenix-queryserver] richardantal commented on pull request #71: PHOENIX-6407 phoenixdb for Python silently ignores placeholders < pla…

Posted by GitBox <gi...@apache.org>.
richardantal commented on pull request #71:
URL: https://github.com/apache/phoenix-queryserver/pull/71#issuecomment-875671112


   If we have more parameter than placeholders the zip will eliminate the extra ones here:
   https://github.com/apache/phoenix-queryserver/blob/master/python-phoenixdb/phoenixdb/cursor.py#L178
   Thats why it is silently ignored.


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [phoenix-queryserver] richardantal merged pull request #71: PHOENIX-6407 phoenixdb for Python silently ignores placeholders < pla…

Posted by GitBox <gi...@apache.org>.
richardantal merged pull request #71:
URL: https://github.com/apache/phoenix-queryserver/pull/71


   


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [phoenix-queryserver] richardantal commented on pull request #71: PHOENIX-6407 phoenixdb for Python silently ignores placeholders < pla…

Posted by GitBox <gi...@apache.org>.
richardantal commented on pull request #71:
URL: https://github.com/apache/phoenix-queryserver/pull/71#issuecomment-875659269


   I think this ticket is about calling the cursor.execute with mismatching number of placeholders in phonixdb.
   
   I created a table 
   `cursor.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, username VARCHAR, name VARCHAR)")`
   and ran these upserts
   ```
   cursor.execute("UPSERT INTO users VALUES (?, ?, ?)", (1, '1', '1'))
   cursor.execute("UPSERT INTO users VALUES (?, ?, ?)", (2, '2', '2', '2'))
   cursor.execute("UPSERT INTO users VALUES (?, ?, ?)", (3, '3'))
   cursor.execute("UPSERT INTO users VALUES (?, ?, ?, ?)", (4, '4', '4'))
   cursor.execute("UPSERT INTO users VALUES (?, ?)", (5, '5', '5'))
   
   cursor.execute("UPSERT INTO users VALUES (?, ?)", (6, '6'))
   ```
   
   Without this change:
   1, 2, 5 and 6 was successful.
   the result of the select:
   ```
   `[[1, '1', '1'], [2, '2', '2'], [5, '5', None], [6, '6', None]]`
   3 -> InternalError: ('Parameter value unbound. Parameter 3 is unbound', 2004, 'INT05', None)
   4 -> ProgrammingError: ('Number of columns upserting must match number of values. Numbers of columns: 3. Number of values: 4 tableName=USERS', 1020, '42Y60', None)
   ```
   
   With my change
   only 1 and 6 is successful
   ```
   2 -> ProgrammingError: ('Number of placeholders (?) must match number of parameters. Number of placeholders: 3. Number of parameters: 4', None, None, None)
   3 -> ProgrammingError: ('Number of placeholders (?) must match number of parameters. Number of placeholders: 3. Number of parameters: 2', None, None, None)
   4 -> ProgrammingError: ('Number of columns upserting must match number of values. Numbers of columns: 3. Number of values: 4 tableName=USERS', 1020, '42Y60', None)
   5 -> ProgrammingError: ('Number of placeholders (?) must match number of parameters. Number of placeholders: 2. Number of parameters: 3', None, None, None)
   ```
    


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [phoenix-queryserver] stoty commented on pull request #71: PHOENIX-6407 phoenixdb for Python silently ignores placeholders < pla…

Posted by GitBox <gi...@apache.org>.
stoty commented on pull request #71:
URL: https://github.com/apache/phoenix-queryserver/pull/71#issuecomment-875638084


   I'd expect this to be reproducibale even with the Java thick client.


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [phoenix-queryserver] stoty commented on pull request #71: PHOENIX-6407 phoenixdb for Python silently ignores placeholders < pla…

Posted by GitBox <gi...@apache.org>.
stoty commented on pull request #71:
URL: https://github.com/apache/phoenix-queryserver/pull/71#issuecomment-875637398


   I think that this a problem with either Phoenix or perhaps Avatica.
   I don't think that this should be fixed in phoenixdb.
   


-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org