Conversation
) When inferTypes=false and a schema is also provided, the schema was previously ignored entirely and all columns were treated as strings. This change ensures the schema overrides are applied when a schema is present, regardless of the inferTypes setting. Fixes #347 Co-authored-by: Copilot <[email protected]>
9 tasks
…types-852b16121e44f733
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Repo Assist — automated bug fix (Task 3: Issue Investigation and Fix).
Closes #347
Root Cause
In
FrameUtils.readCsv, theinferTypes=falsecode path unconditionally set all columns tostring, ignoring theschemaparameter entirely:The
schemaargument was only passed toInferColumnTypesin theinferTypes=true/Nonebranch.Fix
When
inferTypes=falseand a non-emptyschemais provided, we now callInferColumnTypesso that the schema overrides are respected. Columns explicitly specified in the schema use the declared type; columns not mentioned in the schema are still inferred from data (which is the most useful behaviour when the caller has declared overrides for a subset of columns).The XML documentation comments on
ReadCsvare also updated to clarify that schema overrides are respected even wheninferTypes=false.Usage example
Test Status
Schema is respected when inferTypes=false (regression #347)added toFrame.fsdotnet test tests/Deedle.Tests/Deedle.Tests.fsproj -c Release)