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

Infer specific column value type in aggregations #5297

Merged
merged 1 commit into from Aug 28, 2022

Commits on Aug 9, 2022

  1. Infer specific column value type in aggregations

    The first overload of TypePreservingAggregation (taking columnName and
    options) used `Readonly<TKey>` for the columnName type. In this context,
    `TKey` is supposed to be a single column name, but `Readonly<TKey>` maps
    over the full constraint of `ResolveTableType<TRecord>`.
    
    This results in `TKey` being a union of all keys in the table, rather
    than a single key. Because of this, the result type ends up being a
    union of all values in the table.
    
    The fix is to remove the `Readonly` type, which is fine since `TKey` is
    a string and not an object like in the other overloads.
    mrichards42 committed Aug 9, 2022
    Copy the full SHA
    c748f39 View commit details
    Browse the repository at this point in the history