-
Notifications
You must be signed in to change notification settings - Fork 50
feat(QTDI-1305): improve error in record #1041
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
Merged
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
c924108
Add withError in Record.Builder
yyin-talend ae4cad7
Test for AvroRecord
yyin-talend 9205765
fix isValid
yyin-talend cfa68e8
Merge branch 'master' into yyin/QTDI-1305-ImproveErrorInRecord
yyin-talend cf0a3c6
Add sample-feature\supporterror
yyin-talend 7d049d1
worked
yyin-talend 441faae
fix bug
yyin-talend 0d8f532
Merge branch 'master' into yyin/QTDI-1305-ImproveErrorInRecord
yyin-talend de71297
Add new method to white list.
yyin-talend d5ab539
Add "valid":true to serialization
yyin-talend 86ad7ee
Add "valid":true to serialization
yyin-talend 884420f
Add "valid":true to serialization
yyin-talend a9450e3
rename
yyin-talend 727c512
revert junit which no need to change
yyin-talend e2dbb27
fix one problem
yyin-talend 21cccfc
Merge branch 'master' into yyin/QTDI-1305-ImproveErrorInRecord
yyin-talend d2cf309
fix import order
yyin-talend 02a5ebd
fix import order
yyin-talend 92df0c0
change command jar
yyin-talend fb6a891
fix sonar
yyin-talend 7314bfb
remove comment
yyin-talend 01389f5
add readme
yyin-talend 7884086
remove withError in record API
yyin-talend e9ea736
add getErrorMessage,getErrorFallbackValue in Entry API
yyin-talend 8633ea1
feat(QTDI-1305): Fix RecordBuilder builder pattern +some improvements…
ypiel-talend 9e8120a
Merge branch 'master' into yyin/QTDI-1305-ImproveErrorInRecord-2
yyin-talend 6e3ad2b
feat(QTDI-1305): set RecordImpl#BuilderImpl#entriesInError final.
ypiel-talend 9df828e
feat(QTDI-1305): Fix entry with error in AvroRecord + unit test.
ypiel-talend fc71e1a
add transfer "errorcapable" between Avro.Field and Schema.Entry.
yyin-talend b4e2ad3
feat(QTDI-1305): Fix some unit test + improve sample CLI
ypiel-talend c5e38bb
Add withError in Record.Builder
yyin-talend 5ba8a4b
Test for AvroRecord
yyin-talend 2ce8bc8
fix isValid
yyin-talend beca024
Add sample-feature\supporterror
yyin-talend ad5aeae
worked
yyin-talend 53d8c05
fix bug
yyin-talend 327161f
Add new method to white list.
yyin-talend 92b02ae
Add "valid":true to serialization
yyin-talend 042b9aa
Add "valid":true to serialization
yyin-talend a7b28c2
Add "valid":true to serialization
yyin-talend 68e1f0d
rename
yyin-talend c51e830
revert junit which no need to change
yyin-talend a830a96
fix one problem
yyin-talend 1d46e1f
fix import order
yyin-talend a537dfd
fix import order
yyin-talend fb73c8d
change command jar
yyin-talend 9a408f4
fix sonar
yyin-talend 5af6128
remove comment
yyin-talend a3b0fda
add readme
yyin-talend 96b5897
remove withError in record API
yyin-talend c87b923
add getErrorMessage,getErrorFallbackValue in Entry API
yyin-talend 05b7b3f
feat(QTDI-1305): Fix RecordBuilder builder pattern +some improvements…
ypiel-talend 684f1ee
feat(QTDI-1305): set RecordImpl#BuilderImpl#entriesInError final.
ypiel-talend a39f2be
feat(QTDI-1305): Fix entry with error in AvroRecord + unit test.
ypiel-talend 41fb00b
add transfer "errorcapable" between Avro.Field and Schema.Entry.
yyin-talend 8ca7681
feat(QTDI-1305): Fix some unit test + improve sample CLI
ypiel-talend d563561
Merge branch 'yyin/QTDI-1305-ImproveErrorInRecord-2' of github.com:Ta…
ypiel-talend 493d65a
feat(QTDI-1305): the CLI display error in 'name' attribute.
ypiel-talend d9efb30
Merge branch 'yyin/QTDI-1305-ImproveErrorInRecord-2' of github.com:Ta…
ypiel-talend a31416e
feat(QTDI-1305): the CLI display value even when error.
ypiel-talend 2e24616
feat(QTDI-1305): Fix icons.
ypiel-talend d0b2bf9
feat(QTDI-1305): Improve properties keys.
ypiel-talend 7b84705
feat(QTDI-1305): Clean code.
ypiel-talend c7c3f49
feat(QTDI-1305): Clean code.
ypiel-talend aaf7453
feat(QTDI-1305): Fix readme.
ypiel-talend a1840c9
feat(QTDI-1305): Adda property on IndexedRecord/schema to check if th…
ypiel-talend d5e09df
feat(QTDI-1305): Display entries original name in error.
ypiel-talend 2780de7
feat(QTDI-1305): Add a unit test.
ypiel-talend File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,6 +232,16 @@ interface Entry { | |
*/ | ||
boolean isMetadata(); | ||
|
||
/** | ||
* @return Is this entry can be in error. | ||
*/ | ||
boolean isErrorCapable(); | ||
|
||
/** | ||
* @return true if the value of this entry is valid; false for invalid value. | ||
*/ | ||
boolean isValid(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can also add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not using schema, but using Entry. |
||
|
||
/** | ||
* @param <T> the default value type. | ||
* | ||
|
@@ -296,6 +306,14 @@ default Entry.Builder toBuilder() { | |
throw new UnsupportedOperationException("#toBuilder is not implemented"); | ||
} | ||
|
||
default String getErrorMessage() { | ||
return getProp(SchemaProperty.ENTRY_ERROR_MESSAGE); | ||
} | ||
|
||
default String getErrorFallbackValue() { | ||
return getProp(SchemaProperty.ENTRY_ERROR_FALLBACK_VALUE); | ||
} | ||
|
||
/** | ||
* Plain builder matching {@link Entry} structure. | ||
*/ | ||
|
@@ -317,6 +335,8 @@ default Builder withLogicalType(String logicalType) { | |
|
||
Builder withNullable(boolean nullable); | ||
|
||
Builder withErrorCapable(boolean errorCapable); | ||
|
||
Builder withMetadata(boolean metadata); | ||
|
||
<T> Builder withDefaultValue(T value); | ||
|
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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 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.
See sonar comment, more easy to read that double negation.