gkunter / coquery

Coquery is a free corpus query tool for linguists, lexicographers, translators, and anybody who wishes to search and analyse a text corpus.
GNU General Public License v3.0
18 stars 4 forks source link

Unexpected effects of group columns #215

Closed gkunter closed 7 years ago

gkunter commented 7 years ago

Using data columns to group data can have unexpected effects.

(1) One problem is that there is no indication that one or more group columns are specified, but no group function and no group filter. In this case, the toolbox will have no visible indication of a grouping effect, but the data will be sorted by the grouping variables.

(2) Another unexpected effect is that currently, group columns are pulled in as selected features automatically, but intransparently. This means, for example, that Query string will always appear in the output column if it is used as a group variable, regardless of the setting in the data selection tree.

(3) Finally, using group columns that are not selected in the data selection tree can mess up the sorting of the results table (test case: ELP with query strings account, talent and Word as the only output column. If Query string is used as a group variable, the results table shows talent before account. If it is removed, the entries in the results table occur in the order of the query strings.

gkunter commented 7 years ago

This issue is partially fixed already:

(1) if a variable is specified as a grouping column, the toolbox will indicate it by a marker, regardless of whether group functions are specified.

(3) Seems to be fixed also

gkunter commented 7 years ago

With regard to (2), there are three possible solutions:

  1. Don't use a grouping column if it's not a selected feature
  2. Make a feature permanently selected for as long as it's used as a grouping column
  3. Use a grouping column even if it's not a selected feature

The current implementation is almost a mix of solutions 1 and 3: a grouping column is always being used, and the feature is pulled into the query. Yet, a warning sign is displayed along side the grouping column (indicating that something is wrong, even though everything worked as specified), and a tooltip warns that the feature should be selected.

Probably the best way to implement this would be this:

gkunter commented 7 years ago

Fixed in last commits.