Skip to content

Commit 6b49a65

Browse files
committed
Add Dagger.File loading support
1 parent 91d1943 commit 6b49a65

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ TableOperations = "ab02a1b2-a7df-11e8-156e-fb1833f50b87"
1414
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1515

1616
[compat]
17-
Dagger = "0.16.1, 0.17"
17+
Dagger = "0.18"
1818
DataAPI = "1"
1919
DataFrames = "1.4"
2020
InvertedIndices = "1"

src/table/dtable.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const VTYPE = Vector{Union{Dagger.Chunk,Dagger.EagerThunk}}
1+
const ELTYPE = Union{Dagger.Chunk,Dagger.EagerThunk}
2+
const VTYPE = Vector{ELTYPE}
23

34
"""
45
DTable
@@ -153,6 +154,11 @@ function _file_load(filename::AbstractString, loader_function::Function, tablety
153154
return tpart
154155
end
155156

157+
function DTable(files::Vector{Dagger.File}; tabletype=nothing)
158+
chunks = ELTYPE[file.chunk for file in files]
159+
return DTable(chunks, tabletype)
160+
end
161+
156162
"""
157163
fetch(d::DTable)
158164

0 commit comments

Comments
 (0)