Skip to content
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

refact: show detail info when parse line meet error #325

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

BestBurning
Copy link
Contributor

fix line cheack argument, then it'll show detail info

Comment on lines 41 to 43
"The length of names %s should be same as values %s",
Arrays.toString(names),
Arrays.toString(values));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep the original align style, thanks

and better to show/paste the difference in comment

@imbajin imbajin changed the title fix: Line check argument show detail info refact: show detail info when parse line error Aug 17, 2022
@imbajin imbajin changed the title refact: show detail info when parse line error refact: show detail info when parse line meet error Aug 17, 2022
@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #325 (9041c32) into master (278fbea) will decrease coverage by 67.49%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #325       +/-   ##
============================================
- Coverage     67.49%   0.00%   -67.50%     
============================================
  Files            86      86               
  Lines          4024    4031        +7     
  Branches        475     478        +3     
============================================
- Hits           2716       0     -2716     
- Misses         1104    4031     +2927     
+ Partials        204       0      -204     
Impacted Files Coverage Δ
...a/com/baidu/hugegraph/loader/reader/line/Line.java 0.00% <0.00%> (-72.42%) ⬇️
.../com/baidu/hugegraph/loader/source/SourceType.java 0.00% <0.00%> (-100.00%) ⬇️
...m/baidu/hugegraph/loader/parser/CsvLineParser.java 0.00% <0.00%> (-100.00%) ⬇️
.../baidu/hugegraph/loader/reader/AbstractReader.java 0.00% <0.00%> (-100.00%) ⬇️
...baidu/hugegraph/loader/source/file/FileFormat.java 0.00% <0.00%> (-100.00%) ⬇️
...aidu/hugegraph/loader/executor/GroovyExecutor.java 0.00% <0.00%> (-100.00%) ⬇️
...aidu/hugegraph/loader/source/file/Compression.java 0.00% <0.00%> (-100.00%) ⬇️
...idu/hugegraph/loader/exception/ParseException.java 0.00% <0.00%> (-100.00%) ⬇️
...u/hugegraph/loader/progress/InputItemProgress.java 0.00% <0.00%> (-100.00%) ⬇️
...com/baidu/hugegraph/loader/metrics/LoadReport.java 0.00% <0.00%> (-96.78%) ⬇️
... and 70 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@imbajin
Copy link
Member

imbajin commented Aug 30, 2022

Any update with this pr? Just some tiny comments

@github-actions
Copy link

Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label

Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BestBurning Thanks for your contribution, could you please address the comments, and we will merge this PR as soon as you make the changes.

@@ -37,7 +38,9 @@ public Line(String rawLine, String[] names, Object[] values) {
E.checkArgumentNotNull(names, "The names can't be null");
E.checkArgumentNotNull(values, "The values can't be null");
E.checkArgument(names.length == values.length,
"The length of names %s should be same as values %s");
"The length of names %s should be same as values %s",
Arrays.toString(names),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to add if-statement check to avoid unnecessary toString() call:

if (names.length != values.length) {
    E.checkArgument(...);
}

@github-actions
Copy link

Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label

javeme
javeme previously approved these changes Nov 1, 2022
@imbajin imbajin merged commit 6374d5f into apache:master Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants