[
https://issues.apache.org/jira/browse/IGNITE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maksim Zhuravkov reassigned IGNITE-22040:
-----------------------------------------
Assignee: Maksim Zhuravkov
> KeyValue/RecordView. Improve error messages for constraint violation errors.
> -----------------------------------------------------------------------------
>
> Key: IGNITE-22040
> URL: https://issues.apache.org/jira/browse/IGNITE-22040
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Maksim Zhuravkov
> Assignee: Maksim Zhuravkov
> Priority: Minor
> Labels: ignite-3
>
> Examples of top level error messages, when user code attempts to write NULL
> to not nullable field via KeyValueView/RecordView API:
> {code}
> KeyValueView<Tuple>:
> Failed to set column (null was passed, but column is not nullable):
> [col=Column [rowPosition=1, keyPosition=-1, valuePosition=0,
> colocationPosition=-1, name=VAL, type=NativeType [name=INT32, sizeInBytes=4,
> fixed=true], nullable=false]]
> KeyValueView<Integer,Integer>:
> Failed to write field [id=1] // with an error message like in
> KeyValueView<Tuple> case somewhere down the stack
> KeyValueView<Integer, Val>:
> Failed to write field [id=0] // with an error message like in
> KeyValueView<Tuple> case somewhere down the stack
> RecordView<Tuple>:
> Failed to set column (null was passed, but column is not nullable):
> [col=Column [rowPosition=1, keyPosition=-1, valuePosition=0,
> colocationPosition=-1, name=VAL, type=NativeType [name=INT32, sizeInBytes=4,
> fixed=true], nullable=false]]
> RecordView<Rec>:
> Failed to write field [id=1] // with an error message like in
> RecordView<Tuple> case somewhere down the stack
> {code}
> Meanwhile NOT NULL constraint violation error reported via SQL look like this:
> {code}
> Column 'MY_COL' does not allow NULLs.
> {code}
> Let's improve error reporting so that error messages for KV/Record View API
> would be similar to SQL ones.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)