Changeset: c0e687bc8646 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c0e687bc8646
Modified Files:
clients/R/MonetDB.R/NAMESPACE
clients/R/MonetDB.R/R/dplyr.R
clients/R/Tests/dplyr-flights.R
clients/R/Tests/dplyr.R
tools/embedded/build-rpkg.sh
tools/embedded/rpackage/DESCRIPTION
tools/embedded/rpackage/configure
Branch: Jun2016
Log Message:
monetdblite compatibility fixes. yay solaris
diffs (129 lines):
diff --git a/clients/R/MonetDB.R/NAMESPACE b/clients/R/MonetDB.R/NAMESPACE
--- a/clients/R/MonetDB.R/NAMESPACE
+++ b/clients/R/MonetDB.R/NAMESPACE
@@ -21,18 +21,4 @@ export(monetdb.server.getpid)
# dplyr.R
export(src_monetdb)
-export(src_translate_env.src_monetdb)
-export(src_desc.src_monetdb)
-export(tbl.src_monetdb)
-export(db_query_fields.MonetDBConnection)
-export(db_query_fields.MonetDBEmbeddedConnection)
-export(db_query_rows.MonetDBConnection)
-export(db_query_rows.MonetDBEmbeddedConnection)
-export(db_save_query.MonetDBConnection)
-export(db_insert_into.MonetDBConnection)
-export(db_create_index.MonetDBConnection)
-export(db_analyze.MonetDBConnection)
-export(sql_subquery.MonetDBConnection)
-export(monetdb_queryinfo)
-export(sample_n.tbl_monetdb)
-export(sample_frac.tbl_monetdb)
+# rest of dplyr.R exported via hack in src_monetdb
diff --git a/clients/R/MonetDB.R/R/dplyr.R b/clients/R/MonetDB.R/R/dplyr.R
--- a/clients/R/MonetDB.R/R/dplyr.R
+++ b/clients/R/MonetDB.R/R/dplyr.R
@@ -4,7 +4,26 @@ src_monetdb <- function(dbname="demo", h
con <- DBI::dbConnect(MonetDB.R(), dbname = dbname , host = host, port =
port,
user = user, password = password, ...)
}
- dplyr::src_sql("monetdb", con, info = DBI::dbGetInfo(con))
+ s <- dplyr::src_sql("monetdb", con, info = DBI::dbGetInfo(con))
+
+ # this is a (dirty) hack so we don't need to depend on dplyr
+ dplyrMt <- getNamespace("dplyr")$.__S3MethodsTable__.
+
+ dplyrMt[["src_translate_env.src_monetdb"]] <-
src_translate_env.src_monetdb
+ dplyrMt[["src_desc.src_monetdb"]] <- src_desc.src_monetdb
+ dplyrMt[["tbl.src_monetdb"]] <- tbl.src_monetdb
+ dplyrMt[["db_query_fields.MonetDBConnection"]] <-
db_query_fields.MonetDBEmbeddedConnection
+ dplyrMt[["db_query_rows.MonetDBConnection"]] <-
db_query_rows.MonetDBConnection
+ dplyrMt[["db_query_rows.MonetDBEmbeddedConnection"]] <-
db_query_rows.MonetDBEmbeddedConnection
+ dplyrMt[["db_save_query.MonetDBConnection"]] <-
db_save_query.MonetDBConnection
+ dplyrMt[["db_insert_into.MonetDBConnection"]] <-
db_insert_into.MonetDBConnection
+ dplyrMt[["db_create_index.MonetDBConnection"]] <-
db_create_index.MonetDBConnection
+ dplyrMt[["db_analyze.MonetDBConnection"]] <-
db_analyze.MonetDBConnection
+ dplyrMt[["sql_subquery.MonetDBConnection"]] <-
sql_subquery.MonetDBConnection
+ dplyrMt[["sample_n.tbl_monetdb"]] <- sample_n.tbl_monetdb
+ dplyrMt[["sample_frac.tbl_monetdb"]] <-
sample_frac.tbl_monetdb
+
+ s
}
src_translate_env.src_monetdb <- function(x) {
diff --git a/clients/R/Tests/dplyr-flights.R b/clients/R/Tests/dplyr-flights.R
--- a/clients/R/Tests/dplyr-flights.R
+++ b/clients/R/Tests/dplyr-flights.R
@@ -10,9 +10,6 @@ dd <- capture.output( suppressMessages (
library(dplyr, quietly=T)
-# FIXME: this should no longer be required
-library(MonetDB.R, quietly = T)
-
args <- commandArgs(trailingOnly = TRUE)
dbport <- 50000
dbname <- "mTests_clients_R"
diff --git a/clients/R/Tests/dplyr.R b/clients/R/Tests/dplyr.R
--- a/clients/R/Tests/dplyr.R
+++ b/clients/R/Tests/dplyr.R
@@ -10,9 +10,6 @@ dd <- capture.output( suppressMessages (
library(dplyr, quietly = T)
-# FIXME: this should no longer be required
-library(MonetDB.R, quietly = T)
-
args <- commandArgs(trailingOnly = TRUE)
dbport <- 50000
dbname <- "mTests_clients_R"
diff --git a/tools/embedded/build-rpkg.sh b/tools/embedded/build-rpkg.sh
--- a/tools/embedded/build-rpkg.sh
+++ b/tools/embedded/build-rpkg.sh
@@ -53,6 +53,8 @@ then
exit 1
fi
+export MAKEFLAGS="-j 8"
+
R CMD INSTALL --build $STAGEDIR/$RPKG && \
R CMD INSTALL $STAGEDIR/$OSXPKG && \
R -f $STAGEDIR/sourcetree/tools/embedded/Tests/lowlevel.R && \
diff --git a/tools/embedded/rpackage/DESCRIPTION
b/tools/embedded/rpackage/DESCRIPTION
--- a/tools/embedded/rpackage/DESCRIPTION
+++ b/tools/embedded/rpackage/DESCRIPTION
@@ -1,8 +1,7 @@
Package: MonetDBLite
Version: 0.2.1
Title: In-Process Version of MonetDB for R
-Authors@R: c(person("Hannes Muehleisen", role = c("aut", "cre"), email =
"[email protected]"), person("MonetDB Development Team", role="ctb"))
-Author: Hannes Muehleisen [aut, cre], MonetDB Development Team [ctb]
+Author: MonetDB Development Team
Maintainer: Hannes Muehleisen <[email protected]>
Description: An in-process version of MonetDB, a relational database focused
on analytical tasks. Similar to SQLite, the database runs entirely inside the R
shell, with the main difference that queries complete much faster thanks to
MonetDB's columnar architecture.
License: MPL (== 2.0)
diff --git a/tools/embedded/rpackage/configure
b/tools/embedded/rpackage/configure
--- a/tools/embedded/rpackage/configure
+++ b/tools/embedded/rpackage/configure
@@ -9,19 +9,10 @@ CFLAGS="-I$R_INCLUDE_DIR" ./configure --
--without-samtools --without-sphinxclient --without-geos --without-samtools
--without-readline \
--enable-optimize --enable-silent-rules --disable-assert --disable-strict
--disable-int128
-# check whether clang or gcc
-LD_PACK_START=-Wl,--whole-archive
-LD_PACK_END=-Wl,--no-whole-archive
-gcc -v 2>&1 | grep LLVM
-if [ $? -eq 0 ]; then
- LD_PACK_START=-Wl,-all_load
- LD_PACK_END=
-fi
-
echo '
libmonetdb5.so:
- $(R_HOME)/bin/R CMD SHLIB --output $@ '$LD_PACK_START' `find $(SUBDIRS)
-name "*.o" | xargs echo` '$LD_PACK_END' -lz -lpcre
+ $(R_HOME)/bin/R CMD SHLIB -lz -lpcre -o $@ `find $(SUBDIRS) -name "*.o"
| xargs echo`
all: $(BUILT_SOURCES) monetdb_config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive && $(MAKE) $(AM_MAKEFLAGS)
libmonetdb5.so
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list