0nly update row counters on output records#1323
Merged
Conversation
kylebaron
commented
Feb 11, 2026
| code_counter_update_on_output <- ' | ||
| $preamble capture total = 0; | ||
| $main self.mtime(12); | ||
| $table if(self.rown+1 == self.nrow) ++total; |
Collaborator
Author
There was a problem hiding this comment.
The condition tested here should only evaluate true once during the problem. With the mtime call and the delta we picked in the output time grid, it will get called twice because the counter got incremented indicating we were at the final record, but really we were seeing a non-output record.
kyleam
approved these changes
Feb 11, 2026
Contributor
kyleam
left a comment
There was a problem hiding this comment.
but I think it would be easier at this point to just keep the existing logic and go with an easy adjustment that only controls when the user sees this.
Makes sense to me.
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.
There could be non-output records that are encountered between two output records. When the row counters are incremented, these updated counters can suggest we are farther along in the output data than we really are. There is no change to when counters are incremented, but I'm going to wait to update the objects that the user sees until we are actually advancing to an output record. I could potentially see refactoring when those counters are incremented, but I think it would be easier at this point to just keep the existing logic and go with an easy adjustment that only controls when the user sees this.
While investigating this issue, a separate issue was found with the individual counter when only an individual data set is passed #1324 .
Also opened #1322 where we will only insert tgrid records through the last output data set time.