-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-43118: [JS] Add interval for unit MONTH_DAY_NANO #43117
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
In the case of PARQUET issues on JIRA the title also supports:
See also: |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Please fix the CI issues.
I'll defer to @trxcllnt for a final ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add our license header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the license
Could you fix lint failures? https://github.com/apache/arrow/actions/runs/9760275633/job/26955306166?pr=43117#step:5:150
|
I updated it |
@handstuyennn Thanks for the PR. Would you mind also removing these two lines so the new functionality is validated against the other Arrow implementations? |
89ae4a3
to
01a0288
Compare
I updated this |
Can you fix the integration test? |
@handstuyennn could you look into the last remaining test so we can merge this? |
I will handle it this weekend |
01a0288
to
ded7890
Compare
5bd3763
to
ade6c83
Compare
|
||
generate_month_day_nano_interval_case(), | ||
generate_month_day_nano_interval_case() | ||
.skip_tester('JS'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why skip this test? Isn't this the point of this pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @domoritz The issues about interval data in JSON format just been fixed in the latest commit. Please check it. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to revisit changes to vectorloader.ts
.
(data.type.unit === IntervalUnit.MONTH_DAY_NANO) | ||
? getIntervalMonthDayNano(data as Data<IntervalMonthDayNano>, index) | ||
: (data.type.unit === IntervalUnit.DAY_TIME) | ||
? getIntervalDayTime(data as Data<IntervalDayTime>, index) | ||
: getIntervalYearMonth(data as Data<IntervalYearMonth>, index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we split these conditions out into separate methods and assign them to the GetVisitor prototype separately?
(data.type.unit === IntervalUnit.MONTH_DAY_NANO) | ||
? setIntervalMonthDaynano(data as Data<IntervalMonthDayNano>, index, value) | ||
: (data.type.unit === IntervalUnit.DAY_TIME) | ||
? setIntervalDayTime(data as Data<IntervalDayTime>, index, value) | ||
: setIntervalYearMonth(data as Data<IntervalYearMonth>, index, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here.
Rationale for this change
This PR handle for Interval type with MONTH_DAY_NANO unit, This is currently not supported in Arrow JS implementation.
See #43118
What changes are included in this PR?
Handle Interval with MONTH_DAY_NAO unit with relations
Adding tests for builder and unittest
Are these changes tested?
Yes. Unit tests have been added