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/03/27 22:21:34 UTC
[PR] GH-40851: [JS] Fix nullcount and make vectors created from typed arrays not nullable [arrow]
domoritz opened a new pull request, #40852:
URL: https://github.com/apache/arrow/pull/40852
(no comment)
--
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-40851: [JS] Fix nullcount and make vectors created from typed arrays not nullable [arrow]
Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz merged PR #40852:
URL: https://github.com/apache/arrow/pull/40852
--
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-40851: [JS] Fix nullcount and make vectors created from typed arrays not nullable [arrow]
Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40852:
URL: https://github.com/apache/arrow/pull/40852#discussion_r1542111803
##########
js/src/data.ts:
##########
@@ -177,16 +180,16 @@ export class Data<T extends DataType = DataType> {
// if we have a nullBitmap, truncate + slice and set it over the pre-filled 1s
if (this.nullCount > 0) {
nullBitmap.set(truncateBitmap(offset, length, this.nullBitmap), 0);
+ Object.assign(this, { nullBitmap });
+ } else {
+ Object.assign(this, { nullBitmap, _nullCount: 0 });
Review Comment:
Here we can set the null count to 0 since we just created a new nullBitmap that is all valid values.
--
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-40851: [JS] Fix nullcount and make vectors created from typed arrays not nullable [arrow]
Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40852:
URL: https://github.com/apache/arrow/pull/40852#discussion_r1542111250
##########
js/src/data.ts:
##########
@@ -177,16 +180,16 @@ export class Data<T extends DataType = DataType> {
// if we have a nullBitmap, truncate + slice and set it over the pre-filled 1s
if (this.nullCount > 0) {
nullBitmap.set(truncateBitmap(offset, length, this.nullBitmap), 0);
+ Object.assign(this, { nullBitmap });
Review Comment:
If we assign null count here, the update to the null count will be wrong. Also, we know that the null count has not yet changed so there is no need to set it 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-40851: [JS] Fix nullcount and make vectors created from typed arrays not nullable [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #40852:
URL: https://github.com/apache/arrow/pull/40852#issuecomment-2036866404
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 5b09059ae40164c173a6ef593ab7b463b24d431d.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/23437163332) has more details. It also includes information about 14 possible false positives 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-40851: [JS] Fix nullcount and make vectors created from typed arrays not nullable [arrow]
Posted by "domoritz (via GitHub)" <gi...@apache.org>.
domoritz commented on code in PR #40852:
URL: https://github.com/apache/arrow/pull/40852#discussion_r1542112852
##########
js/src/vector.ts:
##########
@@ -445,7 +445,7 @@ export function makeVector(init: any) {
if (init instanceof DataView) {
init = new Uint8Array(init.buffer);
}
- const props = { offset: 0, length: init.length, nullCount: 0, data: init };
+ const props = { offset: 0, length: init.length, nullCount: -1, data: init };
Review Comment:
`_nullCount != 0 && (!nullBitmap || nullBitmap.byteLength == 0)` is not nullable so we set `-1` as the null count here to mark the data as not nullable. `makeData` will always create a null bitmap so I'm not sure why we need to check for no bitmap.
--
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