Update of /cvsroot/monetdb/pathfinder/compiler/xmlimport
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5051/compiler/xmlimport
Modified Files:
Tag: M5XQ
xml2lalg_converters.c
Log Message:
propagated changes of Friday Jun 12 2009 - Monday Jun 15 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/06/12 - tsheyar: compiler/xmlimport/xml2lalg_converters.c,1.31
-- Replaced aggregate operators count, min, max, avg, sum, prod, seqty1,
and all in the algebra by a single aggregate operator ``aggr''
that can handle multiple aggregates. The aggregate entries
are of kind count, min, max, avg, sum, prod, seqty1, all, and dist.
-- Added new aggregate kind ``dist'' that allows to represent group by
columns that functionally depend on the partitioning criterion
in the result of the grouping aggregate.
-- Added rewrite that merges aggregates.
-- Added rewrite that removes superfluous aggregates.
-- Added rewrite that pushes a rank operator through an aggregate.
-- Extended the XML import to cope with the old
as well as the new representation of aggregates.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: xml2lalg_converters.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/xmlimport/xml2lalg_converters.c,v
retrieving revision 1.26.2.2
retrieving revision 1.26.2.3
diff -u -d -r1.26.2.2 -r1.26.2.3
--- xml2lalg_converters.c 12 May 2009 13:36:09 -0000 1.26.2.2
+++ xml2lalg_converters.c 15 Jun 2009 12:48:03 -0000 1.26.2.3
@@ -83,11 +83,13 @@
mapto (la_bool_or , "or")
mapto (la_bool_not, "not")
mapto (la_to, "op:to")
- mapto (la_avg, "avg")
- mapto (la_max, "max")
- mapto (la_min, "min")
- mapto (la_sum, "sum")
- mapto (la_count, "count")
+ mapto (la_aggr, "aggr")
+ mapto (la_aggr, "avg")
+ mapto (la_aggr, "max")
+ mapto (la_aggr, "min")
+ mapto (la_aggr, "sum")
+ mapto (la_aggr, "count")
+ mapto (la_aggr, "prod")
mapto (la_rownum, "rownum")
mapto (la_rowrank, "rowrank")
mapto (la_rank, "rank")
@@ -95,8 +97,8 @@
mapto (la_type, "type")
mapto (la_type_assert, "type assertion")
mapto (la_cast, "cast")
- mapto (la_seqty1, "seqty1")
- mapto (la_all, "all")
+ mapto (la_aggr, "seqty1")
+ mapto (la_aggr, "all")
mapto (la_step, "XPath step")
mapto (la_step_join, "path step join")
mapto (la_guide_step, "XPath step (with guide information)")
@@ -206,6 +208,8 @@
ori = col_score1;
length = strlen("score");
}
+ else if (!strcmp (s, "(NULL)"))
+ return col_NULL;
else
PFoops (OOPS_FATAL, "don't know what to do with (%s)", s);
@@ -286,6 +290,30 @@
return alg_comp_eq;
}
+PFalg_aggr_kind_t
+PFxml2la_conv_2PFLA_aggregateType (char* s)
+{
+ if (false) return alg_aggr_count; /* discard first case */
+#define mapto_aggr_kind(kind) \
+ else if (strcmp (s, PFalg_aggr_kind_str((kind))) == 0) \
+ return (kind);
+ /* the kind was copied from algebra.c:PFalg_axis_str()
+ (and should stay aligned) */
+ mapto_aggr_kind (alg_aggr_dist)
+ mapto_aggr_kind (alg_aggr_count)
+ mapto_aggr_kind (alg_aggr_min)
+ mapto_aggr_kind (alg_aggr_max)
+ mapto_aggr_kind (alg_aggr_avg)
+ mapto_aggr_kind (alg_aggr_sum)
+ mapto_aggr_kind (alg_aggr_seqty1)
+ mapto_aggr_kind (alg_aggr_all)
+ mapto_aggr_kind (alg_aggr_prod)
+
+ PFoops (OOPS_FATAL, "don't know what to do (%s)", s);
+ /* pacify picky compilers */
+ return alg_aggr_count;
+}
+
PFalg_fun_t
PFxml2la_conv_2PFLA_functionType (char* s)
{
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins