DB2 - Problembeschreibung
Problem IC95322 | Status: Geschlossen |
SQL0901 ERROR IN DPF WHEN COMPILING A QUERY WITH AN EQUALITY PREDICATE REFERENCING A NULL CONSTANT | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problembeschreibung: | |
You might encounter an SQL0901 error with reason "getting canonical type length" and producing the following stack trace sqlnn_cmpl sqlng_main sqlng_main sqlng_build_thread sqlng_process_return_op sqlng_process_TQ_op sqlng_build_thread sqlng_process_pipe_op sqlng_process_mate_op sqlng_process_hsjn_op sqlng_build_thread sqlng_process_TQ_op sqlng_build_thread sqlng_build_TQB_op sqlng_populate_COLBLOCK_ob when compiling a query consisting of a non-collocated join between two or more tables that are hash distributed across two or more database partitions, and the join columns also equate to the NULL constant. The following is an example that might produce the SQL0901 error: create table i1 (a int, b int) distribute by hash (a); create table i2 (a int, b int) distribute by hash (a); select * from i1,i2 where i1.b=i2.b and i2.b = null ; In this example, the join is not collocated, so the optimizer can consider both a broadcast join or a repartition join. The decision is cost-based, and the problem only occurs if the repartition join is chosen. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * The problem can occur in a DPF environment. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 10.5 Fix Pack 3 * **************************************************************** | |
Local-Fix: | |
You might be able to avoid the error by re-ordering the predicates in the WHERE clause such that the equality predicate referencing the NULL constant is included before the join predicate referencing the same column. Using the example in the error description, re-ordering the predicates as follows could avoid the error: "where i2.b = null and i1.b=i2.b". | |
verfügbare FixPacks: | |
DB2 Version 10.5 Fix Pack 3 for Linux, UNIX, and Windows | |
Lösung | |
Problem first fixed in DB2 version 10.5 Fix Pack 3 | |
Workaround | |
See Local Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 27.08.2013 27.02.2014 27.02.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.5.0.3 | |
10.5.0.3 |