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

   > > I think this should have a test in Go. That probably requires creating a 
table that has a primary key? There should be existing tests for returning a 
schema whose setup can be reused for that, I think.
   > 
   > I started in Go and deleted it because it was specific to a single 
instance. I don’t think it would be too hard to do in Go what exists in C#.
   
   Actually, the problem doesn't occur in Go. The problem was happening because 
the schema was reported by the Go driver as microseconds and the value was in 
nanoseconds, so when the IArrowArray.ValueAt method was called, it was failing 
on the internal ValueConverter at:
   
   ```
    ArrowTypeId.Timestamp:
                       return (array, index) => 
((TimestampArray)array).GetTimestamp(index);
    ```                 
    which goes to the internal TimstampArray here:
    
    ```
    switch (type.Unit)
   {
       case TimeUnit.Nanosecond:
           ticks = value / 100;
           break;
       case TimeUnit.Microsecond:
           ticks = value * 10; // <------ was incorrect because unit was 
microsecond and value was nanosecond
           break;
    ```
       
      All of that to say, I don't know what a separate Go test will really do 
for that scenario.                


-- 
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