Jackie-Jiang commented on code in PR #13103:
URL: https://github.com/apache/pinot/pull/13103#discussion_r1596065673
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/SanitizationTransformer.java:
##########
@@ -38,14 +41,22 @@
* {@link FieldSpec}.
*/
public class SanitizationTransformer implements RecordTransformer {
+ private static final String NULL_CHARACTER = "\0";
private final Map<String, Integer> _stringColumnMaxLengthMap = new
HashMap<>();
+ private final boolean _failOnTrimmedStringLength;
- public SanitizationTransformer(Schema schema) {
+ public SanitizationTransformer(TableConfig tableConfig, Schema schema) {
for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) {
if (!fieldSpec.isVirtualColumn() && fieldSpec.getDataType() ==
DataType.STRING) {
_stringColumnMaxLengthMap.put(fieldSpec.getName(),
fieldSpec.getMaxLength());
}
}
+ IngestionConfig ingestionConfig = tableConfig.getIngestionConfig();
+ if (ingestionConfig != null) {
+ _failOnTrimmedStringLength =
ingestionConfig.isFailOnTrimmedStringLength();
Review Comment:
We already have a config `continueOnError`, should we use that one to
control this as well? We probably don't want too fine grained control on
failures
--
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]