dependabot[bot] opened a new pull request, #837: URL: https://github.com/apache/arrow-go/pull/837
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.50.1 to 1.51.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md">modernc.org/sqlite's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <ul> <li> <p>2026-05-28 v1.52.0:</p> <ul> <li>Add <code>Backup.Remaining</code> and <code>Backup.PageCount</code>, thin wrappers around the existing <code>sqlite3_backup_remaining</code> and <code>sqlite3_backup_pagecount</code> C symbols. Together they expose the per-<code>Step</code> progress counters that the underlying backup object already maintains, enabling progress reporting during online backups without dropping to <code>modernc.org/sqlite/lib</code> directly.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/122">#122</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/122">https://gitlab.com/cznic/sqlite/-/merge_requests/122</a>), thanks Ian Chechin!</li> <li>Drop the redundant second copy in <code>(*conn).columnText</code>, the path that backs every <code>Rows.Scan</code> into a Go <code>string</code> for a TEXT column. The value's bytes are still copied once out of SQLite-owned memory into a fresh Go buffer; that buffer is then reinterpreted as the result string with <code>unsafe.String</code> rather than copied a second time by the implicit <code>string([]byte)</code> conversion. This removes one allocation per TEXT value per row and roughly halves the bytes allocated on that path; on the new <code>BenchmarkColumnTextScan</code> cases it is ~13–20% faster for payloads of 256 B and larger, with no measurable change for very short strings. Purely internal: no API or behavioral change, and the returned string never aliases SQLite's buffer.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/123">#123</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/123">https://gitlab.com/cznic/sqlite/-/merge_requests/123</a>), thanks Ian Chechin!</li> <li>Cache each result column's declared type once per result set in <code>newRows</code> instead of recomputing it on every row. The TEXT branch of <code>Rows.Next</code> calls <code>ColumnTypeDatabaseTypeName</code> for every TEXT column on every row (independent of any DSN flag), which previously did a <code>libc.GoString</code> + <code>strings.ToUpper</code> each time; that lookup is now a single index into a cached, pre-uppercased <code>[]string</code>, and <code>ColumnTypeScanType</code> reads the same cache and drops its per-call <code>strings.ToLower</code>. The declared type is fixed for the lifetime of a prepared statement, so the C round-trip is paid once per column rather than once per column per row, removing exactly 1 alloc + 8 B per TEXT column per row from the <code>Next</code> hot path. The new <code>BenchmarkTextToTimeScan</code> cases show ~7% faster on a 1000-row DATETIME SELECT under <code>_texttotime=1</code>. Purely internal: <code>ColumnTypeDatabaseTypeName< /code> and <code>ColumnTypeScanType</code> return identical values, no API or behavioral change.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/124">#124</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/124">https://gitlab.com/cznic/sqlite/-/merge_requests/124</a>), thanks Ian Chechin!</li> <li>Cache, per result column, the <code>parseTimeFormats</code> index that first parsed a TEXT-stored DATE/DATETIME/TIMESTAMP value, and try that format first on later rows instead of re-walking the list from the top. <code>(*conn).parseTime</code> previously ran <code>time.Parse</code> down the format list on every such row; for the canonical SQLite TEXT datetime format every row paid two failed <code>time.Parse</code> attempts — each allocating a <code>*time.ParseError</code> — before the match. On a 1000-row DATETIME TEXT SELECT this cuts ~50% of allocs/op and ~57% of B/op and is ~37% faster. The fall-through chain is preserved exactly: the seven formats are mutually exclusive, so the cached hint can never select a different match than the in-order scan, and the parsed <code>driver.Value</code> is identical to before. Purely internal: no API or behavioral change.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/125">#125</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/125">https://gitlab.com/cznic/sqlite/-/merge_requests/125</a>), thanks Ian Chechin!</li> </ul> </li> <li> <p>2026-05-28 v1.51.0:</p> <ul> <li>Pool the <code>[]driver.Value</code> slice passed to scalar/aggregate UDF callbacks and to vtab <code>Filter</code>/<code>Insert</code>/<code>Update</code> callbacks, eliminating the dominant per-row allocation on UDF-heavy queries. Benchmarks on a 1000-row, 3-arg noop scalar UDF show ~40% fewer bytes/op and ~15% fewer allocs/op.</li> <li>Document the matching "arguments are not valid past return" contract on <code>vtab.Cursor.Filter</code> and <code>vtab.Updater.Insert</code>/<code>Update</code>, consistent with the existing rule for <code>FunctionImpl.Scalar</code> / <code>AggregateFunction.Step</code> / <code>WindowInverse</code>.</li> <li>Resolves [GitLab issue <a href="https://gitlab.com/cznic/sqlite/issues/226">#226</a>](<a href="https://gitlab.com/cznic/sqlite/-/issues/226">https://gitlab.com/cznic/sqlite/-/issues/226</a>). See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/114">#114</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/114">https://gitlab.com/cznic/sqlite/-/merge_requests/114</a>), thanks Ian Chechin!</li> <li>Add <code>FileControl.FileControlDataVersion</code>, a wrapper around <code>SQLITE_FCNTL_DATA_VERSION</code> for observing pager-cache data-version changes, including those made on the same connection. Useful as a primitive for application-level cache invalidation.</li> <li>Exposed via the idiomatic <code>database/sql</code> escape hatch <code>(*sql.Conn).Raw()</code>, consistent with the existing <code>FileControlPersistWAL</code>.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/115">#115</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/115">https://gitlab.com/cznic/sqlite/-/merge_requests/115</a>), thanks Ian Chechin!</li> <li>Fix a regression where in-memory connections (<code>:memory:</code>, <code>file::memory:</code>, shared-cache memory URIs) were discarded by <code>database/sql</code> after a context-cancelled query, taking the entire in-memory store with them. The fix for <a href="https://gitlab.com/cznic/sqlite/issues/198">#198</a> had added an <code>sqlite3_is_interrupted</code> check to the connection validator that mistakenly applied to in-memory connections too, re-introducing the bug originally fixed by !74. File-backed connections keep the existing behaviour and are still discarded after an interrupt.</li> <li>Resolves [GitLab issue <a href="https://gitlab.com/cznic/sqlite/issues/196">#196</a>](<a href="https://gitlab.com/cznic/sqlite/-/issues/196">https://gitlab.com/cznic/sqlite/-/issues/196</a>). See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/116">#116</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/116">https://gitlab.com/cznic/sqlite/-/merge_requests/116</a>), thanks Ian Chechin!</li> <li>Add an opt-in <code>FunctionImpl.VolatileArgs</code> flag that hands TEXT and BLOB arguments to scalar and aggregate UDF callbacks as zero-copy views (<code>unsafe.String</code>/<code>unsafe.Slice</code>) over SQLite's own value buffers, eliminating the per-argument <code>libc.GoString</code>/<code>make([]byte)</code> copy that the <a href="https://gitlab.com/cznic/sqlite/issues/226">#226</a> slice-pooling left as the remaining per-row allocation. On the same 1000-row, 3-arg (INTEGER/TEXT/BLOB) noop scalar UDF this removes a further ~35% of allocs/op and ~11% of bytes/op on top of <a href="https://gitlab.com/cznic/sqlite/issues/226">#226</a>.</li> <li>The views are valid only for the duration of the callback and must not be retained past return or across rows; a callback that needs to keep a value must copy it. With <code>VolatileArgs</code> unset (the default) arguments keep the existing copied, caller-owned semantics, so the flag is fully backward compatible; it has no effect on integer, float, time, or NULL arguments.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/120">#120</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/120">https://gitlab.com/cznic/sqlite/-/merge_requests/120</a>), thanks Ian Chechin!</li> <li>Extend the opt-in <code>VolatileArgs</code> zero-copy TEXT/BLOB argument access from <a href="https://gitlab.com/cznic/sqlite/issues/120">#120</a> to the virtual-table <code>Cursor.Filter</code> (<code>xFilter</code>) and <code>Updater.Insert</code>/<code>Update</code> (<code>xUpdate</code>) callbacks. A <code>vtab.Module</code> opts in by implementing the new optional <code>vtab.VolatileArgsOpter</code> interface (<code>VolatileArgs() bool</code>); the flag is read once at module registration and shared by every table created from it. On a vtab call carrying one TEXT and one BLOB argument this removes 2 allocs/op (one <code>libc.GoString</code>, one <code>make([]byte)</code>) on each of the Filter and Update paths.</li> <li>The same safety contract as <a href="https://gitlab.com/cznic/sqlite/issues/120">#120</a> applies: the views are valid only for the duration of the callback and must not be retained past return or across rows; a callback that needs to keep a value must copy it. Modules that do not implement <code>VolatileArgsOpter</code> (the default for all existing modules) are byte-for-byte unchanged, and the flag has no effect on integer, float, time, or NULL arguments.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/121">#121</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/121">https://gitlab.com/cznic/sqlite/-/merge_requests/121</a>), thanks Ian Chechin!</li> </ul> </li> <li> <p>2026-05-10 v1.50.1:</p> <ul> <li>Upgrade to <a href="https://sqlite.org/releaselog/3_53_1.html">SQLite 3.53.1</a>.</li> </ul> </li> <li> <p>2026-04-24 v1.50.0:</p> <ul> <li>Upgrade to sqlite-vec <a href="https://github.com/asg017/sqlite-vec/releases/tag/v0.1.9">v0.1.9</a>.</li> <li>Introduce <code>ColumnInfo</code>, enabling dynamic query builders and ORMs to retrieve underlying SQLite C-API metadata (<code>OriginName</code>, <code>TableName</code>, <code>DatabaseName</code>, and <code>DeclType</code>).</li> <li>This feature is exposed via the idiomatic <code>database/sql</code> escape hatch <code>(*sql.Conn).Raw()</code>, avoiding custom statement handles and keeping the standard library workflow intact.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/113">#113</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/113">https://gitlab.com/cznic/sqlite/-/merge_requests/113</a>), thanks Josh Bleecher Snyder!</li> </ul> </li> <li> <p>2026-04-17 v1.49.0: Upgrade to <a href="https://sqlite.org/releaselog/3_53_0.html">SQLite 3.53.0</a>.</p> <ul> <li>Added <code>-DSQLITE_ENABLE_DBPAGE_VTAB</code> to the transpilation. See <a href="https://www.sqlite.org/dbpage.html">"The SQLITE_DBPAGE Virtual Table"</a> for details.</li> </ul> </li> <li> <p>2026-04-06 v1.48.2:</p> <ul> <li>Fix ABI mapping mismatch in the pre-update hook trampoline that caused silent truncation of large 64-bit RowIDs.</li> <li>Ensure the Go trampoline signature correctly aligns with the public <code>sqlite3_preupdate_hook</code> C API, preventing data corruption for high-entropy keys (e.g., Snowflake IDs).</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/98">#98</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/98">https://gitlab.com/cznic/sqlite/-/merge_requests/98</a>), thanks Josh Bleecher Snyder!</li> <li>Fix the memory allocator used in <code>(*conn).Deserialize</code>.</li> <li>Replace <code>tls.Alloc</code> with <code>sqlite3_malloc64</code> to prevent internal allocator corruption. This ensures the buffer is safely owned by SQLite, which may resize or free it due to the <code>SQLITE_DESERIALIZE_RESIZEABLE</code> and <code>SQLITE_DESERIALIZE_FREEONCLOSE</code> flags.</li> <li>Prevent a memory leak by properly freeing the allocated buffer if fetching the main database name fails before handing ownership to SQLite.</li> <li>See [GitLab merge request <a href="https://gitlab.com/cznic/sqlite/issues/100">#100</a>](<a href="https://gitlab.com/cznic/sqlite/-/merge_requests/100">https://gitlab.com/cznic/sqlite/-/merge_requests/100</a>), thanks Josh Bleecher Snyder!</li> <li>Fix <code>(*conn).Deserialize</code> to explicitly reject <code>nil</code> or empty byte slices.</li> <li>Prevent silent database disconnection and connection pool corruption caused by SQLite's default behavior when <code>sqlite3_deserialize</code> receives a 0-length buffer.</li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://gitlab.com/cznic/sqlite/commit/a5f439be99fee4478456048b117d3ca84518d5a7"><code>a5f439b</code></a> CHANGELOG.md: fix release tag</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/41e77be50473b810a66c9beaf6d05d042b2a5556"><code>41e77be</code></a> CHANGELOG.md: document <a href="https://gitlab.com/cznic/sqlite/issues/121">#121</a></li> <li><a href="https://gitlab.com/cznic/sqlite/commit/827df98d7342db30f09454eaedfe87ef3e7277db"><code>827df98</code></a> gofmt -l -s -w vtab/*.go</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/0d384cb7dcab26840d003cee10f3ae7ae08a883c"><code>0d384cb</code></a> Merge branch 'feat/vtab-volatile-args-opt-in' into 'master'</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/06e06d50e3bec5f79dd4ad60847a6d6405b76721"><code>06e06d5</code></a> extend VolatileArgs opt-in to vtab Filter and Updater Insert/Update</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/2486abd8b22026a1047cdf67a1b090f3bae4210f"><code>2486abd</code></a> HACKING.md, CLAUDE.md: this repo is not auto-tagged, tagging is manual</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/d808a8f1a5d9651553bea0877197fe1c73dac189"><code>d808a8f</code></a> CHANGELOG.md: document <a href="https://gitlab.com/cznic/sqlite/issues/120">#120</a></li> <li><a href="https://gitlab.com/cznic/sqlite/commit/fac1cab20834685f75c7201d756608fd71b71824"><code>fac1cab</code></a> Merge branch 'feat/volatile-args-opt-in' into 'master'</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/569614c5d4b0187b9b8c632292d3556ce53e1274"><code>569614c</code></a> address review: empty-BLOB shape parity + re-entrancy note</li> <li><a href="https://gitlab.com/cznic/sqlite/commit/905960c9f78c54b85f29718cc34b69088edb1db2"><code>905960c</code></a> add FunctionImpl.VolatileArgs opt-in for zero-copy TEXT/BLOB args</li> <li>Additional commits viewable in <a href="https://gitlab.com/cznic/sqlite/compare/v1.50.1...v1.51.0">compare view</a></li> </ul> </details> <br /> <details> <summary>Most Recent Ignore Conditions Applied to This Pull Request</summary> | Dependency Name | Ignore Conditions | | --- | --- | | modernc.org/sqlite | [>= 1.34.a, < 1.35] | </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- 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]
