-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP-5460 Several enhancements #1976
Conversation
franklma
commented
Apr 26, 2022
•
edited
Loading
edited
- Only consider non-empty values when guessing the type by reading the 100 rows sample used in Log Importer
- The “types” could be made optional and by default, when they are not given, all fields will be treated as “String”. With this “default” convention, maybe we would provide more flexibility to the API.
- Corner cases when detecting the data type
- Handle "other timestamps" in existing schema mapping
- Handle Boolean data type
- Add unit tests
|
||
|
||
@Data | ||
@NoArgsConstructor | ||
public class LogMetaData { | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(LogMetaData.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use Lombok notation @Sl4j for logging instead of defining LOGGER.
@@ -94,7 +97,12 @@ public static ColumnType getColumnType(final List<String> stringList) { | |||
temp.put(ColumnType.DOUBLE, 0); | |||
temp.put(ColumnType.TIMESTAMP, 0); | |||
|
|||
stringList.forEach(st -> { | |||
List<String> filteredList = stringList.stream() | |||
.filter(Objects::nonNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could combine both using StringUtils.isEmpty(). This will test for both the null and empty strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
SonarCloud Quality Gate failed. |