File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
v2/bigquery-to-parquet/src/test/java/com/google/cloud/teleport/v2/templates Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ public void testTimePartitionedBigQueryTableToParquet() throws IOException {
164164
165165 // prep expected dataset used for assertion, we expect timestamps that satisfy ROW_RESTRICTION
166166 if (expectedTimestamps .contains (timestampString )) {
167- // Convert to Epoch since timestamps stored in Parquet files are in Epoch
167+ // With AVRO >= 1.12.0 and parquet-avro, timestamps are read as java.time.Instant
168+ // and formatted as ISO-8601 strings in the assertions.
168169 Instant instant = Instant .parse (timestampString );
169- long epochMillis = instant .getEpochSecond () * 1_000_000 + instant .getNano () / 1_000 ;
170170 Map <String , Object > expectedContent = new HashMap <>(generatedRow .getContent ());
171- expectedContent .put (PARTITION_FIELD , epochMillis );
171+ expectedContent .put (PARTITION_FIELD , instant . toString () );
172172 expectedBigQueryRows .add (RowToInsert .of (expectedContent ));
173173 }
174174 }
You can’t perform that action at this time.
0 commit comments