phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Istvan Toth (Jira)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-6407) phoenixdb for Python silently ignores placeholders < placeholder arguments
Date Thu, 19 Aug 2021 18:17:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-6407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Istvan Toth updated PHOENIX-6407:
---------------------------------
    Fix Version/s: python-phoenixdb-1.1.0

> phoenixdb for Python silently ignores placeholders < placeholder arguments
> --------------------------------------------------------------------------
>
>                 Key: PHOENIX-6407
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6407
>             Project: Phoenix
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 5.1.0
>            Reporter: Ben DeMott
>            Assignee: Richárd Antal
>            Priority: Minor
>              Labels: phoenixdb
>             Fix For: queryserver-6.0.0, python-phoenixdb-1.1.0
>
>
> 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 to the one above, that the columns need to
match the replacements.
>  
>  



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

Mime
View raw message