@@ -96,7 +96,7 @@ private BigQueryArrowResultSet(
9696 BigQuery bigQuery )
9797 throws SQLException {
9898 super (bigQuery , statement , schema , isNested );
99- LOG .finestTrace ("<init>" , "++enter++" );
99+ LOG .finestTrace ("<init>" );
100100 this .totalRows = totalRows ;
101101 this .buffer = buffer ;
102102 this .currentNestedBatch = currentNestedBatch ;
@@ -181,7 +181,7 @@ private ArrowDeserializer(ArrowSchema arrowSchema) throws IOException {
181181 }
182182
183183 private void deserializeArrowBatch (ArrowRecordBatch batch ) throws SQLException {
184- LOG .finestTrace ("deserializeArrowBatch" , "++enter++" );
184+ LOG .finestTrace ("deserializeArrowBatch" );
185185 try {
186186 if (vectorSchemaRoot != null ) {
187187 // Clear vectorSchemaRoot before populating a new batch
@@ -276,7 +276,7 @@ else if (this.currentBatchRowIndex < this.vectorSchemaRoot.getRowCount()) {
276276 }
277277
278278 private Object getObjectInternal (int columnIndex ) throws SQLException {
279- LOG .finestTrace ("getObjectInternal" , "++enter++" );
279+ LOG .finestTrace ("getObjectInternal" );
280280 checkClosed ();
281281 Object value ;
282282 if (this .isNested ) {
@@ -318,26 +318,29 @@ private Object getObjectInternal(int columnIndex) throws SQLException {
318318 public Object getObject (int columnIndex ) throws SQLException {
319319
320320 // columnIndex is SQL index starting at 1
321- LOG .finestTrace ("getObject" , "++enter++" );
321+ LOG .finestTrace ("getObject" );
322322 checkClosed ();
323323 Object value = getObjectInternal (columnIndex );
324324 if (value == null ) {
325325 return null ;
326326 }
327327
328328 if (this .isNested && columnIndex == 1 ) {
329- return this .bigQueryTypeCoercer .coerceTo (Integer .class , value );
329+ return this .bigQueryTypeCoercer .coerceTo (Integer .class , value , this . LOG );
330330 }
331331
332332 if (this .isNested && columnIndex == 2 ) {
333333 Field arrayField = this .schema .getFields ().get (0 );
334334 if (isStruct (arrayField )) {
335- return new BigQueryArrowStruct (arrayField .getSubFields (), (JsonStringHashMap <?, ?>) value );
335+ return new BigQueryArrowStruct (
336+ arrayField .getSubFields (),
337+ (JsonStringHashMap <?, ?>) value ,
338+ this .LOG .getArrowStructLogger ());
336339 }
337340 Class <?> targetClass =
338341 BigQueryJdbcTypeMappings .standardSQLToJavaTypeMapping .get (
339342 arrayField .getType ().getStandardType ());
340- return this .bigQueryTypeCoercer .coerceTo (targetClass , value );
343+ return this .bigQueryTypeCoercer .coerceTo (targetClass , value , this . LOG );
341344 }
342345
343346 int fieldIndex = this .isNested ? 0 : columnIndex - 1 ;
@@ -355,7 +358,7 @@ public Object getObject(int columnIndex) throws SQLException {
355358 newList .add (null );
356359 }
357360 }
358- return new BigQueryArrowArray (fieldSchema , newList );
361+ return new BigQueryArrowArray (fieldSchema , newList , this . LOG . getArrowArrayLogger () );
359362 } else if (elementTypeName == StandardSQLTypeName .RANGE ) {
360363 JsonStringArrayList <String > newList = new JsonStringArrayList <>();
361364 for (Object item : originalList ) {
@@ -375,11 +378,14 @@ public Object getObject(int columnIndex) throws SQLException {
375378 newList .add (null );
376379 }
377380 }
378- return new BigQueryArrowArray (fieldSchema , newList );
381+ return new BigQueryArrowArray (fieldSchema , newList , this . LOG . getArrowArrayLogger () );
379382 }
380- return new BigQueryArrowArray (fieldSchema , originalList );
383+ return new BigQueryArrowArray (fieldSchema , originalList , this . LOG . getArrowArrayLogger () );
381384 } else if (isStruct (fieldSchema )) {
382- return new BigQueryArrowStruct (fieldSchema .getSubFields (), (JsonStringHashMap <?, ?>) value );
385+ return new BigQueryArrowStruct (
386+ fieldSchema .getSubFields (),
387+ (JsonStringHashMap <?, ?>) value ,
388+ this .LOG .getArrowStructLogger ());
383389 } else if (fieldSchema .getType ().getStandardType () == StandardSQLTypeName .RANGE ) {
384390 JsonStringHashMap <?, ?> rangeMap = (JsonStringHashMap <?, ?>) value ;
385391 Object start = rangeMap .get ("start" );
@@ -403,7 +409,7 @@ public Object getObject(int columnIndex) throws SQLException {
403409 Class <?> targetClass =
404410 BigQueryJdbcTypeMappings .standardSQLToJavaTypeMapping .get (
405411 fieldSchema .getType ().getStandardType ());
406- return this .bigQueryTypeCoercer .coerceTo (targetClass , value );
412+ return this .bigQueryTypeCoercer .coerceTo (targetClass , value , this . LOG );
407413 }
408414 }
409415
@@ -430,17 +436,17 @@ private String formatRangeElement(Object element, StandardSQLTypeName elementTyp
430436 switch (elementType ) {
431437 case DATE :
432438 // Arrow gives DATE as an Integer (days since epoch)
433- Date date = this .bigQueryTypeCoercer .coerceTo (Date .class , (Integer ) element );
439+ Date date = this .bigQueryTypeCoercer .coerceTo (Date .class , (Integer ) element , this . LOG );
434440 return date .toString ();
435441 case DATETIME :
436442 // Arrow gives DATETIME as a LocalDateTime
437443 Timestamp dtTs =
438- this .bigQueryTypeCoercer .coerceTo (Timestamp .class , (LocalDateTime ) element );
439- return this .bigQueryTypeCoercer .coerceTo (String .class , dtTs );
444+ this .bigQueryTypeCoercer .coerceTo (Timestamp .class , (LocalDateTime ) element , this . LOG );
445+ return this .bigQueryTypeCoercer .coerceTo (String .class , dtTs , this . LOG );
440446 case TIMESTAMP :
441447 // Arrow gives TIMESTAMP as a Long (microseconds since epoch)
442- Timestamp ts = this .bigQueryTypeCoercer .coerceTo (Timestamp .class , (Long ) element );
443- return this .bigQueryTypeCoercer .coerceTo (String .class , ts );
448+ Timestamp ts = this .bigQueryTypeCoercer .coerceTo (Timestamp .class , (Long ) element , this . LOG );
449+ return this .bigQueryTypeCoercer .coerceTo (String .class , ts , this . LOG );
444450 default :
445451 // Fallback for any other unexpected type
446452 return element .toString ();
@@ -460,7 +466,7 @@ public void close() {
460466
461467 @ Override
462468 public boolean isBeforeFirst () throws SQLException {
463- LOG .finestTrace ("isBeforeFirst" , "++enter++" );
469+ LOG .finestTrace ("isBeforeFirst" );
464470 checkClosed ();
465471 if (this .isNested ) {
466472 return this .nestedRowIndex < this .fromIndex ;
@@ -471,14 +477,14 @@ public boolean isBeforeFirst() throws SQLException {
471477
472478 @ Override
473479 public boolean isAfterLast () throws SQLException {
474- LOG .finestTrace ("isAfterLast" , "++enter++" );
480+ LOG .finestTrace ("isAfterLast" );
475481 checkClosed ();
476482 return this .afterLast ;
477483 }
478484
479485 @ Override
480486 public boolean isFirst () throws SQLException {
481- LOG .finestTrace ("isFirst" , "++enter++" );
487+ LOG .finestTrace ("isFirst" );
482488 checkClosed ();
483489 if (this .isNested ) {
484490 return this .nestedRowIndex == this .fromIndex ;
@@ -489,7 +495,7 @@ public boolean isFirst() throws SQLException {
489495
490496 @ Override
491497 public boolean isLast () throws SQLException {
492- LOG .finestTrace ("isLast" , "++enter++" );
498+ LOG .finestTrace ("isLast" );
493499 checkClosed ();
494500 if (this .isNested ) {
495501 return this .nestedRowIndex == this .toIndexExclusive - 1 ;
0 commit comments