Skip to content

Null pointer exception occurs when postgresql handles null values #1090

@shaolei7788

Description

@shaolei7788

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

PostgresqlColumnConverter#createExternalConverter

case FLOAT:
return (val, index, statement) ->
statement.setFloat(index, ((ColumnRowData) val).getField(index).asFloat());

((ColumnRowData) val).getField(index).asFloat() 等于null时 ,调用 setFloat(int fieldIndex, float x) 会发生异常,因为 Float 等于null时不能转为float

What you expected to happen

correct deal with null value

How to reproduce

see What happened

Anything else

no

Version

1.12_release

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions