You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kumarvishal09 <gi...@git.apache.org> on 2018/05/08 11:31:36 UTC
[GitHub] carbondata pull request #2273: [CARBONDATA-2442] Fixed: Reading two sdk writ...
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2273#discussion_r186696437
--- Diff: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java ---
@@ -342,6 +342,30 @@ public void setParentColumnTableRelations(
return true;
}
+ /**
+ * method to compare columnSchema,
+ * other parameters along with just column name and column data type
+ * @param obj
+ * @return
+ */
+ public boolean equalsWithStrictCheck(Object obj) {
+ if (!this.equals(obj)) {
+ return false;
+ }
+ ColumnSchema other = (ColumnSchema) obj;
+ if (!columnUniqueId.equals(other.columnUniqueId) ||
+ (isDimensionColumn != other.isDimensionColumn) ||
+ (scale != other.scale) ||
+ (precision != other.precision) ||
+ (isSortColumn != other.isSortColumn)) {
+ return false;
+ }
+ if (encodingList.size() != other.encodingList.size()) {
--- End diff --
Better to check the encoding values also...this is a generic method and can be useful for other schenario
---