-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add column name to JSONParsing exception message during index build #12151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good otherwise. Could you add before/after of this change? How we see this error now and how that'll be improved with this change.
...in/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java
Show resolved
Hide resolved
...main/java/org/apache/pinot/segment/local/segment/creator/impl/ColumnJsonParserException.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #12151 +/- ##
============================================
- Coverage 61.61% 61.51% -0.11%
Complexity 1153 1153
============================================
Files 2407 2416 +9
Lines 130922 131175 +253
Branches 20223 20245 +22
============================================
+ Hits 80669 80692 +23
- Misses 44366 44589 +223
- Partials 5887 5894 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
...in/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java
Show resolved
Hide resolved
...main/java/org/apache/pinot/segment/local/segment/creator/impl/ColumnJsonParserException.java
Outdated
Show resolved
Hide resolved
By the way, besides unit tests, were you able to do a manual test and see what happens when Pinot is running and this error happens? |
No I did not. Do I have to implement an integration test as well? |
For the manual test: probably best to do a simple one, Pinot's a complex system and I like to do quick manual tests after my unit tests just to make sure there are no unexpected interactions. For the integration test: that's a good question, yeah, I think it'd be great to have integration tests to check that Pinot correctly handles invalid inputs. @Jackie-Jiang what are your thoughts? |
I'll do the manual test. re: integration test, the current test builds a segment for real. I copied the idea from another test that tests segment build. So hopefully this test is enough w.r.t automation? |
Ran a manual test and was able to repro the error as well get the modified error message. I used this diff and ran
Error message is:
|
pinot-core/src/test/java/org/apache/pinot/queries/JsonMalformedIndexTest.java
Show resolved
Hide resolved
pinot-core/src/test/java/org/apache/pinot/queries/JsonMalformedIndexTest.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/pinot/segment/local/segment/creator/impl/ColumnJsonParserException.java
Show resolved
Hide resolved
...main/java/org/apache/pinot/segment/local/segment/creator/impl/ColumnJsonParserException.java
Outdated
Show resolved
Hide resolved
...main/java/org/apache/pinot/segment/local/segment/creator/impl/ColumnJsonParserException.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Xiaotian (Jackie) Jiang <17555551+Jackie-Jiang@users.noreply.github.com>
JSON Index build may fail due to errors in JSON content. When there are multiple JSON indices or when the schema is not immediately available, the column for which index build broke is not clear.
Add column name to the JSONParsing Exception message to help debug JSON index builds.
Previously, a JSON Parse Exception emitted the following message:
With this change, the above error message is prepended with
Column: <column name>