Skip to content

Docstring and interface update for MatlabTable - #251

Closed
matthijscox wants to merge 1 commit into
masterfrom
MatlabTable-improvement
Closed

matthijscox wants to merge 1 commit into
masterfrom
MatlabTable-improvement

Conversation

@matthijscox

Copy link
Copy Markdown
Member

fixes #250

@quinnj quinnj left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@quinnj

quinnj commented Oct 4, 2026

Copy link
Copy Markdown
Member

Superseded by merged #262, which fixes #250 with the complete column interface: column access, the table returned by Tables.columns, and indexed column access. The implementation preserves the consumer's copycols choice and the existing fresh-file CopiedColumns boundary.

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.

@quinnj quinnj closed this Oct 4, 2026
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.

Docstring for MatlabTable

2 participants