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

chore(deps): update dependency com.google.cloud:libraries-bom to v26.38.0 #1694

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/latency-comparison/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.37.0</version>
<version>26.38.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.37.0</version>
<version>26.38.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ private List<?> toList(Value value, Code arrayElementType) {
case BYTES:
return value.getBytesArray();
case INT64:
case PG_OID:
return value.getInt64Array();
case STRING:
case PG_NUMERIC:
Expand Down Expand Up @@ -377,6 +378,9 @@ public void bind(Statement.Builder statementBuilder, String name) {
case Oid.INT8:
statementBuilder.bind(name).toInt64Array((List<Long>) this.item);
break;
case Oid.OID:
statementBuilder.bind(name).toPgOidArray((List<Long>) this.item);
break;
case Oid.NUMERIC:
statementBuilder.bind(name).toPgNumericArray((List<String>) this.item);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.google.cloud.spanner.pgadapter.error.PGExceptionFactory;
import com.google.cloud.spanner.pgadapter.error.SQLState;
import com.google.cloud.spanner.pgadapter.session.SessionState;
import com.google.spanner.v1.TypeAnnotationCode;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import org.postgresql.core.Oid;
Expand Down Expand Up @@ -81,6 +82,7 @@ public static Parser<?> create(
case Oid.INT4:
return new IntegerParser(item, formatCode);
case Oid.INT8:
case Oid.OID:
return new LongParser(item, formatCode);
case Oid.NUMERIC:
return new NumericParser(item, formatCode);
Expand All @@ -103,6 +105,7 @@ public static Parser<?> create(
case Oid.INT2_ARRAY:
case Oid.INT4_ARRAY:
case Oid.INT8_ARRAY:
case Oid.OID_ARRAY:
case Oid.NUMERIC_ARRAY:
case Oid.TEXT_ARRAY:
case Oid.VARCHAR_ARRAY:
Expand Down Expand Up @@ -141,6 +144,8 @@ static int getArrayElementOid(int arrayOid) {
return Oid.INT4;
case Oid.INT8_ARRAY:
return Oid.INT8;
case Oid.OID_ARRAY:
return Oid.OID;
case Oid.NUMERIC_ARRAY:
return Oid.NUMERIC;
case Oid.TEXT_ARRAY:
Expand Down Expand Up @@ -182,6 +187,7 @@ public static Parser<?> create(
case FLOAT64:
return new DoubleParser(result, columnarPosition);
case INT64:
case PG_OID:
return new LongParser(result, columnarPosition);
case PG_NUMERIC:
return new NumericParser(result, columnarPosition);
Expand Down Expand Up @@ -221,6 +227,7 @@ protected static Parser<?> create(Object result, Code typeCode, SessionState ses
case FLOAT64:
return new DoubleParser(result);
case INT64:
case PG_OID:
return new LongParser(result);
case PG_NUMERIC:
return new NumericParser(result);
Expand Down Expand Up @@ -250,6 +257,8 @@ public static int toOid(Type type) {
return Oid.BOOL;
case INT64:
return Oid.INT8;
case PG_OID:
return Oid.OID;
case PG_NUMERIC:
return Oid.NUMERIC;
case FLOAT32:
Expand All @@ -272,6 +281,8 @@ public static int toOid(Type type) {
return Oid.BOOL_ARRAY;
case INT64:
return Oid.INT8_ARRAY;
case PG_OID:
return Oid.OID_ARRAY;
case PG_NUMERIC:
return Oid.NUMERIC_ARRAY;
case FLOAT32:
Expand Down Expand Up @@ -323,6 +334,8 @@ public static Type toType(int oid) {
case Oid.INT4:
case Oid.INT8:
return Type.int64();
case Oid.OID:
return Type.pgOid();
case Oid.NUMERIC:
return Type.pgNumeric();
case Oid.TEXT:
Expand All @@ -343,6 +356,7 @@ public static Type toType(int oid) {
case Oid.INT2_ARRAY:
case Oid.INT4_ARRAY:
case Oid.INT8_ARRAY:
case Oid.OID_ARRAY:
case Oid.NUMERIC_ARRAY:
case Oid.TEXT_ARRAY:
case Oid.VARCHAR_ARRAY:
Expand Down Expand Up @@ -370,6 +384,9 @@ public static int toOid(com.google.spanner.v1.Type type) {
case BOOL:
return Oid.BOOL;
case INT64:
if (type.getTypeAnnotation() == TypeAnnotationCode.PG_OID) {
return Oid.OID;
}
return Oid.INT8;
case NUMERIC:
return Oid.NUMERIC;
Expand All @@ -392,6 +409,9 @@ public static int toOid(com.google.spanner.v1.Type type) {
case BOOL:
return Oid.BOOL_ARRAY;
case INT64:
if (type.getArrayElementType().getTypeAnnotation() == TypeAnnotationCode.PG_OID) {
return Oid.OID_ARRAY;
}
return Oid.INT8_ARRAY;
case NUMERIC:
return Oid.NUMERIC_ARRAY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public static byte[] convertToPG(
case FLOAT64:
return DoubleParser.convertToPG(result, position, format);
case INT64:
case PG_OID:
return LongParser.convertToPG(result, position, format);
case PG_NUMERIC:
return NumericParser.convertToPG(result, position, format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3288,7 +3288,7 @@ public void testRandomResults() throws SQLException {
// type (jsonb is not one of the types that the JDBC driver will load
// automatically).
final int jsonbColumnIndex = 6;
final int jsonbArrayColumnIndex = 16;
final int jsonbArrayColumnIndex = 17;
if (col == jsonbColumnIndex || col == jsonbArrayColumnIndex) {
resultSet.getString(col + 1);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testSelectInAutoCommit() throws SQLException {
try (Connection connection = DriverManager.getConnection(createUrl())) {
try (ResultSet resultSet = connection.createStatement().executeQuery(sql)) {
while (resultSet.next()) {
assertEquals(20, resultSet.getMetaData().getColumnCount());
assertEquals(22, resultSet.getMetaData().getColumnCount());
}
}
}
Expand Down
Loading