This is an automated email from the ASF dual-hosted git repository.
nehapawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 52001be Add transformFunction field in equals, hashCode and
toJsonObject of FieldSpec (#5335)
52001be is described below
commit 52001be6e37f07a7359766021df9495f7112fae9
Author: Neha Pawar <[email protected]>
AuthorDate: Tue May 5 15:09:44 2020 -0700
Add transformFunction field in equals, hashCode and toJsonObject of
FieldSpec (#5335)
---
pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java | 6 +++++-
pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java
b/pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java
index be6fd20..068977e 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java
@@ -263,6 +263,9 @@ public abstract class FieldSpec implements
Comparable<FieldSpec> {
jsonObject.put("maxLength", _maxLength);
}
appendDefaultNullValue(jsonObject);
+ if (_transformFunction != null) {
+ jsonObject.put("transformFunction", _transformFunction);
+ }
return jsonObject;
}
@@ -292,7 +295,7 @@ public abstract class FieldSpec implements
Comparable<FieldSpec> {
return EqualityUtils.isEqual(_name, that._name) &&
EqualityUtils.isEqual(_dataType, that._dataType) && EqualityUtils
.isEqual(_isSingleValueField, that._isSingleValueField) &&
EqualityUtils
.isEqual(getStringValue(_defaultNullValue),
getStringValue(that._defaultNullValue)) && EqualityUtils
- .isEqual(_maxLength, that._maxLength);
+ .isEqual(_maxLength, that._maxLength) &&
EqualityUtils.isEqual(_transformFunction, that._transformFunction);
}
@Override
@@ -302,6 +305,7 @@ public abstract class FieldSpec implements
Comparable<FieldSpec> {
result = EqualityUtils.hashCodeOf(result, _isSingleValueField);
result = EqualityUtils.hashCodeOf(result,
getStringValue(_defaultNullValue));
result = EqualityUtils.hashCodeOf(result, _maxLength);
+ result = EqualityUtils.hashCodeOf(result, _transformFunction);
return result;
}
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
b/pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
index 970838c..616696a 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/data/Schema.java
@@ -722,7 +722,7 @@ public final class Schema {
break;
}
- String outerFunction = null;
+ String outerFunction = innerFunction;
switch (outgoingTimeUnit) {
case MILLISECONDS:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]