[ 
https://issues.apache.org/jira/browse/IGNITE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maksim Zhuravkov updated IGNITE-22040:
--------------------------------------
    Description: 
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 a error message like in 
KeyValueView<Tuple> case somewhere down the stack

KeyValueView<Integer, Val>:
Failed to write field [id=0]  // with a 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 a 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.

  was:
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 a error message like in 
KeyValueView<Tuple> case somewhere down the stack

KeyValueView<Integer, Val>:
Failed to write field [id=0]  // with a 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 a error message like in RecordView<Tuple> 
case somewhere down the stack
{code}

Meanwhile NOT NULL constraint violation error 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.


> 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
>            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 a error message like in 
> KeyValueView<Tuple> case somewhere down the stack
> KeyValueView<Integer, Val>:
> Failed to write field [id=0]  // with a 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 a 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)

Reply via email to