Dear MonetDB developers,

when using the EXPLAIN keyword within "mclient --language=sql", I get
output like:

% .explain # table_name
% mal # name
% clob # type
% 0 # length
function user.s0_2{autoCommit=true}():void;
..
..

Most notably, apart from the lines starting with %, the syntax
resembles the code "mclient --language=mal" would expect. So, a naive
approach to use this observation would be to filter out the % lines
and feed the output together with some boilerplate code into "mclient
--language=mal" (example using a bash unix shell):

echo "EXPLAIN SELECT 1;"|
mclient --language=sql|
(
echo "sql.init();"
grep -v ^%
echo "user.s0_2();"
)|
mclient --language=mal

For very simple SQL statements, this works and creates the expected
output. However, as soon as tables come into play, I'm getting
errors because of uninitialized variables. So there seem to be at
least semantical differences between EXPLAIN's MAL output and the
MAL "mclient --language=mal" expects. Is this difference documented
somewhere? Is there a better way for ad-hoc translation from
executable SQL to executable MAL?

Best regards,

Isidor Zeuner

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers

Reply via email to