[MonetDB-users] strange UNION exception
Hi, Every once in a while when using a UNION query I get an exception that looks like this: !UNION: column counts (3 and 2) do not match (the numbers '3' and '2' vary from case to case) The message isn't right, because the queries I run do have matching column counts between the Unions. This happens to me in various scenarios. The thing that is common to all the cases is that it seems to happen when some sort of threshold is passed. For example, I can have a working query with 50 OR clauses in the WHERE statement that works, but as soon as I add the 51th OR clause, I get the exception. In other cases I get the same exception with a different amount of OR clauses, but again I see the behavior of the exception appearing when adding one more OR clause to a working query. The thing that is in common to all the failing queries is that there's always a join on two tables and I get data from both tables with a lot of OR clauses. If necessary I can upload data and queries that illustrate this, but the queries are rather long. Please advise. Thanks. -- View this message in context: http://old.nabble.com/strange-UNION-exception-tp26421401p26421401.html Sent from the monetdb-users mailing list archive at Nabble.com.
On Thu, Nov 19, 2009 at 09:19:39AM -0800, Alex Bo. wrote:
Hi,
Every once in a while when using a UNION query I get an exception that looks like this:
!UNION: column counts (3 and 2) do not match (the numbers '3' and '2' vary from case to case)
The message isn't right, because the queries I run do have matching column counts between the Unions. This happens to me in various scenarios.
The thing that is common to all the cases is that it seems to happen when some sort of threshold is passed. For example, I can have a working query with 50 OR clauses in the WHERE statement that works, but as soon as I add the 51th OR clause, I get the exception. In other cases I get the same exception with a different amount of OR clauses, but again I see the behavior of the exception appearing when adding one more OR clause to a working query.
The thing that is in common to all the failing queries is that there's always a join on two tables and I get data from both tables with a lot of OR clauses.
If necessary I can upload data and queries that illustrate this, but the queries are rather long.
we realy need queries (and sometimes also the data), to be able to debug this. Better afcourse is to have a small example, but that sounds a bit hard with the expected high threshold you mention. Niels
Please advise.
Thanks.
-- View this message in context: http://old.nabble.com/strange-UNION-exception-tp26421401p26421401.html Sent from the monetdb-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room C0.02/M3.46, phone ++31 20 592-4098 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
More on this issue: It seems that these exceptions do not depend on the data, and occur on empty tables. I attached two examples. To reproduce with them first run these queries: create table table2 ("Customer" varchar(50), "Product" varchar(50), "Cost" int, "PurchaseDate" timestamp); create table table3 ("Customer" varchar(50), "Product" varchar(50), "Cost" int, "PurchaseDate" timestamp); create table "dTable_Product" (key int, value varchar(50)); create function create_date (y int, m int, d int) returns date external name mtime.date; Example 1: A query that throws the union exception (the shortest one I could reproduce with): http://old.nabble.com/file/p26421515/Example1_withError.txt Example1_withError.txt The same query with one less OR clause. This one works fine and returns 0 rows: http://old.nabble.com/file/p26421515/Example1_works.txt Example1_works.txt Example 2: A much longer query with simpler OR clauses that throws the same exception: http://old.nabble.com/file/p26421515/Example2_withError.txt Example2_withError.txt The same query with one less OR clause. This one works fine and returns 0 rows: http://old.nabble.com/file/p26421515/Example2_works.txt Example2_works.txt This was tested on Windows 64 bit with Aug-SP1. Please advise. Thanks. -- View this message in context: http://old.nabble.com/strange-UNION-exception-tp26421401p26421515.html Sent from the monetdb-users mailing list archive at Nabble.com.
participants (2)
-
Alex Bo.
-
Niels Nes