Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Aug 2010 at 00:21 UTC
Updated:
28 Nov 2011 at 14:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerHere is a patch.
It convertes the distinct option, if set. I tested the patch quite intensive.
What about groupby? I don't know any contrib/custom backend which supports the option at the moment.
Comment #2
bojanz commentedApplies, seems to work (did a quick test).
I agree that groupby should be handled the same (move it to query options), it's an sql thing, so it makes sense.
Doesn't need to happen in this issue though.
Comment #3
merlinofchaos commentedCommitted to D6. Didn't apply to D7.
Comment #4
becw commentedThe patch applies to 7.x-3.x with fuzz; I re-rolled it and am attaching a version that applies cleanly. It moves the setting, but using 'distinct' still yields an error, since evidently new work is needed to support distinct queries on D7:
Exception: d7cx: Column-level distinct is not supported yet. in views_plugin_query_default->compile_fields() (line 940 of /shared/vash/sandboxes/white/barnard/site/www/sites/all/modules/views/plugins/views_plugin_query_default.inc).Comment #5
dawehnerSee #863478: Distinct is not supported by dbtng
It still seems not to be supported? I'm confused a bit, and asked berdir.
Comment #6
dawehnerCommited the patch with a commented out distinct option. Let's fix this later.
Comment #7
rszrama commentedI'm not sure, but I think the commented out distinct option is why I'm getting undefined index errors on every View for this bit o' code:
Perhaps the if statement should have been commented out, too?
(Sorry, I don't know enough about how Views uses issue tags to tell if the alpha-4 blocker status is for 2.x or 3.x issues, so I'm leaving it alone for now.)
Comment #8
dawehnerI think here should be used !empty
Comment #9
rszrama commentedAlrighty, added an empty().
Comment #10
dawehnerThanks.
Comment #12
asb commentedFollow-up issue: #1234048: Distinct requires workaround with bad usability to make 6.x-3.x-dev work like Views 2