Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
Change the behviour of the string array back to the old behaviour where accessing the Value function returns a string that is backed by the arrow memory buffer. This avoids data allocations to memory outside of the memory allocator.
The implementation of array.String has been simplified somewhat as part of the new behaviour.
There are a number of places where correct behviour relies on copies of the data being made. To avoid having to fix all of these in the same PR a temporary ValueCopy function has been added to maintain the old semantics. This is being used everywhere the Value function was previously, except for cases where the value is obviously immediately processed, then discarded.
The cases where the VisitCopy function is being used will be address one at a time until we can avoid significant levels of unaccounted memory.
Checklist
Dear Author :wave:, the following checks should be completed (or explicitly dismissed) before merging.
[x] ✏️ Write a PR description, regardless of triviality, to include the value of this PR
[ ] 🔗 Reference related issues
[ ] 🏃 Test cases are included to exercise the new code
[ ] 🧪 If new packages are being introduced to stdlib, link to Working Group discussion notes and ensure it lands under experimental/
[ ] 📖 If language features are changing, ensure docs/Spec.md has been updated
Dear Reviewer(s) :wave:, you are responsible (among others) for ensuring the completeness and quality of the above before approval.
Change the behviour of the string array back to the old behaviour where accessing the Value function returns a string that is backed by the arrow memory buffer. This avoids data allocations to memory outside of the memory allocator.
The implementation of array.String has been simplified somewhat as part of the new behaviour.
There are a number of places where correct behviour relies on copies of the data being made. To avoid having to fix all of these in the same PR a temporary ValueCopy function has been added to maintain the old semantics. This is being used everywhere the Value function was previously, except for cases where the value is obviously immediately processed, then discarded.
The cases where the
VisitCopy
function is being used will be address one at a time until we can avoid significant levels of unaccounted memory.Checklist
Dear Author :wave:, the following checks should be completed (or explicitly dismissed) before merging.
experimental/
docs/Spec.md
has been updatedDear Reviewer(s) :wave:, you are responsible (among others) for ensuring the completeness and quality of the above before approval.