Neuw84 commented on code in PR #7988:
URL: https://github.com/apache/iceberg/pull/7988#discussion_r1259938414
##########
hive3/src/main/java/org/apache/iceberg/mr/hive/vector/CompatibilityHiveVectorUtils.java:
##########
@@ -67,12 +66,13 @@ public static MapWork findMapWork(JobConf job) {
LOG.debug("Initializing for input {}", inputName);
}
String prefixes = job.get(DagUtils.TEZ_MERGE_WORK_FILE_PREFIXES);
- if (prefixes != null && !StringUtils.isBlank(prefixes)) {
- // Currently SMB is broken, so we cannot check if it's compatible with
IO elevator.
- // So, we don't use the below code that would get the correct MapWork.
See HIVE-16985.
- return null;
+ if (prefixes != null) {
+ if (!prefixes.trim().isEmpty()) {
Review Comment:
agreed, I have tested all the combinations just to be sure in a JShell 👍 .
```
import org.apache.commons.lang3.StringUtils;
String a=null;
if (a != null && !StringUtils.isBlank(a)) {
System.out.println("nullllll check");
}
if (a != null && !a.trim().isEmpty()) {
System.out.println("null check native");
}
a="";
if (a != null && !StringUtils.isBlank(a)) {
System.out.println("empty check ");
}
if (a != null && !a.trim().isEmpty()) {
System.out.println("empty check native");
}
a=" ";
if (a != null && !StringUtils.isBlank(a)) {
System.out.println("blank check");
}
if (a != null && !a.trim().isEmpty()) {
System.out.println("blank check native");
}
a="bob";
if (a != null && !StringUtils.isBlank(a)) {
System.out.println("things check");
}
if (a != null && !a.trim().isEmpty()) {
System.out.println("things check native");
}
a=" bob ";
if (a != null && !StringUtils.isBlank(a)) {
System.out.println("trim things check");
}
if (a != null && !a.trim().isEmpty()) {
System.out.println("trim things check native");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]