Update of /cvsroot/monetdb/pathfinder/compiler/debug
In directory
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23060/compiler/debug
Modified Files:
Tag: M5XQ
logdebug.c
Log Message:
propagated changes of Thursday Mar 18 2010
from the XQFT branch to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2010/03/18 - sjoerd: compiler/debug/logdebug.c,1.133.2.2
propagated changes of Wednesday Mar 17 2010 - Thursday Mar 18 2010
from the development trunk to the XQFT branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2010/03/17 - tsheyar: compiler/debug/logdebug.c,1.135
-- Introduced a new column-name-origin property that enhances the column
names
in the DOT generated algebra plans. If a column stems from a ref_tbl or a
path step we now keep the original name throughout the plan.
(Use pf-option -fN to print the mapping of original names.)
-- Make property usage a little bit more defensive. Instead of !PFprop_icol
a new function PFprop_not_icol is introduced that copes correctly with
missing property information.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: logdebug.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/debug/logdebug.c,v
retrieving revision 1.124.2.8
retrieving revision 1.124.2.9
diff -u -d -r1.124.2.8 -r1.124.2.9
--- logdebug.c 8 Jan 2010 08:57:37 -0000 1.124.2.8
+++ logdebug.c 18 Mar 2010 11:45:54 -0000 1.124.2.9
@@ -625,25 +625,43 @@
break;
case la_project:
- if (n->sem.proj.items[0].new != n->sem.proj.items[0].old)
- PFarray_printf (DOT, "%s (%s:%s", a_id[n->kind],
- PFcol_str (n->sem.proj.items[0].new),
- PFcol_str (n->sem.proj.items[0].old));
- else
- PFarray_printf (DOT, "%s (%s", a_id[n->kind],
- PFcol_str (n->sem.proj.items[0].old));
-
- for (c = 1; c < n->sem.proj.count; c++)
- if (n->sem.proj.items[c].new != n->sem.proj.items[c].old)
- PFarray_printf (DOT, ", %s:%s",
- PFcol_str (n->sem.proj.items[c].new),
- PFcol_str (n->sem.proj.items[c].old));
+ {
+ int startpos = PFarray_last (DOT),
+ curpos;
+ char *sep,
+ *space = ", ",
+ *newline = ",\\n";
+ /* print first column */
+ if (n->sem.proj.items[0].new != n->sem.proj.items[0].old)
+ PFarray_printf (DOT, "%s (%s:%s", a_id[n->kind],
+ PFcol_str (n->sem.proj.items[0].new),
+ PFcol_str (n->sem.proj.items[0].old));
else
- PFarray_printf (DOT, ", %s",
- PFcol_str (n->sem.proj.items[c].old));
+ PFarray_printf (DOT, "%s (%s", a_id[n->kind],
+ PFcol_str (n->sem.proj.items[0].old));
- PFarray_printf (DOT, ")");
- break;
+ for (c = 1; c < n->sem.proj.count; c++) {
+ curpos = PFarray_last (DOT);
+ if (curpos - startpos > 42) {
+ sep = newline;
+ startpos = curpos;
+ }
+ else
+ sep = space;
+
+ if (n->sem.proj.items[c].new != n->sem.proj.items[c].old)
+ PFarray_printf (DOT, "%s%s:%s",
+ sep,
+ PFcol_str (n->sem.proj.items[c].new),
+ PFcol_str (n->sem.proj.items[c].old));
+ else
+ PFarray_printf (DOT, "%s%s",
+ sep,
+ PFcol_str (n->sem.proj.items[c].old));
+ }
+
+ PFarray_printf (DOT, ")");
+ } break;
case la_select:
PFarray_printf (DOT, "%s (%s)", a_id[n->kind],
@@ -1072,6 +1090,38 @@
fmt = prop_args;
while (*fmt) {
+ if (*fmt == '+' || *fmt == 'N') {
+ bool started = false;
+ int startpos = PFarray_last (DOT),
+ curpos;
+ char *sep,
+ *space = ", ",
+ *newline = ",\\n";
+ /* list columns marked const */
+ for (unsigned int i = 0; i < n->schema.count; i++) {
+ PFalg_col_t col = n->schema.items[i].name;
+ char *name = PFprop_name_origin (n->prop, col);
+ if (name) {
+ curpos = PFarray_last (DOT);
+ if (!started) {
+ started = true;
+ sep = "\\nname origin: ";
+ }
+ else if (curpos - startpos > 42) {
+ sep = newline;
+ startpos = curpos;
+ }
+ else
+ sep = space;
+
+ PFarray_printf (DOT,
+ "%s%s=%s",
+ sep,
+ PFcol_str (col),
+ name);
+ }
+ }
+ }
if (*fmt == '+' || *fmt == 'A') {
/* if present print cardinality */
if (PFprop_card (n->prop))
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins