You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "domoritz (via GitHub)" <gi...@apache.org> on 2024/04/02 22:50:35 UTC

[PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

domoritz opened a new pull request, #40960:
URL: https://github.com/apache/arrow/pull/40960

   Merge after #40892


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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1565129671


##########
js/test/generate-test-data.ts:
##########
@@ -750,32 +747,23 @@ function createDate32(length: number, nullBitmap: Uint8Array, values: (number |
 }
 
 function createDate64(length: number, nullBitmap: Uint8Array, values: (number | null)[] = []) {
-    const data = new Int32Array(length * 2).fill(0);
+    const data = new BigInt64Array(length).fill(0n);
     const data32 = createDate32(length, nullBitmap, values);
     iterateBitmap(length, nullBitmap, (i, valid) => {
         if (valid) {
-            const value = data32[i] * 86400000;
-            const hi = Math.trunc(value / 4294967296);
-            const lo = Math.trunc(value - 4294967296 * hi);
-            values[i] = value;
-            data[i * 2 + 0] = lo;
-            data[i * 2 + 1] = hi;
+            data[i] = BigInt(data32[i] * 86400000);
         }
     });
     return data;
 }
 
 function createTimestamp(length: number, nullBitmap: Uint8Array, multiple: number, values: (number | null)[] = []) {
     const mult = 86400 * multiple;
-    const data = new Int32Array(length * 2).fill(0);
+    const data = new BigInt64Array(length).fill(0n);
     const data32 = createDate32(length, nullBitmap, values);

Review Comment:
   Good catch. I rewrite the timestamp generation logic to generate meaningful timestamps. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551343433


##########
js/test/generate-test-data.ts:
##########
@@ -750,32 +747,23 @@ function createDate32(length: number, nullBitmap: Uint8Array, values: (number |
 }
 
 function createDate64(length: number, nullBitmap: Uint8Array, values: (number | null)[] = []) {
-    const data = new Int32Array(length * 2).fill(0);
+    const data = new BigInt64Array(length).fill(0n);
     const data32 = createDate32(length, nullBitmap, values);
     iterateBitmap(length, nullBitmap, (i, valid) => {
         if (valid) {
-            const value = data32[i] * 86400000;
-            const hi = Math.trunc(value / 4294967296);
-            const lo = Math.trunc(value - 4294967296 * hi);
-            values[i] = value;
-            data[i * 2 + 0] = lo;
-            data[i * 2 + 1] = hi;
+            data[i] = BigInt(data32[i] * 86400000);
         }
     });
     return data;
 }
 
 function createTimestamp(length: number, nullBitmap: Uint8Array, multiple: number, values: (number | null)[] = []) {
     const mult = 86400 * multiple;
-    const data = new Int32Array(length * 2).fill(0);
+    const data = new BigInt64Array(length).fill(0n);
     const data32 = createDate32(length, nullBitmap, values);

Review Comment:
   This is a bit weird, don't you want to create timestamp data that does not represent whole days?



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #40960:
URL: https://github.com/apache/arrow/pull/40960#issuecomment-2061637006

   After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 18876b2f266eaa2b7172a18c1518f22489e612c8.
   
   There were 2 benchmark results indicating a performance regression:
   
   - Commit Run on `ursa-i9-9960x` at [2024-04-17 09:59:11Z](https://conbench.ursa.dev/compare/runs/9b8dcd5d4a534c588eeb49f3de0df834...c3b347d295cb4cd4aaa0780daa01f706/)
     - [`dataset-selectivity` (Python) with dataset=nyctaxi_multi_parquet_s3, selectivity=10%](https://conbench.ursa.dev/compare/benchmarks/0661f7d5d80d70c18000db27f49f24ac...0661fa793a83720b8000d789e0cb719d)
   
   - Commit Run on `arm64-m6g-linux-compute` at [2024-04-17 15:35:03Z](https://conbench.ursa.dev/compare/runs/be39721f4de54378908791d69b48780a...6951ab86459c49b89dbf8adaab22c5d3/)
     - [`dataset-read` (Python) with async=True, dataset=nyctaxi_multi_parquet_s3, pre_buffer=true](https://conbench.ursa.dev/compare/benchmarks/0661f994c38a753d8000f7c1fc0d24b5...0661fc8d16ef7f1a8000d967eb89ced1)
   
   The [full Conbench report](https://github.com/apache/arrow/runs/23936924169) has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.


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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz merged PR #40960:
URL: https://github.com/apache/arrow/pull/40960


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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1565129671


##########
js/test/generate-test-data.ts:
##########
@@ -750,32 +747,23 @@ function createDate32(length: number, nullBitmap: Uint8Array, values: (number |
 }
 
 function createDate64(length: number, nullBitmap: Uint8Array, values: (number | null)[] = []) {
-    const data = new Int32Array(length * 2).fill(0);
+    const data = new BigInt64Array(length).fill(0n);
     const data32 = createDate32(length, nullBitmap, values);
     iterateBitmap(length, nullBitmap, (i, valid) => {
         if (valid) {
-            const value = data32[i] * 86400000;
-            const hi = Math.trunc(value / 4294967296);
-            const lo = Math.trunc(value - 4294967296 * hi);
-            values[i] = value;
-            data[i * 2 + 0] = lo;
-            data[i * 2 + 1] = hi;
+            data[i] = BigInt(data32[i] * 86400000);
         }
     });
     return data;
 }
 
 function createTimestamp(length: number, nullBitmap: Uint8Array, multiple: number, values: (number | null)[] = []) {
     const mult = 86400 * multiple;
-    const data = new Int32Array(length * 2).fill(0);
+    const data = new BigInt64Array(length).fill(0n);
     const data32 = createDate32(length, nullBitmap, values);

Review Comment:
   Good catch. I rewrote the timestamp generation logic to generate meaningful timestamps. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1552386081


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {
+    [Type.Date]: { TArray: Int32Array | BigInt64Array };
+    [Type.DateDay]: { TArray: Int32Array };
+    [Type.DateMillisecond]: { TArray: BigInt64Array };
+};
+/** @ignore */
+export interface Date_<T extends Dates = Dates> extends DataType<T> {
+    TArray: DateType[T]['TArray'];
+    TValue: number;
+}
 /** @ignore */
 export class Date_<T extends Dates = Dates> extends DataType<T> {
     constructor(public readonly unit: DateUnit) {
         super(Type.Date as T);

Review Comment:
   `Type.Date` is the only logical type of the three. The unit will be stored separately I think. So I think this is right. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551303039


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {

Review Comment:
   Is there some potential for confusion and typos between `DateType` and `DataType`?



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1552386081


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {
+    [Type.Date]: { TArray: Int32Array | BigInt64Array };
+    [Type.DateDay]: { TArray: Int32Array };
+    [Type.DateMillisecond]: { TArray: BigInt64Array };
+};
+/** @ignore */
+export interface Date_<T extends Dates = Dates> extends DataType<T> {
+    TArray: DateType[T]['TArray'];
+    TValue: number;
+}
 /** @ignore */
 export class Date_<T extends Dates = Dates> extends DataType<T> {
     constructor(public readonly unit: DateUnit) {
         super(Type.Date as T);

Review Comment:
   `Type.Date` is the only logical type of the three. So I think this is right. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1552377309


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {

Review Comment:
   It's not exported so won't be an issue for users. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551352350


##########
js/test/unit/vector/date-vector-tests.ts:
##########
@@ -15,34 +15,62 @@
 // specific language governing permissions and limitations
 // under the License.
 
-import { DateDay, DateMillisecond, RecordBatchReader, Table, vectorFromArray } from 'apache-arrow';
+import {
+    DateDay, DateMillisecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, RecordBatchReader,
+    Table, vectorFromArray
+} from 'apache-arrow';
+
+describe(`TimestampVector`, () => {
+    test(`Dates are stored in TimestampMillisecond`, () => {
+        const date = new Date('2023-02-01T12:34:56Z');
+        const vec = vectorFromArray([date]);
+        expect(vec.type).toBeInstanceOf(TimestampMillisecond);
+        expect(vec.get(0)).toBe(date.getTime());
+    });
+
+    test(`Correctly get back TimestampMicrosecond from Date`, () => {
+        const date = new Date('2023-02-01T12:34:56Z');
+        const vec = vectorFromArray([date, 0.5], new TimestampMicrosecond);
+        expect(vec.type).toBeInstanceOf(TimestampMicrosecond);
+        expect(vec.get(0)).toBe(date.getTime());
+        expect(vec.get(1)).toBe(0.5);
+    });
+
+    test(`Correctly get back TimestampNanosecond from Date`, () => {
+        const date = new Date('2023-02-01T12:34:56Z');
+        const vec = vectorFromArray([date, 0.5], new TimestampNanosecond);
+        expect(vec.type).toBeInstanceOf(TimestampNanosecond);
+        expect(vec.get(0)).toBe(date.getTime());
+        expect(vec.get(1)).toBe(0.5);
+    });
+});

Review Comment:
   Why not also test TimestampSecond here?



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1567724076


##########
js/test/unit/builders/utils.ts:
##########
@@ -32,22 +32,14 @@ const randnulls = <T, TNull = null>(values: T[], n: TNull = <any>null) => values
 export const randomBytes = (length: number) => fillRandom(Uint8Array, length);
 
 export const stringsNoNulls = (length = 20) => Array.from({ length }, (_) => randomString(1 + (Math.trunc(Math.random() * 19))));
-export const timestamp32sNoNulls = (length = 20, now = Math.trunc(Date.now() / 86400000)) =>
+export const timestampNoNulls = (length = 20, now = Math.trunc(Date.now() / 86400000)) =>
     Array.from({ length }, (_) => (Math.trunc(now + (rand() * 10000 * (rand() > 0.5 ? -1 : 1)))) * 86400000);

Review Comment:
   Good catch. I changed it to use `100000` which gives us negative numbers as well. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551307115


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {
+    [Type.Date]: { TArray: Int32Array | BigInt64Array };
+    [Type.DateDay]: { TArray: Int32Array };
+    [Type.DateMillisecond]: { TArray: BigInt64Array };
+};
+/** @ignore */
+export interface Date_<T extends Dates = Dates> extends DataType<T> {
+    TArray: DateType[T]['TArray'];
+    TValue: number;
+}
 /** @ignore */
 export class Date_<T extends Dates = Dates> extends DataType<T> {
     constructor(public readonly unit: DateUnit) {
         super(Type.Date as T);

Review Comment:
   For the record, why is it using `Type.Date` here instead of one of the unit-specific ones? This seems to ignore the `unit` argument, but I'm probably missing something since I don't know TypeScript :-)



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551349104


##########
js/test/unit/builders/utils.ts:
##########
@@ -32,22 +32,14 @@ const randnulls = <T, TNull = null>(values: T[], n: TNull = <any>null) => values
 export const randomBytes = (length: number) => fillRandom(Uint8Array, length);
 
 export const stringsNoNulls = (length = 20) => Array.from({ length }, (_) => randomString(1 + (Math.trunc(Math.random() * 19))));
-export const timestamp32sNoNulls = (length = 20, now = Math.trunc(Date.now() / 86400000)) =>
+export const timestampNoNulls = (length = 20, now = Math.trunc(Date.now() / 86400000)) =>
     Array.from({ length }, (_) => (Math.trunc(now + (rand() * 10000 * (rand() > 0.5 ? -1 : 1)))) * 86400000);

Review Comment:
   Given the scale of `rand() * 10000` compared to `now`, this will never produce timestamps with a negative value, right?



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1552376861


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {
+    [Type.Date]: { TArray: Int32Array | BigInt64Array };

Review Comment:
   `Type.Date` is the generic one that can be one of the other two. It's the actual physical type (8 in the flatbuffers) while the other two are the actual types people can instantiate. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1552427192


##########
js/test/unit/vector/date-vector-tests.ts:
##########
@@ -15,34 +15,62 @@
 // specific language governing permissions and limitations
 // under the License.
 
-import { DateDay, DateMillisecond, RecordBatchReader, Table, vectorFromArray } from 'apache-arrow';
+import {
+    DateDay, DateMillisecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, RecordBatchReader,
+    Table, vectorFromArray
+} from 'apache-arrow';
+
+describe(`TimestampVector`, () => {
+    test(`Dates are stored in TimestampMillisecond`, () => {
+        const date = new Date('2023-02-01T12:34:56Z');
+        const vec = vectorFromArray([date]);
+        expect(vec.type).toBeInstanceOf(TimestampMillisecond);
+        expect(vec.get(0)).toBe(date.getTime());
+    });
+
+    test(`Correctly get back TimestampMicrosecond from Date`, () => {
+        const date = new Date('2023-02-01T12:34:56Z');
+        const vec = vectorFromArray([date, 0.5], new TimestampMicrosecond);
+        expect(vec.type).toBeInstanceOf(TimestampMicrosecond);
+        expect(vec.get(0)).toBe(date.getTime());
+        expect(vec.get(1)).toBe(0.5);
+    });
+
+    test(`Correctly get back TimestampNanosecond from Date`, () => {
+        const date = new Date('2023-02-01T12:34:56Z');
+        const vec = vectorFromArray([date, 0.5], new TimestampNanosecond);
+        expect(vec.type).toBeInstanceOf(TimestampNanosecond);
+        expect(vec.get(0)).toBe(date.getTime());
+        expect(vec.get(1)).toBe(0.5);
+    });
+});

Review Comment:
   I added `TimestampSecond`. I originally didn't since it doesn't work with 0.5. 



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


Re: [PR] GH-40959: [JS] Store Timestamps in 64 bits [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551301378


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {
+    [Type.Date]: { TArray: Int32Array | BigInt64Array };

Review Comment:
   Hmm... in the Arrow format, there are two date representation: days and milliseconds. So what is this third one?



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