Changeset: d4c66be266a6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4c66be266a6 Added Files: debian/fix-deb.sh debian/monetdb-r.install sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit sql/test/bugs/Tests/WHERE_IN_subquery_incorrect_results-JIRA-44.sql sql/test/bugs/Tests/WHERE_IN_subquery_incorrect_results-JIRA-44.stable.err sql/test/bugs/Tests/WHERE_IN_subquery_incorrect_results-JIRA-44.stable.out Removed Files: monetdb5/modules/mal/Tests/remote03.stable.out.int128 Modified Files: NT/rules.msc debian/control debian/monetdb5-server.install debian/rules java/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.single monetdb5/modules/mal/Tests/remote03.stable.out monetdb5/modules/mal/clients.c monetdb5/optimizer/opt_pipes.c monetdb5/optimizer/opt_prelude.c monetdb5/optimizer/opt_prelude.h monetdb5/optimizer/opt_volcano.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/vaults/shp/shp.h sql/benchmarks/tpch/Tests/10-explain.stable.out sql/benchmarks/tpch/Tests/10-explain.stable.out.int128 sql/benchmarks/tpch/Tests/10-plan.stable.out sql/benchmarks/tpch/Tests/10-plan.stable.out.int128 sql/benchmarks/tpch/Tests/18-explain.stable.out sql/benchmarks/tpch/Tests/18-explain.stable.out.int128 sql/benchmarks/tpch/Tests/18-plan.stable.out sql/benchmarks/tpch/Tests/18-plan.stable.out.int128 sql/server/rel_optimizer.c sql/server/rel_rel.c sql/server/rel_select.c sql/storage/bat/bat_table.c sql/test/BugTracker-2011/Tests/groupby_primary_key.Bug-2807.stable.out sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit sql/test/Tests/setoptimizer.stable.out sql/test/Tests/setoptimizer.stable.out.Windows sql/test/bugs/Tests/All sql/test/remote/Tests/partition_elim.stable.out Branch: no-wrd Log Message:
Merge with default branch. diffs (truncated from 4364 to 300 lines): diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -8,11 +8,10 @@ Vcs-Hg: http://dev.monetdb.org/hg/MonetD # for Build-Depends and Depends syntax, see # http://www.debian.org/doc/debian-policy/ch-relationships.html Build-Depends: debhelper (>= 5), autotools-dev, bison, libatomic-ops-dev, - libbam-dev, libbz2-dev, libcurl4-gnutls-dev, libgeos-dev (>= 3.0.0), + libbam-dev, libbz2-dev, libcurl4-gnutls-dev, libgeos-dev (>= 3.4.0), libgsl0-dev, libpcre3-dev, libreadline-dev, libssl-dev, libxml2-dev, perl, pkg-config, python, python3, - unixodbc-dev, uuid-dev, zlib1g-dev, - liblas-c-dev + unixodbc-dev, uuid-dev, zlib1g-dev, liblas-c-dev (>= 1.8.0), r-base Standards-Version: 3.8.0 X-Python-Version: >= 2.6 X-Python3-Version: >= 3.0 @@ -284,6 +283,22 @@ Description: MonetDB5 128 bit integer (h This package provides HUGEINT (128-bit integer) support for the SQL frontend of MonetDB. +Package: monetdb-r +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, monetdb5-sql (= ${source:Version}) +Description: MonetDB5 128 bit integer (hugeint) support for SQL + MonetDB is a database management system that is developed from a + main-memory perspective with use of a fully decomposed storage model, + automatic index management, extensibility of data types and search + accelerators. It also has an SQL frontend. + . + This package contains the interface to use the R language from within + SQL queries. + . + NOTE: INSTALLING THIS PACKAGE OPENS UP SECURITY ISSUES. If you don't + know how this package affects the security of your system, do not + install it. + Package: monetdb-testing Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} diff --git a/debian/fix-deb.sh b/debian/fix-deb.sh new file mode 100755 --- /dev/null +++ b/debian/fix-deb.sh @@ -0,0 +1,21 @@ +#!/bin/bash +if [ -f /etc/lsb-release ]; then + source /etc/lsb-release + ID=${DISTRIB_ID,,} + VERSION_ID=$DISTRIB_RELEASE +elif [ -f /etc/os-release ]; then + source /etc/os-release +else + echo "don't know what distro this is" + exit 1 +fi + +if [[ ( $ID == debian && $VERSION_ID -lt 8 ) || ( $ID == ubuntu && $VERSION_ID < 15.10 ) ]]; then + # fix control file because these systems don't have liblas and a + # too old version of libgeos + sed -i 's/, libgeos-dev[^,]*//;s/, liblas-c-dev[^,]*//' debian/control + sed -i '/^Package:.*lidar/,/^$/d' debian/control + sed -i '/^Package:.*geom/,/^$/d' debian/control + rm debian/libmonetdb5-server-lidar.install debian/libmonetdb5-server-geom.install + sed -i '/geo[ms]=yes/s/yes/no/;/lidar=yes/s/yes/no/;/liblas=yes/s/yes/no/' debian/rules +fi diff --git a/debian/monetdb-r.install b/debian/monetdb-r.install new file mode 100644 --- /dev/null +++ b/debian/monetdb-r.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/monetdb5/rapi.mal usr/lib/monetdb5 +debian/tmp/usr/lib/monetdb5/autoload/??_rapi.mal usr/lib/monetdb5/autoload +debian/tmp/usr/lib/monetdb5/lib_rapi.so usr/lib/monetdb5 diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install --- a/debian/monetdb5-server.install +++ b/debian/monetdb5-server.install @@ -1,25 +1,26 @@ debian/tmp/usr/bin/mserver5 usr/bin debian/tmp/usr/lib/libmonetdb5.so.* usr/lib -# usr/lib/monetdb5/lib_*.so EXCEPT: lib_{bam,geom,gsl,lidar,sql}.so +# usr/lib/monetdb5/lib_*.so EXCEPT: lib_{bam,geom,gsl,lidar,rapi,sql}.so debian/tmp/usr/lib/monetdb5/lib_generator.so usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/lib_lsst.so usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/lib_opt_sql_append.so usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/lib_udf.so usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/lib_vault.so usr/lib/monetdb5 -# usr/lib/monetdb5/*.mal EXCEPT: {bam,geom,gsl,lidar,sql*,*_hge}.mal -debian/tmp/usr/lib/monetdb5/[!bglsu]*.mal usr/lib/monetdb5 +# usr/lib/monetdb5/*.mal EXCEPT: {bam,geom,gsl,lidar,rapi,sql*,*_hge}.mal +debian/tmp/usr/lib/monetdb5/[!bglrsu]*.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/ba[!m]*.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/b[!a]*.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/generator.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/g[!es]*.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/l[!i]*.mal usr/lib/monetdb5 +debian/tmp/usr/lib/monetdb5/r[!a]*.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/s[!q]*.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/udf.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/u[!d]*.mal usr/lib/monetdb5 -# usr/lib/monetdb5/autoload/*.mal EXCEPT: *_{bam,geom,gsl,hge,lidar,sql}.mal +# usr/lib/monetdb5/autoload/*.mal EXCEPT: *_{bam,geom,gsl,hge,lidar,rapi,sql}.mal debian/tmp/usr/lib/monetdb5/autoload/??_batcalc.mal usr/lib/monetdb5/autoload debian/tmp/usr/lib/monetdb5/autoload/??_calc.mal usr/lib/monetdb5/autoload debian/tmp/usr/lib/monetdb5/autoload/??_generator.mal usr/lib/monetdb5/autoload diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -23,6 +23,7 @@ override_dh_auto_configure: --enable-gsl=yes \ --enable-instrument=no \ --enable-jdbc=no \ + --enable-lidar=yes \ --enable-merocontrol=no \ --enable-microhttpd=no \ --enable-monetdb5=yes \ @@ -38,14 +39,13 @@ override_dh_auto_configure: --with-bz2=yes \ --with-geos=yes \ --with-java=no \ + --with-liblas=yes \ --with-perl=yes \ --with-perl-libdir=lib/perl5 \ --with-pthread=yes \ --with-python2=yes \ --with-python3=yes \ --with-readline=yes \ - --with-rubygem=yes \ - --with-rubygem-dir=lib/ruby/gems/1.8 \ --with-samtools=yes \ --with-sphinxclient=no \ --with-unixodbc=yes \ diff --git a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java --- a/java/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java +++ b/java/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java @@ -137,7 +137,7 @@ public class MonetResultSet extends Mone } /** - * Constructor used by MonetFillableResultSet. + * Constructor used by MonetVirtualResultSet. * DO NOT USE THIS CONSTRUCTOR IF YOU ARE NOT EXTENDING THIS OBJECT! * * @param columns the column names @@ -300,14 +300,14 @@ public class MonetResultSet extends Mone */ @Override public int findColumn(String columnName) throws SQLException { - if (columnName != null) { + if (columnName != null && columns != null) { for (int i = 0; i < columns.length; i++) { - if (columns[i].equals(columnName)) + if (columnName.equals(columns[i])) return i + 1; } /* if an exact match did not succeed try a case insensitive match */ for (int i = 0; i < columns.length; i++) { - if (columns[i].equalsIgnoreCase(columnName)) + if (columnName.equalsIgnoreCase(columns[i])) return i + 1; } } @@ -328,30 +328,30 @@ public class MonetResultSet extends Mone } @Override - public Array getArray(int i) throws SQLException { - throw new SQLFeatureNotSupportedException("Method getArray not implemented yet, sorry!", "0A000"); + public Array getArray(int columnIndex) throws SQLException { + throw newSQLFeatureNotSupportedException("getArray"); } @Override public Array getArray(String colName) throws SQLException { - throw new SQLFeatureNotSupportedException("Method getArray not implemented yet, sorry!", "0A000"); + throw newSQLFeatureNotSupportedException("getArray"); } /* Mapi doesn't allow something for streams at the moment, thus all not implemented for now */ @Override public InputStream getAsciiStream(int columnIndex) throws SQLException { - throw new SQLFeatureNotSupportedException("Method getAsciiStream not implemented yet, sorry!", "0A000"); + throw newSQLFeatureNotSupportedException("getAsciiStream"); } @Override public InputStream getAsciiStream(String columnName) throws SQLException { - throw new SQLFeatureNotSupportedException("Method getAsciiStream not implemented yet, sorry!", "0A000"); + throw newSQLFeatureNotSupportedException("getAsciiStream"); } @Override public InputStream getUnicodeStream(int columnIndex) throws SQLException { - throw new SQLFeatureNotSupportedException("Method getUnicodeStream not implemented yet, sorry!", "0A000"); + throw newSQLFeatureNotSupportedException("getUnicodeStream"); } @Override public InputStream getUnicodeStream(String columnName) throws SQLException { - throw new SQLFeatureNotSupportedException("Method getUnicodeStream not implemented yet, sorry!", "0A000"); + throw newSQLFeatureNotSupportedException("getUnicodeStream"); } /** @@ -470,7 +470,7 @@ public class MonetResultSet extends Mone */ @Override public Reader getNCharacterStream(int columnIndex) throws SQLException { - throw new SQLFeatureNotSupportedException("getNCharacterStream() not supported", "0A000"); + throw newSQLFeatureNotSupportedException("getNCharacterStream"); } /** @@ -489,7 +489,7 @@ public class MonetResultSet extends Mone */ @Override public Reader getNCharacterStream(String columnName) throws SQLException { - return getNCharacterStream(findColumn(columnName)); + throw newSQLFeatureNotSupportedException("getNCharacterStream"); } /** @@ -578,7 +578,7 @@ public class MonetResultSet extends Mone */ @Override public NClob getNClob(int i) throws SQLException { - throw new SQLFeatureNotSupportedException("getNClob() not supported", "0A000"); + throw newSQLFeatureNotSupportedException("getNClob"); } /** @@ -596,7 +596,7 @@ public class MonetResultSet extends Mone */ @Override public NClob getNClob(String colName) throws SQLException { - return getNClob(findColumn(colName)); + throw newSQLFeatureNotSupportedException("getNClob"); } /** @@ -928,7 +928,11 @@ public class MonetResultSet extends Mone */ @Override public int getHoldability() throws SQLException { - return getStatement().getConnection().getHoldability(); + // prevent NullPointerException when statement is null (i.c. MonetVirtualResultSet) + if (this.getStatement() != null) { + return getStatement().getConnection().getHoldability(); + } + return ResultSet.HOLD_CURSORS_OVER_COMMIT; } /** @@ -939,7 +943,30 @@ public class MonetResultSet extends Mone */ @Override public int getFetchDirection() { - return FETCH_FORWARD; + return ResultSet.FETCH_FORWARD; + } + + /** + * Gives a hint as to the direction in which the rows in this ResultSet + * object will be processed. The initial value is determined by the + * Statement object that produced this ResultSet object. + * The fetch direction may be changed at any time. + * <b>currently not implemented</b> + * + * @param direction - an int specifying the suggested fetch direction; + * one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN + */ + @Override + public void setFetchDirection(int direction) throws SQLException { + switch (direction) { + case ResultSet.FETCH_FORWARD: + break; + case ResultSet.FETCH_REVERSE: + case ResultSet.FETCH_UNKNOWN: + throw new SQLException("Not supported direction " + direction, "0A000"); + default: + throw new SQLException("Illegal direction: " + direction, "M1M05"); + } } /** @@ -1146,8 +1173,11 @@ public class MonetResultSet extends Mone String colName = getColumnName(column); if (colName != null && !"".equals(colName)) { if (conn == null) { - // first time, get a Connection object and cache it for all next columns - conn = getStatement().getConnection(); + // prevent NullPointerException when statement is null (i.c. MonetVirtualResultSet) + if (getStatement() != null) { + // first time, get a Connection object and cache it for all next columns + conn = getStatement().getConnection(); + } } if (conn != null && dbmd == null) { // first time, get a MetaData object and cache it for all next columns @@ -1543,8 +1573,11 @@ public class MonetResultSet extends Mone public String getColumnClassName(int column) throws SQLException { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list