mirror of
https://github.com/cldellow/sqlite-parquet-vtable.git
synced 2025-04-03 09:39:47 +00:00
Allow builds on older versions of sqlite
This commit is contained in:
parent
608ddbbe95
commit
4675bd2d3f
8
CentOS-7.dockerfile
Normal file
8
CentOS-7.dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM centos:7
|
||||||
|
RUN yum install -y epel-release
|
||||||
|
RUN yum install -y sqlite-devel libicu-devel gcc gcc-c++ meson
|
||||||
|
COPY ci/arrow-centos.repo /etc/yum.repos.d/Apache-Arrow.repo
|
||||||
|
RUN yum install -y parquet-devel
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . /src
|
||||||
|
RUN mkdir builddir && meson builddir && cd builddir && ninja-build
|
7
Ubuntu-16.04.dockerfile
Normal file
7
Ubuntu-16.04.dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
RUN apt-get update && apt-get install -y apt-transport-https curl gnupg lsb-release pkg-config libsqlite3-dev libicu-dev gcc g++ meson
|
||||||
|
COPY ci/arrow-ubuntu16.04.list /etc/apt/sources.list.d/apache-arrow.list
|
||||||
|
RUN curl https://dist.apache.org/repos/dist/dev/arrow/KEYS | apt-key add - && apt-get update && apt-get install -y libparquet-dev
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . /src
|
||||||
|
RUN mkdir builddir && meson builddir && cd builddir && ninja
|
@ -2,6 +2,6 @@ FROM ubuntu:18.04
|
|||||||
RUN apt-get update && apt-get install -y apt-transport-https curl gnupg lsb-release pkg-config libsqlite3-dev libicu-dev gcc g++ meson
|
RUN apt-get update && apt-get install -y apt-transport-https curl gnupg lsb-release pkg-config libsqlite3-dev libicu-dev gcc g++ meson
|
||||||
COPY ci/arrow-ubuntu18.04.list /etc/apt/sources.list.d/apache-arrow.list
|
COPY ci/arrow-ubuntu18.04.list /etc/apt/sources.list.d/apache-arrow.list
|
||||||
RUN curl -L -o /usr/share/keyrings/apache-arrow-keyring.gpg https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-keyring.gpg && apt-get update && apt-get install -y libparquet-dev
|
RUN curl -L -o /usr/share/keyrings/apache-arrow-keyring.gpg https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-keyring.gpg && apt-get update && apt-get install -y libparquet-dev
|
||||||
WORKDIR /src/
|
WORKDIR /src
|
||||||
VOLUME /src
|
COPY . /src
|
||||||
CMD mkdir builddir && meson builddir && cd builddir && ninja
|
RUN mkdir builddir && meson builddir && cd builddir && ninja
|
@ -1,8 +1,8 @@
|
|||||||
project('sqlite-parquet-vtable', 'c', 'cpp', default_options:['c_std=c11', 'cpp_std=c++11'])
|
project('sqlite-parquet-vtable', 'c', 'cpp', default_options:['c_std=c11', 'cpp_std=c++11'])
|
||||||
arrow = dependency('arrow', version:'0.15.1')
|
arrow = dependency('arrow', version:'0.15.1')
|
||||||
parquet = dependency('parquet', version: '1.5.1')
|
parquet = dependency('parquet', version: '1.5.1')
|
||||||
sqlite = dependency('sqlite3', version: '>=3.21.0')
|
sqlite = dependency('sqlite3', version: '>=3.7.17')
|
||||||
icu = dependency('icu-i18n')
|
icu = dependency('icu-i18n', version: '>=50.2')
|
||||||
|
|
||||||
dependencies = [arrow, parquet, sqlite, icu]
|
dependencies = [arrow, parquet, sqlite, icu]
|
||||||
sources = ['src/parquet.cc', 'src/parquet_cursor.cc', 'src/parquet_filter.cc', 'src/parquet_table.cc']
|
sources = ['src/parquet.cc', 'src/parquet_cursor.cc', 'src/parquet_filter.cc', 'src/parquet_table.cc']
|
||||||
|
@ -362,12 +362,17 @@ const char *opName(int op) {
|
|||||||
return ">=";
|
return ">=";
|
||||||
case SQLITE_INDEX_CONSTRAINT_MATCH:
|
case SQLITE_INDEX_CONSTRAINT_MATCH:
|
||||||
return "match";
|
return "match";
|
||||||
|
#ifdef SQLITE_INDEX_CONSTRAINT_LIKE
|
||||||
|
//SQLite version >= 3.10.0
|
||||||
case SQLITE_INDEX_CONSTRAINT_LIKE:
|
case SQLITE_INDEX_CONSTRAINT_LIKE:
|
||||||
return "LIKE";
|
return "LIKE";
|
||||||
case SQLITE_INDEX_CONSTRAINT_GLOB:
|
case SQLITE_INDEX_CONSTRAINT_GLOB:
|
||||||
return "GLOB";
|
return "GLOB";
|
||||||
case SQLITE_INDEX_CONSTRAINT_REGEXP:
|
case SQLITE_INDEX_CONSTRAINT_REGEXP:
|
||||||
return "REGEXP";
|
return "REGEXP";
|
||||||
|
#endif
|
||||||
|
#ifdef SQLITE_INDEX_CONSTRAINT_NE
|
||||||
|
//SQLite version >= 3.21.0
|
||||||
case SQLITE_INDEX_CONSTRAINT_NE:
|
case SQLITE_INDEX_CONSTRAINT_NE:
|
||||||
return "!=";
|
return "!=";
|
||||||
case SQLITE_INDEX_CONSTRAINT_ISNOT:
|
case SQLITE_INDEX_CONSTRAINT_ISNOT:
|
||||||
@ -378,6 +383,7 @@ const char *opName(int op) {
|
|||||||
return "IS NULL";
|
return "IS NULL";
|
||||||
case SQLITE_INDEX_CONSTRAINT_IS:
|
case SQLITE_INDEX_CONSTRAINT_IS:
|
||||||
return "IS";
|
return "IS";
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
@ -447,10 +453,15 @@ ConstraintOperator constraintOperatorFromSqlite(int op) {
|
|||||||
return LessThan;
|
return LessThan;
|
||||||
case SQLITE_INDEX_CONSTRAINT_GE:
|
case SQLITE_INDEX_CONSTRAINT_GE:
|
||||||
return GreaterThanOrEqual;
|
return GreaterThanOrEqual;
|
||||||
|
#ifdef SQLITE_INDEX_CONSTRAINT_LIKE
|
||||||
|
//SQLite version >= 3.10.0
|
||||||
case SQLITE_INDEX_CONSTRAINT_LIKE:
|
case SQLITE_INDEX_CONSTRAINT_LIKE:
|
||||||
return Like;
|
return Like;
|
||||||
case SQLITE_INDEX_CONSTRAINT_GLOB:
|
case SQLITE_INDEX_CONSTRAINT_GLOB:
|
||||||
return Glob;
|
return Glob;
|
||||||
|
#endif
|
||||||
|
#ifdef SQLITE_INDEX_CONSTRAINT_NE
|
||||||
|
//SQLite version >= 3.21.0
|
||||||
case SQLITE_INDEX_CONSTRAINT_NE:
|
case SQLITE_INDEX_CONSTRAINT_NE:
|
||||||
return NotEqual;
|
return NotEqual;
|
||||||
case SQLITE_INDEX_CONSTRAINT_ISNOT:
|
case SQLITE_INDEX_CONSTRAINT_ISNOT:
|
||||||
@ -461,6 +472,7 @@ ConstraintOperator constraintOperatorFromSqlite(int op) {
|
|||||||
return IsNull;
|
return IsNull;
|
||||||
case SQLITE_INDEX_CONSTRAINT_IS:
|
case SQLITE_INDEX_CONSTRAINT_IS:
|
||||||
return Is;
|
return Is;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user