Build a new DataMask instance. @param mask the description of the data mask @param schema the type of the field @param overrides sub-columns where the mask is overridden @return a new DataMask @throws IllegalArgumentException if no such kind of data mask was found @see org.apache.orc.impl.mask.Mask
(DataMaskDescription mask,
TypeDescription schema,
MaskOverrides overrides)
| 127 | * @see org.apache.orc.impl.mask.MaskProvider for the standard provider |
| 128 | */ |
| 129 | public static DataMask build(DataMaskDescription mask, |
| 130 | TypeDescription schema, |
| 131 | MaskOverrides overrides) { |
| 132 | for(Provider provider: ServiceLoader.load(Provider.class)) { |
| 133 | DataMask result = provider.build(mask, schema, overrides); |
| 134 | if (result != null) { |
| 135 | return result; |
| 136 | } |
| 137 | } |
| 138 | throw new IllegalArgumentException("Can't find data mask - " + mask); |
| 139 | } |
| 140 | } |
| 141 | } |