shounakmk219 commented on code in PR #10655:
URL: https://github.com/apache/pinot/pull/10655#discussion_r1173636417
##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java:
##########
@@ -563,4 +592,30 @@ public boolean isBackwardCompatibleWith(FieldSpec
oldFieldSpec) {
&& EqualityUtils.isEqual(_dataType, oldFieldSpec._dataType)
&& EqualityUtils.isEqual(_isSingleValueField,
oldFieldSpec._isSingleValueField);
}
+
+ public static class FieldSpecMetadata {
+ public Map<FieldType, FieldTypeMetadata> _fieldTypes = new HashMap<>();
+
+ void put(FieldType type, FieldTypeMetadata metadata) {
+ _fieldTypes.put(type, metadata);
+ }
+ }
+
+ public static class FieldTypeMetadata {
+ public List<DataTypeMetadata> _allowedDataTypes = new ArrayList<>();
+
+ void add(DataTypeMetadata metadata) {
+ _allowedDataTypes.add(metadata);
+ }
+ }
+
+ public static class DataTypeMetadata {
+ public FieldSpec.DataType _name;
Review Comment:
That's a good point. Maybe I need to introduce a separate `dataTypes`
property at `fieldTypes` level so as to not have the `dataType` specific info
under `allowedDataTypes ` and that too with redundant replication.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]