davidhcoe commented on PR #2965:
URL: https://github.com/apache/arrow-adbc/pull/2965#issuecomment-2973645258

   Yes, but there is only one row in the result.
   
   ________________________________
   From: David Li ***@***.***>
   Sent: Sunday, June 15, 2025 2:20:04 AM
   To: apache/arrow-adbc ***@***.***>
   Cc: David Coe ***@***.***>; Author ***@***.***>
   Subject: Re: [apache/arrow-adbc] fix(go/adbc/driver/snowflake): Adjust the 
precision of the Timestamp values in the JSON-only path (PR #2965)
   
   
   @lidavidm commented on this pull request.
   
   ________________________________
   
   In 
go/adbc/driver/snowflake/driver_test.go<https://github.com/apache/arrow-adbc/pull/2965#discussion_r2147453833>:
   
   > +     numRows := int(rec.NumRows())
   +       for i := 0; i < numRows; i++ {
   +               dbName := rec.Column(dbIdx).(*array.String).Value(i)
   +               schema := rec.Column(schemaIdx).(*array.String).Value(i)
   +               tbl := rec.Column(tableIdx).(*array.String).Value(i)
   +               column := rec.Column(colIdx).(*array.String).Value(i)
   +               keySeq := rec.Column(seqIdx).(*array.Int64).Value(i)
   +
   +               // Created_on should be a timestamp array
   +               createdCol := rec.Column(createdIdx).(*array.Timestamp)
   +               created := time.Unix(0, 
int64(createdCol.Value(i))*int64(time.Microsecond)).UTC()
   +
   +               // Perform checks
   +               if strings.EqualFold(dbName, catalogName) &&
   +                       strings.EqualFold(schema, schemaName) &&
   +                       strings.EqualFold(tbl, tableName) &&
   +                       strings.EqualFold(column, "id") &&
   +                       keySeq == 1 {
   +
   +                       now := time.Now().UTC()
   +                       diff := now.Sub(created)
   +                       if diff < 0 {
   +                               diff = -diff
   +                       }
   +                       if diff <= 2*time.Minute {
   +                               return true
   +                       }
   +               }
   +       }
   +
   +       return false
   
   
   Is it intended for this loop to stop once it finds one matching row?
   
   —
   Reply to this email directly, view it on 
GitHub<https://github.com/apache/arrow-adbc/pull/2965#pullrequestreview-2928997494>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/ADFTVNOQSUARO37AOZN6NKT3DUGBJAVCNFSM6AAAAAB7I66K46VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDSMRYHE4TONBZGQ>.
   You are receiving this because you authored the thread.Message ID: 
***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to