This is probably related to #49. When that is fixed, hopefully this one will be fixed as well -- but just wanted to put his one out for tracking.
import teradata
with teradata.tdrest.connect(host='localhost', system='mytd', username='dbc', password='******') as conn:
with conn.cursor() as csr:
csr.execute("select cast('1 ' as CHAR(2)) as col, type(col) as col_type, length(col) as col_len")
col, col_type, col_len = csr.fetchone()
print('Column: Value={}, Type={}, DB Len={}, Python Len={}'.format(col, col_type, col_len, len(col)))
Output of the above example shows Python length is 1 when using teradata.tdrest, but it's 2 when using teradata.tdodbc.
This is probably related to #49. When that is fixed, hopefully this one will be fixed as well -- but just wanted to put his one out for tracking.
Output of the above example shows Python length is 1 when using
teradata.tdrest
, but it's 2 when usingteradata.tdodbc
.