Skip to content

casting count - subtle aggregation differences #76

@chrismo

Description

@chrismo
#!/usr/bin/env bash

set -euo pipefail

export ASDF_SUPERDB_VERSION=0.50930

super --version

seq 1 10 | super -c "count()" -
seq 1 10 | super -c "count()::int64" -
seq 1 10 | super -c "cast(count(), <int64>)" -
seq 1 10 | super -c "count() | this::int64" -

I think it's subtle because of the syntax. If we were to call cast in the 2nd example, super going into expression context might be more obvious (the 3rd is the equivalent of the 2nd).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions