https://bugs.freedesktop.org/show_bug.cgi?id=67664
Priority: medium
Bug ID: 67664
Assignee: [email protected]
Summary: query wizard in need of love
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: NEW
Version: 4.2.0.0.alpha0+ Master
Component: Database
Depends on: 56750, 59978
Product: LibreOffice
The Query Wizard is in need of a serious redesign. Its implementation is a
confusing mess, and it gets itself confused over far too many things:
- There is a Java SQLQueryComposer class, which confusingly is *not*
an implementation of the XSQLQueryComposer interface (nor the
corresponding service). The latter uses an XSingleSelectQueryComposer,
but in very partial ways, and sometimes resetting it, blurring what
is the responsibility of the Java SQLQueryComposer and what of the
XSingleSelectQueryComposer.
- Confused columns with same name but in different tables
- Confused about aliasing between result columns and table columns
(shows e.g. in the ORDER BY clause)
- Confused about the table column that is being aggregated
and the *result* of the aggregation. Actually, does not
have a clear notion of result column of aggregation.
For example, aggregate both the SUM and the AVG of column "cl"
(in that order).
The "aliases" step proposes the "cl" column only once, and
the generated query has only the sum, with the alias chosen
for column "cl". It should generate *both* the SUM and AVG
and the alias step should show SUM("cl") *and* AVG("cl"),
but *not* "cl" itself.
- Does not include the GROUP BY columns in the result, giving a
generally not-that-useful result.
E.g. imagine we want the SUM of the amounts of the invoices
per customer (that is, the turnover per customer).
The wizard makes a query that gives the turnover, but does not
say for which customer each number is.
- Gives only utterly non-useful choices for HAVING
It proposes only the (unadulterated) GROUP BY columns. Selecting
those in the WHERE clause gives *exactly* the same result.
It should propose the RESULTS of the aggregations.
- mishandles dates (see bug 59978)
The wizard itself is in wizards/com/sun/star/wizards/query, but a lot of the
work is done in wizards/com/sun/star/wizards/db and
wizards/com/sun/star/wizards/ui.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs