You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/05/17 15:56:24 UTC

[GitHub] [arrow] westonpace commented on a diff in pull request #35496: GH-33856: [C#] Implement C Data Interface for C#

westonpace commented on code in PR #35496:
URL: https://github.com/apache/arrow/pull/35496#discussion_r1196740511


##########
csharp/test/Apache.Arrow.Tests/TestData.cs:
##########
@@ -48,7 +50,7 @@ public static RecordBatch CreateSampleRecordBatch(int length, int columnSetCount
                 builder.Field(CreateField(Date32Type.Default, i));
                 builder.Field(CreateField(Date64Type.Default, i));
                 builder.Field(CreateField(Time32Type.Default, i));
-                builder.Field(CreateField(Time64Type.Default, i));

Review Comment:
   @davidhcoe is correct.  Per [the spec](https://github.com/apache/arrow/blob/main/format/Schema.fbs#L221-L240):
   
   ```
   enum TimeUnit: short { SECOND, MILLISECOND, MICROSECOND, NANOSECOND }
   
   /// Time is either a 32-bit or 64-bit signed integer type representing an
   /// elapsed time since midnight, stored in either of four units: seconds,
   /// milliseconds, microseconds or nanoseconds.
   ///
   /// The integer `bitWidth` depends on the `unit` and must be one of the following:
   /// * SECOND and MILLISECOND: 32 bits
   /// * MICROSECOND and NANOSECOND: 64 bits
   ///
   /// The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
   /// (exclusive), adjusted for the time unit (for example, up to 86400000
   /// exclusive for the MILLISECOND unit).
   /// This definition doesn't allow for leap seconds. Time values from
   /// measurements with leap seconds will need to be corrected when ingesting
   /// into Arrow (for example by replacing the value 86400 with 86399).
   table Time {
     unit: TimeUnit = MILLISECOND;
     bitWidth: int = 32;
   }
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org