apache / apache/hugegraph-toolchain
ElementMapping. NullValues default add an empty string
- Dominant language
- Java
- Stars
- 121
- Forks
- 125
- Avg merge
- 10d 10h
- Merged PRs (30d)
- 3
Description
### Bug Type (问题类型)
data inconsistency (数据不一致)
### 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.0.0
Toolchain Version: v1.0.0
### Expected & Actual behavior (期望与实际表现)
public ElementMapping() {
this.skip = false;
this.mappingFields = new HashMap<>();
this.mappingValues = new HashMap<>();
this.selectedFields = new HashSet<>();
this.ignoredFields = new HashSet<>();
**this.nullValues = ImmutableSet.of(Constants.EMPTY_STR);**
this.updateStrategies = new HashMap<>();
this.batchSize = 500;
}
ElementMapping. NullValues structure adding an empty string, if the imported field allows to null and the value of the field value is an empty string, even nullValues in struct file do not fill in, but this field is still in the process of import will be filtered out
ElementStructV1.class
public ElementStructV1() {
this.skip = false;
this.mappingFields = new HashMap<>();
this.mappingValues = new HashMap<>();
this.selectedFields = new HashSet<>();
this.ignoredFields = new HashSet<>();
**this.nullValues = ImmutableSet.of(Constants.EMPTY_STR);**
this.updateStrategies = new HashMap<>();
this.uniqueKey = null;
}
vertex-struct.json files are converted to graphstructV1 objects. The nullvalues property also gives an empty string default value
### Vertex/Edge example (问题点 / 边数据举例)
_No response_
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the ElementMapping and ElementStructV1 constructors shown in the issue, then trace how vertex-struct.json is converted into the graph structure objects. Confirm how nullValues is used during import and define done as preventing an implicit empty-string null value unless it is explicitly configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100