You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "ibgreen (via GitHub)" <gi...@apache.org> on 2026/10/13 15:07:38 UTC

[PR] fix: build null validity predicates without dynamic code generation [arrow-js]

ibgreen opened a new pull request, #501:
URL: https://github.com/apache/arrow-js/pull/501

   ## Goals
   
   Allow Arrow builders to work in runtimes that prohibit `eval` and the `Function` constructor, without carrying a downstream bundle patch.
   
   Closes #54.
   
   ## Changes
   
   - Replace dynamically compiled switch statements with captured validity predicates.
   - Preserve the always-valid empty case and use direct comparisons for a single sentinel, including NaN.
   - Use a snapshot Set for multiple sentinels, retaining primitive type distinctions and positive/negative-zero matching. Membership operates on supplied values directly rather than serializing them; object/symbol sentinels therefore use identity.
   - Cover null, undefined, NaN, zeros, bigint, quoted/multiline strings, duplicates, input-list mutation and a blocked Function constructor.
   - Remove the generated-source serializer and update the helper documentation.
   
   ## Verification
   
   - New predicate tests plus existing builder conformance: 447 passed.
   - Final predicate rerun: 12 passed; changed-file ESLint passed.
   - Source build type check: `tsc --noEmit -p tsconfig/tsconfig.esnext.esm.json` passed.
   - Additional boundary checks passed with Node's `--disallow-code-generation-from-strings` flag.
   - General root type-check commands report errors outside these changed files (ix resolution and existing bin/test/dependency typings); no compiler configuration is changed here.
   
   The old switch-vs-Map performance claim is removed rather than retained for a different implementation. The single-sentinel fast path avoids Set lookup; multi-sentinel performance remains a review consideration. This does not claim to resolve any npm scanning hold.
   


-- 
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] fix: build null validity predicates without dynamic code generation [arrow-js]

Posted by "p-linnane (via GitHub)" <gi...@apache.org>.
p-linnane commented on PR #501:
URL: https://github.com/apache/arrow-js/pull/501#issuecomment-6225750078

   `@azure/storage-blob` 12.34.0 depends on `apache-arrow@^21.1.0`, so `createIsValidFunction` now ships in GitHub's CodeQL Action bundle (v4.38.3 and v4.39.0), where static analysis can't verify the generated function. Could this land in a 21.x release so it reaches `@azure/storage-blob` through its existing range?
   


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