Skip to content

Commit

Permalink
Fixed a typo on name option for IFeatureLayer(table)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu17g committed Oct 12, 2021
1 parent 5035a0e commit 541ff9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ function _fromtable(
)::IFeatureLayer where {names}
cols = Tables.columns(rows)
types = (eltype(collect(col)) for col in cols)
return _fromtable(Tables.Schema(names, types), rows; name)
return _fromtable(Tables.Schema(names, types), rows; name=name)
end

function _fromtable(::Nothing, rows, name::String = "")::IFeatureLayer
function _fromtable(::Nothing, rows; name::String = "")::IFeatureLayer
state = iterate(rows)
state === nothing && return IFeatureLayer()
row, _ = state
names = Tables.columnnames(row)
return _fromtable(Tables.Schema(names, nothing), rows; name)
return _fromtable(Tables.Schema(names, nothing), rows; name=name)
end

"""
Expand Down Expand Up @@ -232,5 +232,5 @@ function IFeatureLayer(table; name::String = "")::IFeatureLayer
# Extract table data
rows = Tables.rows(table)
schema = Tables.schema(table)
return _fromtable(schema, rows; name)
return _fromtable(schema, rows; name=name)
end

0 comments on commit 541ff9b

Please sign in to comment.