You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.79229
but issue doesn't seem to be related to Redshift server.
Create an object of RedshiftPreparedStatement for SELECT * FROM "test_schema"."t_decimal" WHERE "c_decimal" = 10.1; sql query.
Output of RedshiftPreparedStatement.toString() for the above query produces SELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric) output. Ideally it should generate SELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric(3,1))
As we can see that the cast is missing precision ie'10.1'::numeric vs '10.1'::numeric(3,1) leading to no output from the Redshift database(ideally 10.1 row should be returned as an output when numeric(3,1) case is provided)
Expected behaviour: SELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric)
Actual behaviour: SELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric(3,1))
Error message/stack trace:
Any other details that can be helpful:
JDBC trace logs
Reproduction code
The text was updated successfully, but these errors were encountered:
Driver version
Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.79229
but issue doesn't seem to be related to Redshift server.
Client Operating System
mac. but NA for this issue
JAVA/JVM version
openjdk 23.0.1
Table schema
Problem description
RedshiftPreparedStatement
forSELECT * FROM "test_schema"."t_decimal" WHERE "c_decimal" = 10.1;
sql query.RedshiftPreparedStatement.toString()
for the above query producesSELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric)
output. Ideally it should generateSELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric(3,1))
As we can see that the cast is missing precision ie
'10.1'::numeric
vs'10.1'::numeric(3,1)
leading to no output from the Redshift database(ideally 10.1 row should be returned as an output when numeric(3,1) case is provided)SELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric)
SELECT "c_decimal" FROM "test_schema"."t_decimal" WHERE "c_decimal" = ('10.1'::numeric(3,1))
JDBC trace logs
Reproduction code
The text was updated successfully, but these errors were encountered: