Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin authored and knaufk committed Feb 23, 2022
1 parent e169bbc commit 98c833d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ CREATE TEMPORARY TABLE complex_collections (
'fields.multiset-house-points.length' = '3'
);

SELECT * FROM complex_collections;
```

### "One Of" Columns
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/github/knaufk/flink/faker/FakerUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class FakerUtils {
static Object stringValueToType(
FieldInfo fieldInfo, Function<String, String> fakerExpression2Value) {
if (fieldInfo.getNullRate() == 1.0
|| fieldInfo.getNullRate() > ThreadLocalRandom.current().nextFloat()) {
|| fieldInfo.getNullRate() > 0
&& fieldInfo.getNullRate() > ThreadLocalRandom.current().nextFloat()) {
return null;
}
String[] fakerExpressions = fieldInfo.getExpressions();
Expand Down

0 comments on commit 98c833d

Please sign in to comment.