Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2326#discussion_r189787714
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java
---
@@ -431,18 +432,20 @@ private void buildTableSchema(Field[] fields,
TableSchemaBuilder tableSchemaBuil
// to child of complex array type in the order val1, val2 so that each
array type child is
// differentiated to any level
AtomicInteger valIndex = new AtomicInteger(0);
- // Check if any of the columns specified in sort columns are missing
from schema.
- for (String sortColumn: sortColumnsList) {
- boolean exists = false;
- for (Field field : fields) {
- if (field.getFieldName().equalsIgnoreCase(sortColumn)) {
- exists = true;
- break;
+ if (!(sortColumnsList.size() == 1 &&
sortColumnsList.get(0).trim().isEmpty())) {
--- End diff --
same comment as above...not required to handle this case
---