queryverse / queryverse/Query.jl

Query Fails on columns of type Any

Open
#310 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
403
Forks
48
Avg merge
3d 6h
Merged PRs (30d)
6

Description

df = DataFrame(id=1:3,p=[[1, missing],[2, 3],[3, 4,missing]])

@from i in df begin
    @from j in i.p
    @select {i.id,p=j}
    @collect DataFrame
end

the above works because the column id has type Int, and column p has type Vector{Array{Union{Missing, Int64},1}}, but it fails on

df = DataFrame(id=1:3,p=Any[[1, missing],[2, 3],[3, 4,missing]])

This seems to me a bug, because the result DataFrame of above query have all the columns having type Any, preventing further query operations on the query result.

code tested on Query master v0.12.3-DEV, Julia v1.4.2 on windows 10.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the two Julia reproductions from the issue on Query master v0.12.3-DEV, comparing the query result types for the DataFrame column declared normally and the one declared as Any. Trace the query materialization and type inference path to identify why Any columns prevent further queries. Done means the Any-column case produces a usable query result without regressing the typed-column case.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.