NULL query using SQLITE dialect causes OGR to fail with "ERROR 1 Unhandled constraint operator : 70"
|Reported by:||snorris||Owned by:||warmerdam|
ogrinfo and ogr2ogr fail with this message when using
-dialect "SQLITE" and SQL conditions
IS NULL or
IS NOT NULL
$ wget https://www.mapbox.com/help/data/stations.zip $ unzip stations.zip $ ogrinfo stations.shp -sql "SELECT * FROM stations WHERE name IS NOT NULL" -dialect "SQLITE" INFO: Open of `stations.shp' using driver `ESRI Shapefile' successful. ERROR 1: In ExecuteSQL(): sqlite3_step(SELECT * FROM stations WHERE name IS NOT NULL): Unhandled constraint operator : 70 $ ogrinfo --version GDAL 2.2.1, released 2017/06/23 $ brew info gdal2 osgeo/osgeo4mac/gdal2: stable 2.2.2 (bottled), HEAD [keg-only] GDAL: Geospatial Data Abstraction Library http://www.gdal.org/ /usr/local/Cellar/gdal2/2.2.1_3 (243 files, 44.7MB) * Built from source on 2017-09-20 at 15:26:50 with: --with-complete --with-libkml --with-unsupported --with-postgresql From: https://github.com/osgeo/homebrew-osgeo4mac/blob/master/Formula/gdal2.rb ==> Dependencies Required: libpng ✘, jpeg ✔, giflib ✔, libtiff ✘, libgeotiff ✔, proj ✔, geos ✔, sqlite ✔, pcre ✔, freexl ✔, libspatialite ✔ Optional: postgresql ✘, mysql ✘, ogdi ✘, armadillo ✘, sfcgal ✔ ==> Requirements Build: java >= 1.7 ✔ Optional: java >= 1.7 ✔ ==> Options --with-armadillo Build with Armadillo accelerated TPS transforms. --with-complete Use additional Homebrew libraries to provide more drivers. --with-java Build with java support --with-libkml Build with Google's libkml driver (requires libkml-dev >= 1.3) --with-mdb Build with Access MDB driver (requires Java 1.6+ JDK/JRE, from Apple or Oracle). --with-mysql Build with mysql support --with-ogdi Build with OGDI support (consider gdal2-ogdi instead) --with-opencl Build with OpenCL acceleration. --with-postgresql Build with postgresql support --with-qhull Build with internal qhull libary support --with-sfcgal Build with CGAL C++ wrapper support --with-swig-java Build the swig java bindings --with-unsupported Allow configure to drag in any library it can find. Invoke this at your own risk. --without-gnm Build without Geographic Network Model support --HEAD Install HEAD version ==> Caveats Plugins for this version of GDAL/OGR, generated by other formulae, should be symlinked to the following directory: /usr/local/lib/gdalplugins/2.2 You may need to set the following enviroment variable: export GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins PYTHON BINDINGS are now built in a separate formula: gdal2-python This formula is keg-only, which means it was not symlinked into /usr/local, because older version of gdal is in main tap and installs similar components.