GitHub user zellerh opened a pull request:
https://github.com/apache/incubator-trafodion/pull/218
[TRAFODION-1581] TMUDF for JDBC queries
This pull request has 3 initial commits:
[TRAFODION-1581] TMUDF for JDBC queries
[TRAFODION-1672] Failures when running regressions twice
[TRAFODION-1695] ORDER BY on divisioned table w/o sort
The 1581 commit also contains:
[TRAFODION-1582] Optional Drill install for local hadoop
Other small fixes:
- install_local_hadoop now picks ports in the non-ephemeral
range when doing install_local_hadoop -p fromDisplay.
Port number range starts at 24000 + 200*display number.
Stay below 42 for your display to avoid the ephemeral range
and pick a different display # if you run into port conflicts.
- Setupdir step (this includes building libhdfs, if needed)
now logs its output with a suffix ##(setupdir) like most
other components
core/Makefile
- Fixed a bug causing a core when a TMUDF produced no
output columns and another bug with a VARCHAR parameter
at the beginning of a parameter list.
core/optimizer/UdfDllInteraction.cpp
- Fixed a bug in parsing two consecutive patterns in sqlci
input, like $$a$$$$b$$
core/sqlci/SqlCmd.cpp
- Small fixes to doxygen documentation: With the new web
page structure, make doxygen version match the Trafodion
version (at least the initial release that applies), also
fix links to wiki to point to the Apache wiki.
core/sql/sqludr/doxygen_tmudr.1.6.config
core/sql/sqludr/sqludr.cpp
core/sql/sqludr/sqludr.h
- Make hive-exec dependency for SQL explicit (would sometimes
produce an error depending on the sequence in which things
are built)
core/sql/pom.xml
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zellerh/incubator-trafodion bug/1581
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/218.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #218
----
commit 680900cd6e2f5daa959b449d12cda3aa7d8a7853
Author: Hans Zeller <[email protected]>
Date: 2015-09-08T20:48:05Z
[TRAFODION-1695] Optimize ORDER BY and GROUP BY with salt and divisioning
For queries that access only a single salt bucket or a single division,
we should be able to produce the rows of the table in order of the
primary key. This change adds some optimizations to do that.
Predicates on computed columns are used to find queries that access only
a single salt or division value. The method to match actual with required
orders recognizes these predicates and also stores them in the group
attributes, so that later checks again recognize the optimization.
commit 849de1a32c34c11e16ace6d9a4d4064148d594be
Author: Hans Zeller <[email protected]>
Date: 2015-12-09T16:58:39Z
[TRAFODION-1672] Failures when running regressions twice
Fixing tests executor/TEST009 and executor/TEST130 so they
clean up correctly at the end and can be run more than once.
commit a34771927c1afd3348fb4609b4c2944f5c47507a
Author: Hans Zeller <[email protected]>
Date: 2015-12-09T17:17:25Z
[TRAFODION-1581] TMUDF for JDBC queries
Other JIRAs fixed with this commit:
[TRAFODION-1582] Optional Drill install for local hadoop
This new built-in TMUDF takes arguments that describe a
JDBC connection and a list of SQL statements and returns
the result of the one SQL statement in the list that
produces results:
select ... from udf(JDBC(
<name of JDBC driver jar>,
<name of JDBC driver class in the jar>,
<connection string>,
<user name>,
<password>,
<statement_type>,
<sql statement 1>
[ , <sql statements 2 ...n> ] )) ...
The first 7 arguments are required and must be
string literals that are available at compile
time.
Statement type:
'source': This statement produces a result
(only type allowed at this time)
(may support "target" to insert
into a table via JDBC later)
Note that only one of the SQL statements can be
a select or other result-producing statements.
The others can perform setup and cleanup
operations, if necessary (e.g. create table,
insert, select, drop table).
For an example, see file
core/sql/regress/udr/TEST002.
Note that this UDF is still a prototype, it needs more
testing.
Other small fixes:
- install_local_hadoop now picks ports in the non-ephemeral
range when doing install_local_hadoop -p fromDisplay.
Port number range starts at 24000 + 200*display number.
Stay below 42 for your display to avoid the ephemeral range
and pick a different display # if you run into port conflicts.
- Setupdir step (this includes building libhdfs, if needed)
now logs its output with a suffix ##(setupdir) like most
other components
core/Makefile
- Fixed a bug causing a core when a TMUDF produced no
output columns and another bug with a VARCHAR parameter
at the beginning of a parameter list.
core/optimizer/UdfDllInteraction.cpp
- Fixed a bug in parsing two consecutive patterns in sqlci
input, like $$a$$$$b$$
core/sqlci/SqlCmd.cpp
- Small fixes to doxygen documentation: With the new web
page structure, make doxygen version match the Trafodion
version (at least the initial release that applies), also
fix links to wiki to point to the Apache wiki.
core/sql/sqludr/doxygen_tmudr.1.6.config
core/sql/sqludr/sqludr.cpp
core/sql/sqludr/sqludr.h
- Make hive-exec dependency for SQL explicit (would sometimes
produce an error depending on the sequence in which things
are built)
core/sql/pom.xml
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---