Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and converge V1 and V2 SchemaConformingTransformer #14772

Merged
merged 5 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected void buildSegment()
.setIngestionConfig(new IngestionConfig(null, null, null, null,
Arrays.asList(new TransformConfig(M1_V2, "Groovy({INT_COL1_V3 == null || "
+ "INT_COL1_V3 == Integer.MIN_VALUE ? INT_COL1 : INT_COL1_V3 }, INT_COL1, INT_COL1_V3)")),
null, null, null, null))
null, null, null))
.build();
Schema schema =
new Schema.SchemaBuilder().setSchemaName(TABLE_NAME).addSingleValueDimension(D1, FieldSpec.DataType.STRING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,11 @@ public class CompositeTransformer implements RecordTransformer {
* </li>
* <li>
* Optional {@link SchemaConformingTransformer} after {@link FilterTransformer}, so that we can transform input
* records that have varying fields to a fixed schema without dropping any fields
* </li>
* <li>
* Optional {@link SchemaConformingTransformerV2} after {@link FilterTransformer}, so that we can transform
* input records that have varying fields to a fixed schema and keep or drop other fields by configuration. We
* records that have varying fields to a fixed schema and keep or drop other fields by configuration. We
* could also gain enhanced text search capabilities from it.
* </li>
* <li>
* {@link DataTypeTransformer} after {@link SchemaConformingTransformer} or {@link SchemaConformingTransformerV2}
* {@link DataTypeTransformer} after {@link SchemaConformingTransformer}
* to convert values to comply with the schema
* </li>
* <li>
Expand Down Expand Up @@ -108,7 +104,6 @@ public static List<RecordTransformer> getDefaultTransformers(TableConfig tableCo
addIfNotNoOp(transformers, new ExpressionTransformer(tableConfig, schema));
addIfNotNoOp(transformers, new FilterTransformer(tableConfig));
addIfNotNoOp(transformers, new SchemaConformingTransformer(tableConfig, schema));
addIfNotNoOp(transformers, new SchemaConformingTransformerV2(tableConfig, schema));
addIfNotNoOp(transformers, new DataTypeTransformer(tableConfig, schema));
addIfNotNoOp(transformers, new TimeValidationTransformer(tableConfig, schema));
addIfNotNoOp(transformers, new SpecialValueTransformer(schema));
Expand Down
Loading
Loading