vertica-python icon indicating copy to clipboard operation
vertica-python copied to clipboard

String values are concatenated somewhere

Open akariasmorum opened this issue 1 year ago • 1 comments

Hi folks! How does it even work?

cursor.execute("""
    select 
        'abc'
        'bca'
        as col
    """)
cursor.fetchall()

[['abcbca']]

I mean this code does not work in VJDBC, it raises

SQL Error [4856] [42601]: [Vertica]VJDBC ERROR: Syntax error at or near "'dsa'" at character 23

exception as expected. Where are those values are concatenated?

akariasmorum avatar May 03 '24 15:05 akariasmorum

vertica-python has the same behavior as vsql, values are concatenated at the server side, so this might be a problem in JDBC/Java. Please check your java code and monitor what string are actually sent to server by JDBC.

sitingren avatar May 06 '24 11:05 sitingren