richardstartin commented on a change in pull request #7876: URL: https://github.com/apache/pinot/pull/7876#discussion_r764753118
########## File path: pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/creator/JsonIndexers.java ########## @@ -0,0 +1,54 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.segment.spi.index.creator; + +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; + + +/** + * Registration point to allow overriding of JsonIndexing + */ +public final class JsonIndexers { + + private JsonIndexers() { + } + + private static final DefaultJsonIndexer DEFAULT_JSON_INDEXER = new DefaultJsonIndexer(); + private static final Function<JsonIndexer, JsonIndexer> DEFAULT = Function.identity(); + private static final AtomicReference<Function<JsonIndexer, JsonIndexer>> REGISTERED = new AtomicReference<>(DEFAULT); + + /** + * Register a decorator which gets wraps the default JSON indexer so that it can intercept requests to Review comment: Currently its assumed that whatever is in the JSON column is actually JSON, but the indexing technique can be made generic (so that you could have a forward index containing, say, Protobuf records stored in bytes, and then a JSON index so long as you have a plugin which can construct the appropriate paths) with the layer of indirection provided in this PR. -- 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]
