-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
360 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/main/java/com/github/knaufk/flink/faker/FieldInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package com.github.knaufk.flink.faker; | ||
|
||
import java.io.Serializable; | ||
import java.util.Arrays; | ||
import java.util.Map; | ||
import org.apache.flink.table.types.logical.LogicalType; | ||
|
||
public class FieldInfo implements Serializable { | ||
private final Float nullRate; | ||
private final LogicalType logicalType; | ||
private final String[] expressions; | ||
private final Integer length; | ||
private final Map<String, FieldInfo> nestedFields; | ||
|
||
public FieldInfo( | ||
Float nullRate, | ||
LogicalType logicalType, | ||
String[] expressions, | ||
Integer length, | ||
Map<String, FieldInfo> nestedFields) { | ||
this.nullRate = nullRate; | ||
this.logicalType = logicalType; | ||
this.expressions = expressions; | ||
this.length = length; | ||
this.nestedFields = nestedFields; | ||
} | ||
|
||
public Float getNullRate() { | ||
return nullRate; | ||
} | ||
|
||
public String[] getExpressions() { | ||
return expressions; | ||
} | ||
|
||
public Integer getLength() { | ||
return length; | ||
} | ||
|
||
public LogicalType getLogicalType() { | ||
return logicalType; | ||
} | ||
|
||
public Map<String, FieldInfo> getNestedFields() { | ||
return nestedFields; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "FieldInfo{" | ||
+ "nullRate=" | ||
+ nullRate | ||
+ ", logicalType=" | ||
+ logicalType | ||
+ ", expressions=" | ||
+ Arrays.toString(expressions) | ||
+ ", length=" | ||
+ length | ||
+ ", nestedFields=" | ||
+ nestedFields | ||
+ '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.