Skip to content

The percentile argument for ApproxPercentileCont must be Float64, not Decimal128(2, 1) #4103

Closed

Description

@andygrove

Describe the bug
I found this when testing #4102. csv_query_approx_percentile_cont fails with:

The percentile argument for ApproxPercentileCont must be Float64, not Decimal128(2, 1)

To Reproduce
Run tests in #4102

Expected behavior
I assume we need to add type coercion to convert function args to the correct type

Additional context

Activity

  1. comphead commented on Nov 10, 2022

    @comphead
    Contributor

    @andygrove please assign this to me

  2. comphead commented on Nov 12, 2022

    @comphead
    Contributor

    Local test to reproduce

    #[tokio::test]
    async fn test_approx_percentile_cont() -> Result<()> {
        let ctx = SessionContext::new();
        register_aggregate_csv(&ctx).await?;
        let sql = "SELECT approx_percentile_cont(c2, cast(1.0 as decimal(10,2))) FROM aggregate_test_100";
        execute_to_batches(&ctx, sql).await;
    
        Ok(())
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions