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

Fixes 3446: Aggregation Functions #398

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

Fixes 3446: Aggregation Functions #398

wants to merge 2 commits into from

Conversation

vga91
Copy link
Owner

@vga91 vga91 commented Nov 22, 2023

    /*
    todo: step 1 https://duckdb.org/docs/sql/aggregates#general-aggregate-functions
        any_value(arg)	OK
        arg_max(arg, val)	NO -> apoc.agg.maxItems()
        arg_min(arg, val)	NO -> apoc.agg.minItems()
        avg(arg)	no -> avg() in Cypher
        bit_and(arg)	Returns the bitwise AND of all bits in a given expression .	bit_and(A)	-
        bit_or(arg)	Returns the bitwise OR of all bits in a given expression.	bit_or(A)	-
        bit_xor(arg)	Returns the bitwise XOR of all bits in a given expression.	bit_xor(A)	-
        bitstring_agg(arg)	Returns a bitstring with bits set for each distinct value.	bitstring_agg(A)	-
        bool_and(arg)	Returns true if every input value is true, otherwise false.	bool_and(A)	-
        bool_or(arg)	Returns true if any input value is true, otherwise false.	bool_or(A)	-
        count(arg)	NO
        favg(arg)	NO
        first(arg)	--> apoc.agg.first
        fsum(arg)	--> sum()
        geomean(arg)	Calculates the geometric mean for all tuples in arg.	geomean(A)	geometric_mean(A)
        histogram(arg)	Returns a MAP of key-value pairs representing buckets and counts.	histogram(A)	-
        last(arg)	--> apoc.agg.last
        list(arg)	--> collect()
        max(arg)	NO -> max()
        min(arg)	NO -> min()
        product(arg)	NO -> apoc.agg.product()
        string_agg(arg, sep)	NO --> apoc.agg.join
        sum(arg) --> sum()
        histogram(arg) --> maybe apoc.agg.statistics
        
        https://duckdb.org/docs/sql/aggregates#ordered-set-aggregate-functions --> NO percentileCont() and percentileDisc()
        
        TODO IN ANOTHER PR MAYBE:
            https://duckdb.org/docs/sql/aggregates#approximate-aggregates
            https://duckdb.org/docs/sql/aggregates#statistical-aggregates
                
     */
    
        /*
    VALID:
    any_value
    bit_and ok 
    bit_or ok
    bit_xor ok
    bitstring_agg
    bool_and --> called apoc.agg.all()
    bool_or -->  called apoc.agg.any()
    geomean --> ??
    histogram --> ??
    
     */
// todo - non è tanto chiaro cosa faccia `bitstring_agg` di DuckDB
// e se il concetto di bits set sia l'equivalente di java.util.BitSet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant