You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Volodymyr Vysotskyi (JIRA)" <ji...@apache.org> on 2019/03/03 12:20:00 UTC
[jira] [Resolved] (DRILL-5713) Doing joins on tables that share
column names in a JDBC store returns incorrect results
[ https://issues.apache.org/jira/browse/DRILL-5713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Volodymyr Vysotskyi resolved DRILL-5713.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.16.0
Fixed in the scope of DRILL-6734
> Doing joins on tables that share column names in a JDBC store returns incorrect results
> ---------------------------------------------------------------------------------------
>
> Key: DRILL-5713
> URL: https://issues.apache.org/jira/browse/DRILL-5713
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Relational Operators, Storage - JDBC
> Affects Versions: 1.11.0
> Environment: My mac running the latest drill in embedded mode.
> Reporter: Timothy Farkas
> Assignee: Timothy Farkas
> Priority: Major
> Labels: newbie
> Fix For: 1.16.0
>
>
> If there are two tables in Postgres that share column names, incorrect results are returned when a join is done between the two tables.
> For example if we have two tables: categories and categories2 with the following contents:
> {noformat}
> +----------------+--------------------++---------------
> |categoryguid|categoryparentguid|categoryname|
> +----------------+--------------------++---------------
> |id1|null|restaurants|
> |null|id1|food&Dining|
> |id2|null|Coffee Shops|
> |null|id2|food&Dining|
> +----------------+--------------------++---------------
> {noformat}
> Then the following join query returns incorrectly names columns and incorrect null values:
> {code:sql}
> select cat.categoryname, cat2.categoryname from postgres.public.categories cat join postgres.public.categories2 cat2 on (cat.categoryguid = cat2.categoryguid) where cat.categoryguid IS NOT NULL;
> {code}
> {noformat}
> +----------------+---------------+
> |categoryname|categoryname0|
> +----------------+---------------+
> |restaurants|null|
> |Coffee Shops|null|
> +----------------+---------------+
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)