-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate Intervals.of() error message to user #15454
Merged
Merged
Conversation
This file contains 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
abhishekagarwal87
approved these changes
Nov 30, 2023
rash67
force-pushed
the
interval-error-message
branch
3 times, most recently
from
December 13, 2023 23:32
e0a0047
to
908a3d9
Compare
This broke some unit tests that expected IllegalArgumentException. I updated so they expect DruidException with a proper category and all checks pass |
processing/src/test/java/org/apache/druid/java/util/common/IntervalsTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/apache/druid/test/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
rash67
force-pushed
the
interval-error-message
branch
2 times, most recently
from
December 14, 2023 21:41
69374cf
to
a3fc2f3
Compare
server/src/test/java/org/apache/druid/metadata/SqlSegmentsMetadataManagerTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/apache/druid/metadata/SqlSegmentsMetadataManagerTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/apache/druid/server/http/DataSourcesResourceTest.java
Outdated
Show resolved
Hide resolved
rash67
force-pushed
the
interval-error-message
branch
from
December 15, 2023 22:52
a3fc2f3
to
2643a45
Compare
server/src/test/java/org/apache/druid/server/http/DataSourcesResourceTest.java
Fixed
Show resolved
Hide resolved
rash67
force-pushed
the
interval-error-message
branch
3 times, most recently
from
January 5, 2024 02:59
e714049
to
b0464de
Compare
rash67
force-pushed
the
interval-error-message
branch
from
January 12, 2024 02:08
08bff49
to
f07d6e2
Compare
|
||
EasyMock.verify(overlordClient, server); | ||
DruidExceptionMatcher.invalidInput().assertThrowsAndMatches( | ||
() -> dataSourcesResource.markAsUnusedAllSegmentsOrKillUnusedSegmentsInInterval("datasource", "true", "???", request) |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
Invoking should be avoided because it has been deprecated.
DataSourcesResource.markAsUnusedAllSegmentsOrKillUnusedSegmentsInInterval
Error loading related location
Loading
rash67
force-pushed
the
interval-error-message
branch
from
January 15, 2024 22:21
f07d6e2
to
783af16
Compare
rash67
force-pushed
the
interval-error-message
branch
from
January 16, 2024 00:12
783af16
to
ae27630
Compare
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.
Description
In SQL, when specifying an interval, eg '2020-01-01T:00:00:00Z/2021-01-01T00:00:00Z', errors in the string are not shown to the user. It gives an unknown error and no useful information.
This propagates any errors from Intervals.of() properly by catching and throwing the proper exception
Release note
-Improve error message on interval construction in SQL statements