LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-421] store non-absolute paths when available for foreign data wrapper library #344

Open dynamobi-build opened 12 years ago

dynamobi-build commented 12 years ago

[reporter="ksecretan", created="Mon, 13 Jun 2011 11:21:21 -0500 (GMT-05:00)"] Follow-up to <a href="http://jira.eigenbase.org/browse/FRG-416" title="Support "thisjar:" for foreign data wrapper library-spec">FRG-416 need to look at not storing the absolute path if possible. (Basically it should copy whatever path gets stored with the JAR itself, exactly, if possible.) This is probably pretty easy if it's possible to do without breaking a bunch of things, just change farrago/src/net/sf/farrago/ddl/DdlMedHandler.java




Can you please take another look at the implementation to see if we can avoid the expansion to the full path for thisjar in create foreign wrapper?


CALL sqlj.install_jar('file:${FARRAGO_HOME}/plugin/conn-couchdb.jar','couchdb_jar', 1);


select foreign_wrapper_name, library from sys_root.dba_foreign_wrappers where foreign_wrapper_name = 'COUCHDB_WRAPPER';
'FOREIGN_WRAPPER_NAME','LIBRARY'
'COUCHDB_WRAPPER','/Users/ngoodman/dev/eigenbase_workspace/luciddb/./plugin/conn-couchdb.jar'


NOTE: the hard coded path?


The original is still somewhere since the JAR itself has it in the catalog
 select name, url from sys_root.dba_jars where name = 'COUCHDB_JAR';
'NAME','URL'
'COUCHDB_JAR','file:${FARRAGO_HOME}/plugin/conn-couchdb.jar'

dynamobi-build commented 12 years ago

[author="ngoodman", created="Tue, 5 Jul 2011 19:15:06 -0500 (GMT-05:00)"] can't this be as easy as


if ( fullJarPathImCreating.indexOf( getVariable(FARRAGO_HOME ) > 0 )
  replace with literal string ${FARRAGO_HOME}
else
  create fully qualified


I just realized, the issue was getting the original scoping... Who cares about getting that context passed... just filter the jar library path on the create jar statement to replace automatically if the value of FARRAGO_HOME is present... Thoughts?

dynamobi-build commented 12 years ago

[author="ngoodman", created="Tue, 5 Jul 2011 19:15:21 -0500 (GMT-05:00)"] Minor...