adrpar / paqu

A parallel query engine for MySQL + Spider Engine built on a fork of shard-query
GNU General Public License v2.0
10 stars 0 forks source link

DISTINCT not treated correctly #11

Closed kristinriebe closed 11 years ago

kristinriebe commented 11 years ago

The DISTINCT keyword has no effect.

A query like this:

select distinct snapnum, FOF1 from MDPL.AvailHalos where FOF1 is not null

gets this query plan: The query plan used to run this query: -------------------------------------------------- CALL paquExec('SELECT snapnum AS snapnum,FOF1 AS FOF1 FROM MDPL.AvailHalos WHERE ( FOF1 is not null ) ', 'aggregation_tmp_68800777')-- USE spider_tmp_shard-- SET @i=0-- CREATE TABLE multidark_user_kristin.2013-10-01T11:18:03:0401 ENGINE=MyISAM SELECT DISTINCT @i:=@i+1 AS row_id, snapnum,FOF1 FROM aggregation_tmp_68800777 -- CALL paquDropTmp('aggregation_tmp_68800777')

Looks to me, as if PaQu only pays attention to the DISTINCT-keyword after adding unique row ids, so it has no effect.

adrpar commented 11 years ago

fixed in a5dcf2b986fde50eb283e1e3ce28c4d43fec0a21