Add support to provide an alias for a connector factory#8765
Add support to provide an alias for a connector factory#8765majetideepak wants to merge 1 commit intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
a30aa7f to
98f9ba9
Compare
98f9ba9 to
167003e
Compare
167003e to
f4a6457
Compare
f4a6457 to
12b5c58
Compare
|
@mbasmanova can you please take a look at this PR? Thanks! |
| /// Adds an alias for an existing factory. Throws if factory with the | ||
| /// connectorName is not already present. Throws if the alias for the | ||
| /// connectorName is already present. | ||
| bool registerConnectorFactoryAlias( |
There was a problem hiding this comment.
I'm wondering if it would be better to change ConnectorFactory API to allow for aliases. Perhaps, add
const std::vector<std::string>& aliases() const;
method.
Or, modify registerConnectorFactory API to add an optional 'aliases' parameter. That would be similar to aliases allowed when registering scalar functions.
There was a problem hiding this comment.
| I'm wondering if it would be better to change ConnectorFactory API to allow for aliases.
@mbasmanova This was my initial implementation. But we register the Velox connectors in the Velox library.
So an application such as Prestissimo would have to manually change the Velox code to include additional aliases. For example, to add "iceberg", we have to manually modify the alias list.
I then added this API so that we can add aliases in Prestissimo without having to change Velox code.
There was a problem hiding this comment.
See the commit that is similar to your approach a30aa7f
There was a problem hiding this comment.
It sounds like Velox auto-registers connector factories and this is problematic. Let's change that to require applications to explicitly register what they need.
|
We should be able to register a new hive connector factory in the client. |
|
Use prestodb/presto#22710 instead of this. |
The hive connector factory supports both hive-hadoop2 and iceberg connectors from Presto.
Add API to provide an alias to a ConnectorFactory.