Repository navigation
Docstring and interface update for MatlabTable - #251
matthijscox wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
P2: Complete the column interface before returning it from Tables.columns. At exact head cc8e1dc, t = MatlabTable([:a,:b,:c], [[1,2],[3,4],[5,6]]) and cols = Tables.columns(t) make Tables.getcolumn(cols, 1) return the column names, index 2 return all columns, and index 3 throw BoundsError. The wrapper delegates positional access to Tables' generic getfield fallback because getcolumn(::MatlabTable, ::Int) is missing. Tables.rowtable(t) also throws because columnaccess is not declared. The independent nine-check consumer probe has five passes, two failures, and two errors on this head. Please cover integer access and row consumers, not only symbolic access.
The proposed wrapper also makes DataFrame(t) share the input vectors by default. For this mutable existing table, returning t as the columns object preserves the destination's normal copy choice; the existing file-reader boundary already wraps freshly read columns in CopiedColumns.
Validated with Julia 1.12.6, Tables 1.14.0, and DataFrames 1.8.2. A focused current-master alternative in #262 completes positional and row access while retaining the destination's copy policy.
AI disclosure: This work was prepared with assistance from OpenAI Codex.
|
Superseded by merged #262, which fixes #250 with the complete column interface: column access, the table returned by The final change passes the full Julia 1.6/current suites, 16 permanent table regressions, and 16 independent DataFrames integration checks on both versions. All head checks and the merged main-branch tests/docs are green. Closing this alternative now that #250 is resolved. Thanks for identifying the table interface problem. AI disclosure: This work was prepared with assistance from OpenAI Codex. |
fixes #250