Code Monkey home page Code Monkey logo

Comments (3)

dldx avatar dldx commented on May 24, 2024 1

I just discovered the same issue. It seems like a bug to me?

@carsten-jahn Did you find a solution for this?

How to reproduce:

aq.table({ v: [1, null, 1, 2, 3, 1] })
  .rollup({ a: op.array_agg('v') }) // [1, 1, 2, 3, 1]

from arquero.

carsten-jahn avatar carsten-jahn commented on May 24, 2024

Hi @dldx , I looked into this again. I don't have an elegant solution for this in arquero. All I can do is setting the null values to a specific constant before calling array_agg, and eventually replacing the constant with null before using the array elsewhere.

I had a look into implementing a custom aggregator function as described in https://uwdata.github.io/arquero/api/extensibility#addAggregateFunction and https://observablehq.com/@uwdata/adding-aggregate-functions-to-arquero , however this doesn't help either, as its add function is called for every "valid" element only. The state visible in the aggregator does tell you how many invalid elements there are, but you cannot know the order in which those appear.

from arquero.

dldx avatar dldx commented on May 24, 2024

@carsten-jahn Thanks for replying! I will try to investigate further :)

from arquero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.