Skip to content

Conversation

tkf
Copy link

@tkf tkf commented Sep 26, 2019

Before:

julia> TableTraits.isiterabletable((NamedTuple{(:x, :y), T} where T)[(x=1, y=1)])
false

After:

julia> TableTraits.isiterabletable((NamedTuple{(:x, :y), T} where T)[(x=1, y=1)])
true

@codecov-io
Copy link

codecov-io commented Sep 26, 2019

Codecov Report

Merging #11 into master will increase coverage by 25%.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #11    +/-   ##
======================================
+ Coverage      75%   100%   +25%     
======================================
  Files           1      1            
  Lines          12      9     -3     
======================================
  Hits            9      9            
+ Misses          3      0     -3
Impacted Files Coverage Δ
src/TableTraits.jl 100% <100%> (+25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b58ef6...246b7c9. Read the comment docs.

@davidanthoff
Copy link
Member

So I think one of the invariants I want to keep is that something is only an iterable table, if the type of all things it iterates is exactly the same. I think in the case of an iterator with element type (NamedTuple{(:x, :y), T} where T) that could or could not be the case, right? So we should probably return missing in that case, which in this design here indicates that it is unclear whether something is actually an iterable table or not.

The trouble then of course is that the entire package ecosystem in queryverse can't handle cases right now where isiterabletable returns missing :) Changing that has been on my todo list for years, and at some point I'll get to it, but that is the state of things right now...

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.

3 participants