MCPcopy Index your code
hub / github.com/apache/orc / Factory

Class Factory

java/core/src/java/org/apache/orc/DataMask.java:117–140  ·  view source on GitHub ↗

To create a DataMask, the users should come through this API. It supports extension via additional DataMask.Provider implementations that are accessed through Java's ServiceLoader API.

Source from the content-addressed store, hash-verified

115 * that are accessed through Java's ServiceLoader API.
116 */
117 class Factory {
118
119 /**
120 * Build a new DataMask instance.
121 * @param mask the description of the data mask
122 * @param schema the type of the field
123 * @param overrides sub-columns where the mask is overridden
124 * @return a new DataMask
125 * @throws IllegalArgumentException if no such kind of data mask was found
126 *
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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected