Skip to content

Commit

Permalink
fix: return correct base type for domain from getUDTs (#2520) (#2522)
Browse files Browse the repository at this point in the history
Co-authored-by: alurie <luriebiz@gmail.com>
  • Loading branch information
alurie and alurie committed May 28, 2022
1 parent ab803c6 commit 627702a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -2696,7 +2696,7 @@ public ResultSet getUDTs(@Nullable String catalog, @Nullable String schemaPatter
long longTypOid = typeInfo.intOidToLong(typOid);
int sqlType = typeInfo.getSQLType(typOid);

sqlwhen.append(" when t.oid = ").append(longTypOid).append(" then ").append(sqlType);
sqlwhen.append(" when oid = ").append(longTypOid).append(" then ").append(sqlType);
}
sql += sqlwhen.toString();

Expand Down
Expand Up @@ -1188,7 +1188,7 @@ public void testGetUDT1() throws Exception {
String remarks = rs.getString("remarks");

int baseType = rs.getInt("base_type");
assertTrue("base type", !rs.wasNull());
assertEquals("base type", java.sql.Types.BIGINT, baseType);
assertEquals("data type", Types.DISTINCT, dataType);
assertEquals("type name ", "testint8", typeName);
assertEquals("remarks", "jdbc123", remarks);
Expand Down Expand Up @@ -1220,7 +1220,7 @@ public void testGetUDT2() throws Exception {
String remarks = rs.getString("remarks");

int baseType = rs.getInt("base_type");
assertTrue("base type", !rs.wasNull());
assertEquals("base type", java.sql.Types.BIGINT, baseType);
assertEquals("data type", Types.DISTINCT, dataType);
assertEquals("type name ", "testint8", typeName);
assertEquals("remarks", "jdbc123", remarks);
Expand Down Expand Up @@ -1251,7 +1251,7 @@ public void testGetUDT3() throws Exception {
String remarks = rs.getString("remarks");

int baseType = rs.getInt("base_type");
assertTrue("base type", !rs.wasNull());
assertEquals("base type", java.sql.Types.BIGINT, baseType);
assertEquals("data type", Types.DISTINCT, dataType);
assertEquals("type name ", "testint8", typeName);
assertEquals("remarks", "jdbc123", remarks);
Expand Down

0 comments on commit 627702a

Please sign in to comment.