@@ -82,7 +82,7 @@ public JDBCScanner(String driverLocation, JDBCScanContext scanContext) {
8282 this .isOracleDriver = scanContext .getDriverClassName ().toLowerCase (Locale .ROOT ).contains ("oracle" );
8383 this .isPostgresDriver = scanContext .getDriverClassName ().toLowerCase (Locale .ROOT ).contains ("postgresql" );
8484 String driverClassLower = scanContext .getDriverClassName ().toLowerCase (Locale .ROOT );
85- this .isBigQueryDriver = driverClassLower .contains ("bigquery" ) || driverClassLower . contains ( "googlebigquery" ) ;
85+ this .isBigQueryDriver = driverClassLower .contains ("bigquery" );
8686 this .queryTimeZone = resolveQueryTimeZone (scanContext .getQueryTimeZone ());
8787 }
8888
@@ -313,12 +313,12 @@ public List<Object[]> getNextChunk() throws Exception {
313313 if (shouldConvertPostgresTimestampWithTimezoneColumn (i )) {
314314 Timestamp timestampValue =
315315 resultObject instanceof Timestamp ? (Timestamp ) resultObject : resultSet .getTimestamp (i + 1 );
316- dataColumn [resultNumRows ] = convertPostgresTimestampWithTimezoneValue (timestampValue );
316+ dataColumn [resultNumRows ] = convertTimestampWithTimezoneValue (timestampValue );
317317 } else if (shouldConvertBigQueryTimestampColumn (i )) {
318318 Timestamp timestampValue =
319319 resultObject instanceof Timestamp ? (Timestamp ) resultObject : resultSet .getTimestamp (i + 1 );
320320 // BigQuery TIMESTAMP is UTC; reuse the same UTC→queryTZ adjustment.
321- dataColumn [resultNumRows ] = convertPostgresTimestampWithTimezoneValue (timestampValue );
321+ dataColumn [resultNumRows ] = convertTimestampWithTimezoneValue (timestampValue );
322322 } else {
323323 dataColumn [resultNumRows ] = resultObject ;
324324 }
@@ -452,14 +452,14 @@ private Time convertPostgresTimeWithTimezoneValue(Time sourceValue) {
452452 return new Time (sourceMillis + computeTimezoneOffsetMillis (sourceMillis ));
453453 }
454454
455- private Timestamp convertPostgresTimestampWithTimezoneValue (Timestamp sourceValue ) {
455+ private Timestamp convertTimestampWithTimezoneValue (Timestamp sourceValue ) {
456456 if (sourceValue == null || queryTimeZone == null ) {
457457 return sourceValue ;
458458 }
459459 // Avoid Timestamp.toInstant() as it uses the proleptic Gregorian calendar,
460460 // while java.sql.Timestamp uses the Julian calendar for dates before October 15, 1582.
461461 // This calendar mismatch causes incorrect date conversion for very old dates (e.g., year 0001).
462- // Instead, adjust via epoch millis like convertPostgresTimeWithTimezoneValue does.
462+ // Instead, adjust via epoch millis like convertTimeWithTimezoneValue does.
463463 long sourceMillis = sourceValue .getTime ();
464464 int nanos = sourceValue .getNanos ();
465465 Timestamp result = new Timestamp (sourceMillis + computeTimezoneOffsetMillis (sourceMillis ));
0 commit comments