Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16225/sql
Modified Files:
lalg2sql.brg
Log Message:
-- Cope with polymorphic item sequences in the SQL code generation for rank
operators.
Index: lalg2sql.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/lalg2sql.brg,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- lalg2sql.brg 17 Mar 2010 22:10:27 -0000 1.170
+++ lalg2sql.brg 17 Mar 2010 22:22:46 -0000 1.171
@@ -4556,22 +4556,26 @@
asc = PFord_order_dir_at (sortby, i) == DIR_ASC;
expr_ty = type_of (L(p), ord);
- expr = col_env_lookup (COLMAP(L(p)),
- ord,
- expr_ty);
+ /* cope with polymorphic columns here */
+ for (PFalg_simple_type_t t = 1; t; t <<= 1)
+ if (t & TYPE_MASK (expr_ty)) {
+ expr = col_env_lookup (COLMAP(L(p)),
+ ord,
+ t);
- srtbylist = sortkey_list (
- sortkey_item (
- /* different handling of boolean
- types as search criterion */
- (expr->kind == sql_column_name ||
- expr->kind == sql_lit_int ||
- expr_ty != aat_bln)
- ? expr
- : case_ (when (expr, TRUE_INT),
- else_ (FALSE_INT)),
- asc),
- srtbylist);
+ srtbylist = sortkey_list (
+ sortkey_item (
+ /* different handling of boolean
+ types as search criterion */
+ (expr->kind == sql_column_name ||
+ expr->kind == sql_lit_int ||
+ t != aat_bln)
+ ? expr
+ : case_ (when (expr, TRUE_INT),
+ else_ (FALSE_INT)),
+ asc),
+ srtbylist);
+ }
}
col_env_add (COLMAP(p),
p->sem.sort.res,
------------------------------------------------------------------------------
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