Skip to content

Commit 7cb1ea0

Browse files
ericyuanhuiadsharma
authored andcommitted
pybind miss NONE type checking cause core dump
Signed-off-by: ericyuanhui <285521263@qq.com>
1 parent 9fc6b00 commit 7cb1ea0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src_cpp/py_connection.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,9 @@ Value PyConnection::transformPythonValueAs(const py::handle& val, const LogicalT
913913

914914
Value PyConnection::transformPythonValueFromParameterAs(const py::handle& val,
915915
const LogicalType& type) {
916+
if (val.is_none()) {
917+
return Value::createNullValue(type);
918+
}
916919
switch (type.getLogicalTypeID()) {
917920
case LogicalTypeID::LIST: {
918921
if (ListType::getChildType(type).getLogicalTypeID() == LogicalTypeID::JSON) {

0 commit comments

Comments
 (0)