Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-22040

KeyValue/RecordView. Improve error messages for constraint violation errors.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • sql

    Description

      Examples of top level error messages, when user code attempts to write NULL to not nullable field via KeyValueView/RecordView API:

      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
      

      Meanwhile NOT NULL constraint violation error reported via SQL look like this:

      Column 'MY_COL' does not allow NULLs.
      

      Let's improve error reporting so that error messages for KV/Record View API would be similar to SQL ones.

      Attachments

        Issue Links

          Activity

            People

              mzhuravkov Maksim Zhuravkov
              mzhuravkov Maksim Zhuravkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h