Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4580/compiler/algebra/prop
Modified Files:
Tag: M5XQ
prop_ori_names.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/algebra/prop/prop_ori_names.c,1.42
-- 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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U prop_ori_names.c
Index: prop_ori_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_ori_names.c,v
retrieving revision 1.40.2.1
retrieving revision 1.40.2.2
diff -u -d -r1.40.2.1 -r1.40.2.2
--- prop_ori_names.c 7 May 2009 14:44:56 -0000 1.40.2.1
+++ prop_ori_names.c 15 Jun 2009 12:46:31 -0000 1.40.2.2
@@ -362,30 +362,17 @@
diff_np (n->prop->l_name_pairs, np_list, n->sem.unary.res);
break;
- case la_avg:
- case la_max:
- case la_min:
- case la_sum:
- case la_prod:
- case la_count:
- case la_seqty1:
- case la_all:
- /* operators introducing a completely new set of names
- for its operands (aggregates, steps, doc_tbl, element,
- merge_adjacent, and string_join) store these columns
- both in the name pair list of the child and in the current
- name pair list to support correct renaming if the proposed
- column name was modified. */
- unq = n->sem.aggr.res;
- ori = find_ori_name (np_list, unq);
- /* use the result name also as column name
- of the input value column */
- if (n->kind != la_count) {
- unq = n->sem.aggr.col;
- add_name_pair (np_list, ori, unq);
- add_name_pair (n->prop->l_name_pairs, ori, unq);
- }
-
+ case la_aggr:
+ /* Infer only columns that are used in the aggregates.
+ Renamings do not have to be mapped. Conflicting names
+ are patched by the function patch_ori_names(). */
+ for (unsigned int i = 0; i < n->sem.aggr.count; i++)
+ if (n->sem.aggr.aggr[i].kind != alg_aggr_count) {
+ ori = find_ori_name (np_list, n->sem.aggr.aggr[i].res);
+ add_name_pair (n->prop->l_name_pairs,
+ ori,
+ n->sem.aggr.aggr[i].col);
+ }
if (n->sem.aggr.part) {
unq = n->sem.aggr.part;
ori = find_ori_name (np_list, unq);
------------------------------------------------------------------------------
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