Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] Java driver error with MONEY type #1949

Open
OlegLoginov opened this issue Aug 1, 2019 · 2 comments
Open

[YSQL] Java driver error with MONEY type #1949

OlegLoginov opened this issue Aug 1, 2019 · 2 comments
Labels
area/ecosystem Label for all ecosystem related projects kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@OlegLoginov
Copy link
Contributor

OlegLoginov commented Aug 1, 2019

Jira Link: DB-1958
To reproduce the issue uncomment the lines after 'TOFIX:':

    // MONEY
    { "'0'", "'1'", "'-1'", "'100'", "'-100'", "'2.0001'", "'5,.06'", "'5,.6'", "'$3.0001'",
      "'$40'", "'1,2'", "'1,23'",
      // TOFIX:
      // "'-92233720368547758.08'", "'92233720368547758.07'",
      // "'100,120'", "'100,23'", "'1000,23'", "'1,000,000.12'", "'2,000.00012'",
      // "'$3,000.00012'", "'$4,000,000.12'"
    },

in the test: java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgSortNumeric.java
Run the test: ybd --java-test org.yb.pgsql.TestPgSortNumeric

The error: Bad value for type double : 100,120.00
Note: the INSERT was successful but SELECT cannot create internal Object from the MONEY type value (value = '100,120.00' in the example).

The catched exception:

2019-07-30 16:39:20,036 (main) [ERROR - org.yb.BaseYBTest$1$2.logEventDetails(BaseYBTest.java:240)] YB Java test failed: class="org.yb.pgsql.TestPgSortOther", method="testSort"
org.postgresql.util.PSQLException: Bad value for type double : 100,120.00
    at org.postgresql.jdbc.PgResultSet.toDouble(PgResultSet.java:2934)
    at org.postgresql.jdbc.PgResultSet.getDouble(PgResultSet.java:2323)
    at org.postgresql.jdbc.PgResultSet.internalGetObject(PgResultSet.java:194)
    at org.postgresql.jdbc.PgResultSet.getObject(PgResultSet.java:2572)
    at org.yb.pgsql.BasePgSQLTest.getRowList(BasePgSQLTest.java:700)
    at org.yb.pgsql.BasePgSortingOrder.selectAndCompare(BasePgSortingOrder.java:199)
    at org.yb.pgsql.BasePgSortingOrder.RunTest(BasePgSortingOrder.java:233)
    at org.yb.pgsql.TestPgSortOther.testSort(TestPgSortOther.java:66)
@OlegLoginov OlegLoginov added area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug labels Aug 1, 2019
@OlegLoginov
Copy link
Contributor Author

Dependency: diff D6886.

@ndeodhar ndeodhar self-assigned this Aug 1, 2019
@ndeodhar
Copy link
Contributor

ndeodhar commented Aug 1, 2019

@yugabyte-ci yugabyte-ci added the priority/medium Medium priority issue label Jun 9, 2022
@sushantrmishra sushantrmishra added this to To do in Ecosystem Integrations (new) via automation Sep 5, 2022
@sushantrmishra sushantrmishra removed the area/ysql Yugabyte SQL (YSQL) label Sep 5, 2022
@yugabyte-ci yugabyte-ci added the area/ecosystem Label for all ecosystem related projects label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ecosystem Label for all ecosystem related projects kind/bug This issue is a bug priority/medium Medium priority issue
Development

No branches or pull requests

4 participants