gristlabs_grist-core/sandbox/grist/functions
Alex Hall f7a9638992 (core) CONTAINS() and summarising by ChoiceList columns with flattening
Summary:
Added CONTAINS 'function' which can be used in lookups

Changed LookupMapColumn._row_key_map to use right=set so one row can have many keys when CONTAINS is used.

Use CONTAINS to implement group column in summary table, while helper column in source table can reference and create multiple rows in summary table, especially when summarising by ChoiceList columns.

Use itertools.product to generate all combinations of lookup keys and groupby values.

cleanup

Test Plan: Added python unit tests.

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: paulfitz, dsagal

Differential Revision: https://phab.getgrist.com/D2900
2021-07-19 16:35:35 +02:00
..
__init__.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
date.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
info.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
logical.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
lookup.py (core) CONTAINS() and summarising by ChoiceList columns with flattening 2021-07-19 16:35:35 +02:00
math.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
schedule.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
stats.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
test_schedule.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
text.py (core) Remaining Python 3 compatibility changes 2021-06-25 12:00:58 +02:00
unimplemented.py (core) Improve suggestions for formula autocomplete 2020-09-12 00:21:29 -04:00