Merge pull request #31 from taosdata/dev/zyyang

fix: handle null data
This commit is contained in:
Shuduo Sang 2022-06-16 13:13:01 +08:00 committed by GitHub
commit 50d30d941c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,6 +307,8 @@ public class DefaultDataHandler implements DataHandler {
if (colMeta.type.equals("TIMESTAMP"))
return "\"" + column.asString() + "\"";
String value = column.asString();
if (value == null)
return "NULL";
return "\'" + Utils.escapeSingleQuota(value) + "\'";
case NULL:
case BAD: