Github user jinossy commented on a diff in the pull request:
https://github.com/apache/tajo/pull/1033#discussion_r65037770
--- Diff:
tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/sequencefile/SequenceFileScanner.java
---
@@ -105,6 +105,11 @@ public void init() throws IOException {
}
String delim =
meta.getProperty(StorageConstants.SEQUENCEFILE_DELIMITER,
StorageConstants.DEFAULT_FIELD_DELIMITER);
+ if (delim == null || delim.isEmpty()) {
+ delim = meta.getProperty(StorageConstants.TEXT_DELIMITER,
StorageConstants.DEFAULT_FIELD_DELIMITER);
+ }
+ meta.getPropertySet().set(StorageConstants.TEXT_DELIMITER, delim);
--- End diff --
I think you can change to simplify code like this
```
TableMeta tableMeta = meta.clone();
if (!tableMeta.containsProperty(StorageConstants.TEXT_DELIMITER)) {
tableMeta.putProperty(StorageConstants.TEXT_DELIMITER,
tableMeta.getProperty(StorageConstants.SEQUENCEFILE_DELIMITER);
}
```
also you should consider the null char and you should remove useless code
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---