WIP: issue #255 - start handling even more datetimes as ranges#430
Closed
WIP: issue #255 - start handling even more datetimes as ranges#430
Conversation
on call with Paul and John, we identified about 7 other related things that need to get done, but hopefully these changes are a step in the right direcation TODO: * remove DATE column and always use DATE_START and DATE_END (even for instants) * handle date search parameter query params as instants when prefixed by lt, gt, le, or ge * handle date search parameter query params as implicit ranges in all other cases (when no fractional seconds are passed) Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre
commented
Nov 19, 2019
Comment on lines
+778
to
786
| if (!value.getValueDate().isPartial() && QueryBuilderUtil.hasSubSeconds(value.getValueDate().getValue()) && isInstantSearch) { | ||
| whereClauseSegment.append(LEFT_PAREN); | ||
| whereClauseSegment.append(tableAlias + DOT).append(DATE_VALUE) | ||
| .append(operator.value()) | ||
| .append(BIND_VAR); | ||
| bindVariables.add(Timestamp.from(datetime)); | ||
| whereClauseSegment.append(RIGHT_PAREN); | ||
| whereClauseSegment.append(RIGHT_PAREN); | ||
| } else { |
Member
Author
There was a problem hiding this comment.
i think this whole logic branch can get deleted if we add that "inclusive" boolean into the db and handle all datetime searches (except _lastUpdated) through DATE_START and DATE_END
lmsurpre
commented
Nov 19, 2019
Comment on lines
+158
to
+160
| private static ZonedDateTime minusOneMicroSecond(ZonedDateTime dateTime) { | ||
| return dateTime.minusNanos(1000); | ||
| } |
Member
Author
There was a problem hiding this comment.
this goes away if we can either normalize the end times to always be inclusive or exclusive OR make schema edits to know the difference.
Member
Author
There was a problem hiding this comment.
on our call today, we decided to attempt the latter.
Contributor
|
I believe I've captured all the changes in the PR in PR #506 |
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.
on call with Paul and John, we identified about 7 other related things
that need to get done, but hopefully these changes are a step in the right direcation
TODO:
Signed-off-by: Lee Surprenant lmsurpre@us.ibm.com