Bug 6761 - Error: Program contains errors.:(NONE).multiplex
Summary: Error: Program contains errors.:(NONE).multiplex
Status: RESOLVED NEXTRELEASE
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: 11.33.11 (Apr2019-SP1)
Hardware: Other Windows
: Normal normal
Assignee: SQL devs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-17 17:19 CEST by WARREN MASTER
Modified: 2019-09-28 13:36 CEST (History)
4 users (show)



Attachments
here is the sql to create the table with the problem (251.91 KB, text/plain)
2019-09-17 19:20 CEST, WARREN MASTER
Details

Note You need to log in before you can comment on or make changes to this bug.
Description WARREN MASTER 2019-09-17 17:19:10 CEST
User-Agent:       Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36
Build Identifier: 

the following SQL produces error Error: Program contains errors.:(NONE).multiplex

select fundid,sum(fxcurdlttot) as fxcurdlttotfx from actual_positionmart_pfx_all_vw where asofdate='2019-09-11'
 and  fundid = 10 and currencyexposed <> 'TOTAL'
group by fundid

Removing and currencyexposed <> 'TOTAL'  and/or changing <> to = or NOT LIKE 
does not trigger the error


Reproducible: Always
Comment 1 Ying Zhang cwiconfidential 2019-09-17 17:38:57 CEST
Can you please give us the schema of "actual_positionmart_pfx_all_vw" and probably also some sample data?  Because I can't reproduce your error with an empty table:

sql>create table actual_positionmart_pfx_all_vw (fundid int, asofdate date, currencyexposed string, fxcurdlttot int);
operation successful
sql>select fundid,sum(fxcurdlttot) as fxcurdlttotfx from actual_positionmart_pfx_all_vw where asofdate='2019-09-11' and  fundid = 10 and currencyexposed <> 'TOTAL' group by fundid;
+--------+---------------+
| fundid | fxcurdlttotfx |
+========+===============+
+--------+---------------+
0 tuples
Comment 2 WARREN MASTER 2019-09-17 19:20:41 CEST
Created attachment 634 [details]
here is the sql to create the table with the problem
Comment 3 Sjoerd Mullender cwiconfidential 2019-09-17 21:06:47 CEST
The problem is the mismatch between the type of currencyexposed and the string it is compared to.
currencyexposed is declared as CHAR(3) and it is compared to the string 'TOTAL' which would be a CHAR(5).
If you change the query to contain, say, 'TOT' instead of 'TOTAL', it works.

This is not saying this is not a bug.  This is just saying how you can work around it.
Comment 4 WARREN MASTER 2019-09-17 21:33:17 CEST
thank you, that worked, turns out this table doesn't even have TOTAL as a value.
Comment 5 Sjoerd Mullender cwiconfidential 2019-09-18 09:34:14 CEST
(In reply to WARREN MASTER from comment #4)
> thank you, that worked, turns out this table doesn't even have TOTAL as a
> value.

No, it couldn't.  The value doesn't fit.
Comment 6 MonetDB Mercurial Repository cwiconfidential 2019-09-18 10:49:57 CEST
Changeset ded46c47fe32, made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ded46c47fe32

Changeset description:

	Added test for bug 6761
Comment 7 MonetDB Mercurial Repository cwiconfidential 2019-09-20 12:01:59 CEST
Changeset e56aa53454b1, made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e56aa53454b1

Changeset description:

	Fix for bug 6761 (.i.e. at MAL code generation, we don't need to convert between string types)
Comment 8 MonetDB Mercurial Repository cwiconfidential 2019-09-23 17:55:23 CEST
Changeset e5f30dd8f561, made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5f30dd8f561

Changeset description:

	Rolling back changes for bug 6761 fix, it breaks many tests. I give up finding a solution for it
Comment 9 MonetDB Mercurial Repository cwiconfidential 2019-09-25 12:25:24 CEST
Changeset 1257b1403bce, made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1257b1403bce

Changeset description:

	Updated fix for bug 6761 by setting the number of digits for the output statement out of the skipped conversion
Comment 10 MonetDB Mercurial Repository cwiconfidential 2019-09-27 14:54:08 CEST
Changeset b1af71eb6247, made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1af71eb6247

Changeset description:

	fix bug 6761, ie don't push the selection bat for convert operators