Ben DeMott created PHOENIX-6407:
-----------------------------------

             Summary: phoenidb for Python silently ignores placeholders < 
placeholder arguments
                 Key: PHOENIX-6407
                 URL: https://issues.apache.org/jira/browse/PHOENIX-6407
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 5.1.0
            Reporter: Ben DeMott


The `phoenixdb` driver for Python does not alert the user to excess arguments 
that are not represented by placeholders.

*Example 1*, fewer arguments than placeholders raise exception (works as 
expected)

 
{code:java}
cursor.execute("UPSERT INTO users VALUES (?, ?, ?)", (123, 'John Doe')) {code}
{noformat}
phoenixdb.errors.ProgrammingError: ('Number of columns upserting must match 
number of values. Numbers of columns: 3. Number of values: 4 tableName=USERS', 
1020, '42Y60', None){noformat}
*Example 2,* additional arguments than placeholders is silently ignored
{code:java}
cursor.execute("UPSERT INTO users VALUES (?, ?)", (123, 'John Doe', 
'admin')){code}
**The program should generate a similar error as to the one above that the 
columns need to match the replacements.

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to