Skip to content
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
5 changes: 5 additions & 0 deletions sdks/java/io/google-cloud-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ applyJavaNature(
description = "Apache Beam :: SDKs :: Java :: IO :: Google Cloud Platform"
ext.summary = "IO library to read and write Google Cloud Platform systems from Beam."

tasks.withType(Test).configureEach {
// Open java.nio for Apache Arrow direct memory access under Java 17+
jvmArgs '--add-opens=java.base/java.nio=ALL-UNNAMED'
}

dependencies {
implementation(enforcedPlatform(library.java.google_cloud_platform_libraries_bom))
implementation project(path: ":model:pipeline", configuration: "shadow")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
/** Unit tests form {@link BeamRowToStorageApiProto}. */
@RunWith(JUnit4.class)
public class BeamRowToStorageApiProtoTest {
private static final LocalTime TEST_TIME_MICROS = LocalTime.of(12, 30, 45, 123_456_000);
private static final LocalDateTime TEST_DATETIME_MICROS =
LocalDateTime.of(2024, 1, 15, 12, 30, 45, 123_456_000);
private static final java.time.Instant TEST_INSTANT_MICROS =
java.time.Instant.parse("2024-01-15T12:30:45.123456Z");
private static final java.time.Instant TEST_INSTANT_NANOS =
java.time.Instant.parse("2024-01-15T12:30:45.123456789Z");

Expand Down Expand Up @@ -254,9 +259,9 @@ public class BeamRowToStorageApiProtoTest {
.withFieldValue("arrayNullValue", null)
.withFieldValue("iterableValue", ImmutableList.of("blue", "red", "two", "one"))
.withFieldValue("sqlDateValue", LocalDate.now(ZoneOffset.UTC))
.withFieldValue("sqlTimeValue", LocalTime.now(ZoneOffset.UTC))
.withFieldValue("sqlDatetimeValue", LocalDateTime.now(ZoneOffset.UTC))
.withFieldValue("sqlTimestampValue", java.time.Instant.now().plus(123, ChronoUnit.MICROS))
.withFieldValue("sqlTimeValue", TEST_TIME_MICROS)
.withFieldValue("sqlDatetimeValue", TEST_DATETIME_MICROS)
.withFieldValue("sqlTimestampValue", TEST_INSTANT_MICROS)
.withFieldValue("enumValue", TEST_ENUM.valueOf("RED"))
.build();
private static final Map<String, Object> BASE_PROTO_EXPECTED_FIELDS =
Expand Down
Loading