Calling Record.get on a field that is contains null will return Some(null) instead of None, which causes a NPE problems e.g. in the RowRelation's where method.
Problem Description
A Record's field can be null if a field is not given a value using the withCellContent method for a field that it is initialised with using the proper column definition:
val record = Record(Seq(ColumnDef[Int]("id"))).build()
record.get[Int](ColumnDef[Int]("id")) // returns Some(null)
Operating on such a Some(null) using i.a. the exists method will cause a NPE.
Supporting Information
I will attempt to fix this by checking that the the field is not null in Record.get.
Issue
Calling
Record.get
on a field that is containsnull
will returnSome(null)
instead ofNone
, which causes a NPE problems e.g. in theRowRelation
'swhere
method.Problem Description
A
Record
's field can benull
if a field is not given a value using thewithCellContent
method for a field that it is initialised with using the proper column definition:Operating on such a
Some(null)
using i.a. theexists
method will cause a NPE.Supporting Information
I will attempt to fix this by checking that the the field is not null in
Record.get
.