[MINOR] Add default value as null for S3 Incremental source properties (#4674)
This commit is contained in:
@@ -122,13 +122,13 @@ public class S3EventsHoodieIncrSource extends HoodieIncrSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String filter = "s3.object.size > 0";
|
String filter = "s3.object.size > 0";
|
||||||
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_KEY_PREFIX))) {
|
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_KEY_PREFIX, null))) {
|
||||||
filter = filter + " and s3.object.key like '" + props.getString(Config.S3_KEY_PREFIX) + "%'";
|
filter = filter + " and s3.object.key like '" + props.getString(Config.S3_KEY_PREFIX) + "%'";
|
||||||
}
|
}
|
||||||
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_IGNORE_KEY_PREFIX))) {
|
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_IGNORE_KEY_PREFIX, null))) {
|
||||||
filter = filter + " and s3.object.key not like '" + props.getString(Config.S3_IGNORE_KEY_PREFIX) + "%'";
|
filter = filter + " and s3.object.key not like '" + props.getString(Config.S3_IGNORE_KEY_PREFIX) + "%'";
|
||||||
}
|
}
|
||||||
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_IGNORE_KEY_SUBSTRING))) {
|
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_IGNORE_KEY_SUBSTRING, null))) {
|
||||||
filter = filter + " and s3.object.key not like '%" + props.getString(Config.S3_IGNORE_KEY_SUBSTRING) + "%'";
|
filter = filter + " and s3.object.key not like '%" + props.getString(Config.S3_IGNORE_KEY_SUBSTRING) + "%'";
|
||||||
}
|
}
|
||||||
// add file format filtering by default
|
// add file format filtering by default
|
||||||
|
|||||||
Reference in New Issue
Block a user