Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2704#discussion_r216917965
--- Diff:
core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java
---
@@ -165,14 +165,15 @@ private static boolean isColumnMatches(boolean
isTransactionalTable,
// column ID but can have same column name
if (tableColumn.getDataType().isComplexType() &&
!(tableColumn.getDataType().getId()
== DataTypes.ARRAY_TYPE_ID)) {
- if (tableColumn.getColumnId().equals(queryColumn.getColumnId())) {
+ if
(tableColumn.getColumnId().equalsIgnoreCase(queryColumn.getColumnId())) {
return true;
} else {
return isColumnMatchesStruct(tableColumn, queryColumn);
}
} else {
- return (tableColumn.getColumnId().equals(queryColumn.getColumnId())
|| (!isTransactionalTable
- && tableColumn.getColName().equals(queryColumn.getColName())));
+ return
(tableColumn.getColumnId().equalsIgnoreCase(queryColumn.getColumnId()) || (
--- End diff --
I think we should have more strict comparison in case of restructure.
If column with same name is added with different name with different data
type, will be problem.
Let's use data type also to compare.
---