You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Richárd Antal (Jira)" <ji...@apache.org> on 2021/07/07 13:36:00 UTC
[jira] [Assigned] (PHOENIX-6407) phoenixdb for Python silently
ignores placeholders < placeholder arguments
[ https://issues.apache.org/jira/browse/PHOENIX-6407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richárd Antal reassigned PHOENIX-6407:
--------------------------------------
Assignee: Richárd Antal
> 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
>
> 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)