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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]