Unify read_table and read_my_table #504
Merged
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.
This PR removes the
read_my_table
routine completely and changesread_table
to honor thetable
command argument if specified. TheREADTABLE
andREADMYTABLE
commands now do exactly the same.The two routines were essentially the same, with two differences (see diff below):
read_table
ignores the user-specifiedtable
command argument if a name is defined in the file.read_my_table
does not read the table summaryI don't think there is any backward-compatibility issue, since (1) the
table
option forREADTABLE
was so far undocumented, and (2) suddenly getting the table summary as well when usingREADMYTABLE
shouldn't be an issue.Rationale
The presence of a
table
parameter for theREADTABLE
command implies that you can specify the table name, which seems to work - as long as the file either doesn't specify a name or its name is the same as the one you specified by hand - until it doesn't work..This means, you are forced to use
READMYTABLE
if you want to load a table reliably, but then the summary is not loaded.Diff between the two functions
Modulo whitespace, the diff from
read_my_table
toread_table
was: