-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
I get an out of memory error on master, but the same script works on the same data using regex_replace build with commit of 2020-Nov-18: https://github.com/gwenn/sqlite-regex-replace-ext/tree/458fe6978349b503095ed7a5ecf637f0b0ec4d38
Here's a minimal working example:
out-of-memory.zip
It contains:
data.csv
libSqlite3Icu.so
libSqlite3IcuReplace-458fe6978349b503095ed7a5ecf637f0b0ec4d38.so
libSqlite3IcuReplace-master.so
script-458fe6978349b503095ed7a5ecf637f0b0ec4d38.sql
script-master.sql
When I run
sqlite3 < script-458fe6978349b503095ed7a5ecf637f0b0ec4d38.sql
it works, when I run
sqlite3 < script-master.sql
it gives out of memory error:
The two sql scripts differ only with the regex_replace extension:
-- -*- mode: sql -*-
.load ./libSqlite3Icu.so
-- https://github.com/gwenn/sqlite-regex-replace-ext/tree/master - gives out of memory:
.load ./libSqlite3IcuReplace-master.so
.mode csv
.separator ',' "\n"
.header on
.import data.csv data
select
case regex_replace(' \(.+', "column", '')
when 'foo' then 'bar'
else ''
end as "column no comments"
from data
;Both scripts run on the latest sqlite (3.35.4), I think regression is introduced by the February commits to this repo:
https://github.com/gwenn/sqlite-regex-replace-ext/commits/master
gsker
Metadata
Metadata
Assignees
Labels
No labels
