Bug 725036

Summary: Rows with null values should appear at the end of tables when sorting by column [RFE]
Product: Red Hat Enterprise MRG Reporter: Trevor McKay <tmckay>
Component: cuminAssignee: grid-maint-list <grid-maint-list>
Status: CLOSED WONTFIX QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.0CC: athomas, esammons, matt, sgraf
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-26 20:17:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Trevor McKay 2011-07-22 16:00:38 UTC
Description of problem:

Some data comes through to cumin with null column values.  For certain tables is an error, but for others it is not.  When sorting tables by columns with null data, it would be nice if the rows with nulls sorted at the end of table.

Version-Release number of selected component (if applicable):

2.0

How reproducible:

100%

Steps to Reproduce:
1. Looking under messaging is a good place to find nulls (queues, exchanges)
2. Sort in descending order by a column with nulls.
  
Actual results:

Nulls will be on top.

Expected results:

It would be nice to have nulls at the end, whether sorting ascending or descending.

Additional info:

This can be done easily in newer versions of Postgres, but in 8.1 it's difficult.  We need semi-elaborate schemes using multiple queries, or hidden columns, or defined semantics for replacing nulls with zeroes, etc.

Comment 2 Stanislav Graf 2013-11-13 10:42:56 UTC
Cumin references:
https://fedorahosted.org/grid/wiki/Cumin
https://fedorahosted.org/grid/wiki/CuminAndPersonalCondor
http://tmckayus.github.io/blog/2012/09/24/new-post/

We are interested in:
1] propose patch that fixes the issue
2] propose testing scenario down to individual steps
3] automate testing scenario (from 2]) using your prefered language (optional)

In case you struggle you can:
- ask here in Bugzilla using comment field
- join IRC channels #distcomp and ##cumin on http://freenode.net/
- ask on mailing list (https://fedorahosted.org/grid/wiki/Cumin#OtherUsefulLinks)

Comment 3 Anne-Louise Tangring 2016-05-26 20:17:39 UTC
MRG-Grid is in maintenance and only customer escalations will be considered. This issue can be reopened if a customer escalation associated with it occurs.