apache / apache/hugegraph-toolchain
[Bug] MySQL 后端导入自带的测试 NULL 数据报转换错误
- Dominant language
- Java
- Stars
- 121
- Forks
- 125
- Avg merge
- 10d 10h
- Merged PRs (30d)
- 3
Description
### Bug Type (问题类型)
exception / error (异常报错)
### Before submit
- [X] I had searched in the [issues](https://github.com/apache/hugegraph-toolchain/issues) and found no similar issues.
### Environment (环境信息)
- Server Version: v1.x.x
- Toolchain Version: v1.x.x
- Data Size: 6 vertices, 2 edges
### Expected & Actual behavior (期望与实际表现)
使用的是hugegraph-loader 下面static/example/mysql 的配置导入的
第6个person tom 的数据 age通过mysql reader读进去是 NULL_STR = "NULL"
会触发异常
java.lang.IllegalArgumentException: Failed to convert value(key=age) 'NULL'(class java.lang.String) to Number
### Vertex/Edge example (问题点 / 边数据举例)
```javascript
(1,'marko',29,'Beijing'),(2,'vadas',27,'HongKong'),(3,'josh',32,'Beijing'),(4,'peter',35,'Shanghai'),(5,'li,nary',26,'Wu,han'),(6,'tom',NULL,NULL)
```
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
```javascript
{
"vertices": [
{
"label": "person",
"input": {
"type": "jdbc",
"vendor": "mysql",
"driver": "com.mysql.cj.jdbc.Driver",
"url": "jdbc:mysql://127.0.0.1:3306",
"database": "example",
"table": "person",
"username": "root",
"password": "",
"batch_size": 500
},
"id": "id",
"null_values": ["NULL"]
},
{
"label": "software",
"input": {
"type": "jdbc",
"vendor": "mysql",
"driver": "com.mysql.cj.jdbc.Driver",
"url": "jdbc:mysql://127.0.0.1:3306",
"database": "example",
"table": "software",
"username": "root",
"password": "",
"batch_size": 500
},
"id": "id"
}
],
"edges": [
{
"label": "knows",
"source": ["source_id"],
"target": ["target_id"],
"input": {
"type": "jdbc",
"vendor": "mysql",
"driver": "com.mysql.cj.jdbc.Driver",
"url": "jdbc:mysql://127.0.0.1:3306",
"database": "example",
"table": "knows",
"username": "root",
"password": "",
"batch_size": 500
},
"ignored": ["id"]
},
{
"label": "created",
"source": ["source_id"],
"target": ["target_id"],
"input": {
"type": "jdbc",
"vendor": "mysql",
"driver": "com.mysql.cj.jdbc.Driver",
"url": "jdbc:mysql://127.0.0.1:3306",
"database": "example",
"table": "created",
"username": "root",
"password": "",
"batch_size": 500
},
"ignored": ["id"]
}
]
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.