Repository: GoogleCloudPlatform/pgadapter
Pull request #3217 (2025-04-29 15:45:30)

chore(deps): update dependency com.google.cloud:google-cloud-spanner-bom to v6.92.0
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-spanner-bom](https://redirect.github.com/googleapis/java-spanner) | `6.91.1` -> `6.92.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud:google-cloud-spanner-bom/6.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.cloud:google-cloud-spanner-bom/6.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.cloud:google-cloud-spanner-bom/6.91.1/6.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.cloud:google-cloud-spanner-bom/6.91.1/6.92.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner-bom)</summary>

### [`v6.92.0`](https://redirect.github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6920-2025-04-29)

[Compare Source](https://redirect.github.com/googleapis/java-spanner/compare/v6.91.1...v6.92.0)

##### Features

-   \[Internal] client-side metrics for afe latency and connectivity error ([#&#8203;3819](https://redirect.github.com/googleapis/java-spanner/issues/3819)) ([a8dba0a](https://redirect.github.com/googleapis/java-spanner/commit/a8dba0a83939fdbbc324f0a7aa6c44180462fa3a))
-   Support begin with AbortedException for manager interface ([#&#8203;3835](https://redirect.github.com/googleapis/java-spanner/issues/3835)) ([5783116](https://redirect.github.com/googleapis/java-spanner/commit/578311693bed836c8916f4b4ffa0782a468c1af3))

##### Bug Fixes

-   **deps:** Update the Java code generator (gapic-generator-java) to 2.56.2 ([11bfd90](https://redirect.github.com/googleapis/java-spanner/commit/11bfd90daa244dbd31a76bc5a1d2e694e43fa292))

##### Dependencies

-   Update dependency com.google.cloud:sdk-platform-java-config to v3.46.2 ([#&#8203;3836](https://redirect.github.com/googleapis/java-spanner/issues/3836)) ([2ee7f97](https://redirect.github.com/googleapis/java-spanner/commit/2ee7f971f3374b01d22e5a7f8f2483cf60c3363d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/GoogleCloudPlatform/pgadapter).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoicG9zdGdyZXNxbC1kaWFsZWN0IiwibGFiZWxzIjpbXX0=-->


forking-renovate[bot]: ### Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

 ⚠️ **Warning**: custom changes will be lost.

Patch:
diff --git a/pom.xml b/pom.xml
index 74697476..d4fca256 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@
       <dependency>
         <groupId>com.google.cloud</groupId>
         <artifactId>google-cloud-spanner-bom</artifactId>
-        <version>6.91.1</version>
+        <version>6.92.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
@@ -89,13 +89,6 @@
         <type>pom</type>
         <scope>import</scope>
       </dependency>
-      <dependency>
-        <groupId>com.google.cloud</groupId>
-        <artifactId>libraries-bom</artifactId>
-        <version>26.59.0</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
     </dependencies>
   </dependencyManagement>
 
@@ -239,6 +232,7 @@
       <artifactId>gax-grpc</artifactId>
       <classifier>testlib</classifier>
       <scope>test</scope>
+      <version>2.64.2</version>
     </dependency>
     <dependency>
       <groupId>net.java.dev.jna</groupId>
diff --git a/samples/python/sqlalchemy2-sample/sample.py b/samples/python/sqlalchemy2-sample/sample.py
index ed2ed2b4..b062939f 100644
--- a/samples/python/sqlalchemy2-sample/sample.py
+++ b/samples/python/sqlalchemy2-sample/sample.py
@@ -90,7 +90,7 @@ def run_sample():
   if random_boolean():
     singer_id = session.query(Singer).first().id
   else:
-    singer_id = uuid.uuid4()
+    singer_id = str(uuid.uuid4())
   insert_or_update_singer(singer_id, random_first_name(), random_last_name())
 
   print()
diff --git a/src/main/java/com/google/cloud/spanner/pgadapter/parsers/ArrayParser.java b/src/main/java/com/google/cloud/spanner/pgadapter/parsers/ArrayParser.java
index ae79a4a5..9000701e 100644
--- a/src/main/java/com/google/cloud/spanner/pgadapter/parsers/ArrayParser.java
+++ b/src/main/java/com/google/cloud/spanner/pgadapter/parsers/ArrayParser.java
@@ -117,6 +117,8 @@ public class ArrayParser extends Parser<List<?>> {
         // Get numeric arrays as a string array instead of as an array of BigDecimal, as numeric
         // arrays could contain 'NaN' values, which are not supported by BigDecimal.
         return value.getStringArray();
+      case UUID:
+        return value.getUuidArray();
       case TIMESTAMP:
         return value.getTimestampArray();
       case INTERVAL:
diff --git a/src/main/java/com/google/cloud/spanner/pgadapter/parsers/Parser.java b/src/main/java/com/google/cloud/spanner/pgadapter/parsers/Parser.java
index 0a874566..6a86cf3f 100644
--- a/src/main/java/com/google/cloud/spanner/pgadapter/parsers/Parser.java
+++ b/src/main/java/com/google/cloud/spanner/pgadapter/parsers/Parser.java
@@ -199,6 +199,8 @@ public abstract class Parser<T> {
         return new NumericParser(result, columnarPosition);
       case STRING:
         return new StringParser(result, columnarPosition);
+      case UUID:
+        return new UuidParser(result, columnarPosition);
       case TIMESTAMP:
         return new TimestampParser(result, columnarPosition, sessionState);
       case INTERVAL:
@@ -241,6 +243,8 @@ public abstract class Parser<T> {
         return new NumericParser(result);
       case STRING:
         return new StringParser(result);
+      case UUID:
+        return new UuidParser(result);
       case TIMESTAMP:
         return new TimestampParser(result, sessionState);
       case INTERVAL:
@@ -277,6 +281,8 @@ public abstract class Parser<T> {
         return Oid.FLOAT8;
       case STRING:
         return Oid.VARCHAR;
+      case UUID:
+        return Oid.UUID;
       case PG_JSONB:
         return Oid.JSONB;
       case BYTES:
@@ -303,6 +309,8 @@ public abstract class Parser<T> {
             return Oid.FLOAT8_ARRAY;
           case STRING:
             return Oid.VARCHAR_ARRAY;
+          case UUID:
+            return Oid.UUID_ARRAY;
           case PG_JSONB:
             return Oid.JSONB_ARRAY;
           case BYTES:
@@ -354,8 +362,9 @@ public abstract class Parser<T> {
         return Type.pgNumeric();
       case Oid.TEXT:
       case Oid.VARCHAR:
-      case Oid.UUID:
         return Type.string();
+      case Oid.UUID:
+        return Type.uuid();
       case Oid.TIMESTAMP:
       case Oid.TIMESTAMPTZ:
         return Type.timestamp();
@@ -413,6 +422,8 @@ public abstract class Parser<T> {
         return Oid.FLOAT8;
       case STRING:
         return Oid.VARCHAR;
+      case UUID:
+        return Oid.UUID;
       case JSON:
         return Oid.JSONB;
       case BYTES:
@@ -440,6 +451,8 @@ public abstract class Parser<T> {
             return Oid.FLOAT8_ARRAY;
           case STRING:
             return Oid.VARCHAR_ARRAY;
+          case UUID:
+            return Oid.UUID_ARRAY;
           case JSON:
             return Oid.JSONB_ARRAY;
           case BYTES:
diff --git a/src/main/java/com/google/cloud/spanner/pgadapter/parsers/UuidParser.java b/src/main/java/com/google/cloud/spanner/pgadapter/parsers/UuidParser.java
index e00b11f2..7a22a578 100644
--- a/src/main/java/com/google/cloud/spanner/pgadapter/parsers/UuidParser.java
+++ b/src/main/java/com/google/cloud/spanner/pgadapter/parsers/UuidParser.java
@@ -15,7 +15,9 @@
 package com.google.cloud.spanner.pgadapter.parsers;
 
 import com.google.api.core.InternalApi;
+import com.google.cloud.spanner.ResultSet;
 import com.google.cloud.spanner.Value;
+import com.google.cloud.spanner.pgadapter.ProxyServer.DataFormat;
 import com.google.cloud.spanner.pgadapter.error.PGException;
 import com.google.cloud.spanner.pgadapter.error.SQLState;
 import com.google.cloud.spanner.pgadapter.error.Severity;
@@ -25,12 +27,13 @@ import java.util.UUID;
 import javax.annotation.Nonnull;
 import org.postgresql.util.ByteConverter;
 
-/**
- * Translate from wire protocol to UUID. This is currently a one-way conversion, as we only accept
- * UUID as a parameter type. UUIDs are converted to strings.
- */
+/** Translate from wire protocol to UUID. */
 @InternalApi
-public class UuidParser extends Parser<String> {
+public class UuidParser extends Parser<UUID> {
+
+  UuidParser(Object item) {
+    this.item = (UUID) item;
+  }
 
   UuidParser(byte[] item, FormatCode formatCode) {
     switch (formatCode) {
@@ -46,6 +49,10 @@ public class UuidParser extends Parser<String> {
     }
   }
 
+  UuidParser(ResultSet item, int position) {
+    this.item = item.isNull(position) ? null : item.getUuid(position);
+  }
+
   static void handleInvalidFormat(FormatCode formatCode) {
     throw PGException.newBuilder("Unsupported format: " + formatCode.name())
         .setSQLState(SQLState.InternalError)
@@ -55,7 +62,7 @@ public class UuidParser extends Parser<String> {
 
   @Override
   public String stringParse() {
-    return this.item;
+    return this.item == null ? null : this.item.toString();
   }
 
   @Override
@@ -66,17 +73,15 @@ public class UuidParser extends Parser<String> {
     return binaryEncode(this.item);
   }
 
-  static String verifyStringValue(@Nonnull String value) {
+  static UUID verifyStringValue(@Nonnull String value) {
     try {
-      //noinspection ResultOfMethodCallIgnored
-      UUID.fromString(value);
-      return value;
+      return UUID.fromString(value);
     } catch (Exception exception) {
       throw createInvalidUuidValueException(value, exception);
     }
   }
 
-  static String verifyBinaryValue(byte[] value) {
+  static UUID verifyBinaryValue(byte[] value) {
     if (value == null) {
       return null;
     }
@@ -86,21 +91,24 @@ public class UuidParser extends Parser<String> {
           .setSQLState(SQLState.InvalidParameterValue)
           .build();
     }
-    return new UUID(ByteConverter.int8(value, 0), ByteConverter.int8(value, 8)).toString();
+    return new UUID(ByteConverter.int8(value, 0), ByteConverter.int8(value, 8));
   }
 
   static byte[] binaryEncode(String value) {
     try {
-      UUID uuid = UUID.fromString(value);
-      byte[] val = new byte[16];
-      ByteConverter.int8(val, 0, uuid.getMostSignificantBits());
-      ByteConverter.int8(val, 8, uuid.getLeastSignificantBits());
-      return val;
+      return binaryEncode(UUID.fromString(value));
     } catch (Exception exception) {
       throw createInvalidUuidValueException(value, exception);
     }
   }
 
+  static byte[] binaryEncode(UUID uuid) {
+    byte[] val = new byte[16];
+    ByteConverter.int8(val, 0, uuid.getMostSignificantBits());
+    ByteConverter.int8(val, 8, uuid.getLeastSignificantBits());
+    return val;
+  }
+
   static PGException createInvalidUuidValueException(String value, Exception cause) {
     return PGException.newBuilder("Invalid UUID: " + value)
         .setSeverity(Severity.ERROR)
@@ -109,8 +117,20 @@ public class UuidParser extends Parser<String> {
         .build();
   }
 
+  public static byte[] convertToPG(ResultSet resultSet, int position, DataFormat format) {
+    switch (format) {
+      case SPANNER:
+      case POSTGRESQL_TEXT:
+        return resultSet.getUuid(position).toString().getBytes(StandardCharsets.UTF_8);
+      case POSTGRESQL_BINARY:
+        return binaryEncode(resultSet.getUuid(position));
+      default:
+        throw new IllegalArgumentException("unknown data format: " + format);
+    }
+  }
+
   @Override
   public void bind(ImmutableMap.Builder<String, Value> parametersBuilder, String name) {
-    parametersBuilder.put(name, Value.string(this.item));
+    parametersBuilder.put(name, Value.uuid(this.item));
   }
 }
diff --git a/src/main/java/com/google/cloud/spanner/pgadapter/utils/Converter.java b/src/main/java/com/google/cloud/spanner/pgadapter/utils/Converter.java
index 4972ee0b..39e13204 100644
--- a/src/main/java/com/google/cloud/spanner/pgadapter/utils/Converter.java
+++ b/src/main/java/com/google/cloud/spanner/pgadapter/utils/Converter.java
@@ -34,6 +34,7 @@ import com.google.cloud.spanner.pgadapter.parsers.LongParser;
 import com.google.cloud.spanner.pgadapter.parsers.NumericParser;
 import com.google.cloud.spanner.pgadapter.parsers.StringParser;
 import com.google.cloud.spanner.pgadapter.parsers.TimestampParser;
+import com.google.cloud.spanner.pgadapter.parsers.UuidParser;
 import com.google.cloud.spanner.pgadapter.session.SessionState;
 import com.google.cloud.spanner.pgadapter.statements.CopyToStatement;
 import com.google.cloud.spanner.pgadapter.statements.IntermediateStatement;
@@ -178,6 +179,8 @@ public class Converter implements AutoCloseable {
         return NumericParser.convertToPG(result, position, format);
       case STRING:
         return StringParser.convertToPG(sessionState, outputStream, result, position);
+      case UUID:
+        return UuidParser.convertToPG(result, position, format);
       case TIMESTAMP:
         return TimestampParser.convertToPG(result, position, format, sessionState.getTimezone());
       case INTERVAL:


Test patch:
diff --git a/src/test/java/com/google/cloud/spanner/pgadapter/JdbcMockServerTest.java b/src/test/java/com/google/cloud/spanner/pgadapter/JdbcMockServerTest.java
index 7ad2d165..dfc3b7ab 100644
--- a/src/test/java/com/google/cloud/spanner/pgadapter/JdbcMockServerTest.java
+++ b/src/test/java/com/google/cloud/spanner/pgadapter/JdbcMockServerTest.java
@@ -108,9 +108,7 @@ import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.JUnit4;
 import org.postgresql.PGConnection;
 import org.postgresql.PGStatement;
 import org.postgresql.core.Oid;
@@ -119,8 +117,9 @@ import org.postgresql.util.PGInterval;
 import org.postgresql.util.PGobject;
 import org.postgresql.util.PSQLException;
 
-@RunWith(Parameterized.class)
+@RunWith(JUnit4.class)
 public class JdbcMockServerTest extends AbstractMockServerTest {
+  private static final String pgVersion = "14.1";
   private static final int RANDOM_RESULTS_ROW_COUNT = 10;
   private static final Statement SELECT_RANDOM = Statement.of("select * from random_table");
   private static final ImmutableList<String> JDBC_STARTUP_STATEMENTS =
@@ -129,13 +128,6 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
           "SET extra_float_digits = 3",
           "SET application_name = 'PostgreSQL JDBC Driver'");
 
-  @Parameter public String pgVersion;
-
-  @Parameters(name = "pgVersion = {0}")
-  public static Object[] data() {
-    return new Object[] {"1.0", "14.1"};
-  }
-
   @BeforeClass
   public static void loadPgJdbcDriver() throws Exception {
     // Make sure the PG JDBC driver is loaded.
@@ -399,35 +391,6 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
   }
 
   static void setupIntervalResults(MockSpannerServiceImpl mockSpanner) {
-    //    mockSpanner.putStatementResult(
-    //        StatementResult.query(
-    //            Statement.newBuilder(
-    //                    "with "
-    //                        + PG_TYPE_PREFIX
-    //                        + "\nSELECT t.oid, t.typname   "
-    //                        + "FROM pg_type t  "
-    //                        + "JOIN pg_namespace n ON t.typnamespace = n.oid "
-    //                        + "WHERE t.typelem = (SELECT oid FROM pg_type WHERE typname = $1) AND
-    // substring(t.typname, 1, 1) = '_' AND t.typlen = -1 AND (n.nspname = $2 OR $3 AND n.nspname
-    // IN ('pg_catalog', 'public')) "
-    //                        + "ORDER BY t.typelem DESC LIMIT 1")
-    //                .bind("p1")
-    //                .to("jsonb")
-    //                .bind("p2")
-    //                .to((String) null)
-    //                .bind("p3")
-    //                .to(true)
-    //                .build(),
-    //            com.google.spanner.v1.ResultSet.newBuilder()
-    //                .setMetadata(createMetadata(ImmutableList.of(TypeCode.INT64,
-    // TypeCode.STRING)))
-    //                .addRows(
-    //                    ListValue.newBuilder()
-    //                        .addValues(Value.newBuilder().setStringValue("3807").build())
-    //                        .addValues(Value.newBuilder().setStringValue("_jsonb").build())
-    //                        .build())
-    //                .build()));
-
     mockSpanner.putStatementResult(
         StatementResult.query(
             Statement.newBuilder(
@@ -515,36 +478,6 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
                         .addValues(Value.newBuilder().setStringValue("jsonb").build())
                         .build())
                 .build()));
-    //
-    //    mockSpanner.putStatementResult(
-    //        StatementResult.query(
-    //            Statement.newBuilder(
-    //                    "with "
-    //                        + PG_TYPE_PREFIX
-    //                        + "\nSELECT t.typarray, arr.typname   "
-    //                        + "FROM pg_type t  "
-    //                        + "JOIN pg_namespace n ON t.typnamespace = n.oid  "
-    //                        + "JOIN pg_type arr ON arr.oid = t.typarray "
-    //                        + "WHERE t.typname = $1 "
-    //                        + "AND (n.nspname = $2 OR $3 AND n.nspname  IN ('pg_catalog',
-    // 'public')) "
-    //                        + "ORDER BY t.oid DESC LIMIT 1")
-    //                .bind("p1")
-    //                .to("jsonb")
-    //                .bind("p2")
-    //                .to((String) null)
-    //                .bind("p3")
-    //                .to(true)
-    //                .build(),
-    //            com.google.spanner.v1.ResultSet.newBuilder()
-    //                .setMetadata(createMetadata(ImmutableList.of(TypeCode.INT64,
-    // TypeCode.STRING)))
-    //                .addRows(
-    //                    ListValue.newBuilder()
-    //                        .addValues(Value.newBuilder().setStringValue("3807").build())
-    //                        .addValues(Value.newBuilder().setStringValue("_jsonb").build())
-    //                        .build())
-    //                .build()));
     mockSpanner.putStatementResult(
         StatementResult.query(
             Statement.newBuilder(
@@ -641,60 +574,6 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
                         .addValues(Value.newBuilder().setStringValue("1186").build())
                         .build())
                 .build()));
-    //    mockSpanner.putStatementResult(
-    //        StatementResult.query(
-    //            Statement.newBuilder(
-    //                    "with "
-    //                        + PG_TYPE_PREFIX
-    //                        + "\nSELECT typinput='pg_catalog.array_in'::regproc as is_array,
-    // typtype, typname, pg_type.oid   "
-    //                        + "FROM pg_type   "
-    //                        + "LEFT JOIN (select ns.oid as nspoid, ns.nspname, r.r           from
-    // pg_namespace as ns           join ( select s.r, (current_schemas(false))[s.r] as nspname
-    //               from generate_series(1, array_upper(current_schemas(false), 1)) as s(r) ) as r
-    //         using ( nspname )        ) as sp     ON sp.nspoid = typnamespace  "
-    //                        + "WHERE pg_type.oid = $1  "
-    //                        + "ORDER BY sp.r, pg_type.oid DESC")
-    //                .build(),
-    //            com.google.spanner.v1.ResultSet.newBuilder()
-    //                .setMetadata(
-    //                    ResultSetMetadata.newBuilder()
-    //                        .setRowType(
-    //                            StructType.newBuilder()
-    //                                .addFields(
-    //                                    Field.newBuilder()
-    //                                        .setName("is_array")
-    //
-    // .setType(Type.newBuilder().setCode(TypeCode.BOOL).build())
-    //                                        .build())
-    //                                .addFields(
-    //                                    Field.newBuilder()
-    //                                        .setName("typtype")
-    //
-    // .setType(Type.newBuilder().setCode(TypeCode.STRING).build())
-    //                                        .build())
-    //                                .addFields(
-    //                                    Field.newBuilder()
-    //                                        .setName("typename")
-    //
-    // .setType(Type.newBuilder().setCode(TypeCode.STRING).build())
-    //                                        .build())
-    //                                .addFields(
-    //                                    Field.newBuilder()
-    //                                        .setName("oid")
-    //
-    // .setType(Type.newBuilder().setCode(TypeCode.INT64).build())
-    //                                        .build())
-    //                                .build())
-    //                        .build())
-    //                .addRows(
-    //                    ListValue.newBuilder()
-    //                        .addValues(Value.newBuilder().setBoolValue(true).build())
-    //                        .addValues(Value.newBuilder().setStringValue("b").build())
-    //                        .addValues(Value.newBuilder().setStringValue("_jsonb").build())
-    //                        .addValues(Value.newBuilder().setStringValue("3807").build())
-    //                        .build())
-    //                .build()));
   }
 
   /**
@@ -3650,7 +3529,8 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
                         Oid.INT8,
                         Oid.DATE,
                         Oid.TIMESTAMPTZ,
-                        Oid.INTERVAL)
+                        Oid.INTERVAL,
+                        Oid.UUID)
                     .stream()
                     .map(String::valueOf)
                     .collect(Collectors.joining(","));
@@ -3679,7 +3559,7 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
                   //       type (jsonb is not one of the types that the JDBC driver will load
                   //       automatically).
                   final int jsonbColumnIndex = 6;
-                  final int jsonbArrayColumnIndex = 17;
+                  final int jsonbArrayColumnIndex = 18;
                   if (col == jsonbColumnIndex || col == jsonbArrayColumnIndex) {
                     resultSet.getString(col + 1);
                   } else {
@@ -5076,8 +4956,7 @@ public class JdbcMockServerTest extends AbstractMockServerTest {
     UUID uuid = UUID.randomUUID();
     mockSpanner.putStatementResult(
         StatementResult.query(
-            Statement.newBuilder(pgSql).bind("p1").to(uuid.toString()).build(),
-            ALL_TYPES_RESULTSET));
+            Statement.newBuilder(pgSql).bind("p1").to(uuid).build(), ALL_TYPES_RESULTSET));
 
     try (Connection connection = DriverManager.getConnection(createUrl())) {
       try (PreparedStatement statement = connection.prepareStatement(jdbcSql)) {
diff --git a/src/test/java/com/google/cloud/spanner/pgadapter/OpenTelemetryMockServerTest.java b/src/test/java/com/google/cloud/spanner/pgadapter/OpenTelemetryMockServerTest.java
index 8773f5e9..5dcb40a2 100644
--- a/src/test/java/com/google/cloud/spanner/pgadapter/OpenTelemetryMockServerTest.java
+++ b/src/test/java/com/google/cloud/spanner/pgadapter/OpenTelemetryMockServerTest.java
@@ -62,7 +62,7 @@ public class OpenTelemetryMockServerTest extends AbstractMockServerTest {
     try (Connection connection = DriverManager.getConnection(createUrl())) {
       try (ResultSet resultSet = connection.createStatement().executeQuery(sql)) {
         while (resultSet.next()) {
-          assertEquals(22, resultSet.getMetaData().getColumnCount());
+          assertEquals(24, resultSet.getMetaData().getColumnCount());
         }
       }
     }
diff --git a/src/test/java/com/google/cloud/spanner/pgadapter/parsers/ParserTest.java b/src/test/java/com/google/cloud/spanner/pgadapter/parsers/ParserTest.java
index 936a8f94..93ad3296 100644
--- a/src/test/java/com/google/cloud/spanner/pgadapter/parsers/ParserTest.java
+++ b/src/test/java/com/google/cloud/spanner/pgadapter/parsers/ParserTest.java
@@ -706,7 +706,7 @@ public class ParserTest {
     assertEquals(Type.pgNumeric(), Parser.toType(Oid.NUMERIC));
     assertEquals(Type.string(), Parser.toType(Oid.VARCHAR));
     assertEquals(Type.string(), Parser.toType(Oid.TEXT));
-    assertEquals(Type.string(), Parser.toType(Oid.UUID));
+    assertEquals(Type.uuid(), Parser.toType(Oid.UUID));
     assertEquals(Type.pgJsonb(), Parser.toType(Oid.JSONB));
 
     assertEquals(Type.array(Type.int64()), Parser.toType(Oid.INT2_ARRAY));
@@ -723,7 +723,7 @@ public class ParserTest {
     assertEquals(Type.array(Type.pgNumeric()), Parser.toType(Oid.NUMERIC_ARRAY));
     assertEquals(Type.array(Type.string()), Parser.toType(Oid.VARCHAR_ARRAY));
     assertEquals(Type.array(Type.string()), Parser.toType(Oid.TEXT_ARRAY));
-    assertEquals(Type.array(Type.string()), Parser.toType(Oid.UUID_ARRAY));
+    assertEquals(Type.array(Type.uuid()), Parser.toType(Oid.UUID_ARRAY));
     assertEquals(Type.array(Type.pgJsonb()), Parser.toType(Oid.JSONB_ARRAY));
 
     assertThrows(PGException.class, () -> Parser.toType(-1000));