Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[describe-] collect aggr funcs that operate on list of values in Dict #2009

Merged
merged 2 commits into from
Sep 9, 2023

Commits on Sep 2, 2023

  1. [describe-] collect aggr funcs that operate on list of values in Orde…

    …redDict
    
    aggregator() converts a func, which operates on a list, into a _func,
    which operates on a srccol and a list of rows.
    
    The original functions were then added into Globals, but this caused problems for
    a function like `sum()` which appears naturally in Python code.
    
    I created an OrderedDict, and named it aggregators_vals as a place to
    store them.
    
    Other possible options:
    
    * We could include the optional funcvals along with func(srccol) for
    Aggregator. Describe Sheet could then grab the funcvals if it exists.
    
    * Describe Sheet could pass the srccol and list of rows, instead of
    vals. This is not ideal because it means for each aggregator, we call
    getValues once-more. This would cause a performance degradation.
    
    * Add them to vd.aggregators, possibly with the suffix "_vals", and
    create an Aggregator out of them as well. Have Describe Sheet pull
    aggrname_vals.
    
    * Similarly use the vd.aggregator_vals, but have a less terrible name.
    
    Optional: Do we want to do the work of porting quantiles and percentiles to be useable by Describe Sheet? Currently, an aggregator that does not go through aggregator() is not useable by Describe Sheet.
    anjakefala committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    8700e7c View commit details
    Browse the repository at this point in the history
  2. private functions should start with _

    saulpw authored and anjakefala committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    2b66c6f View commit details
    Browse the repository at this point in the history