You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation
Currently, all view metadata is encoded via json to a string before being sent to connectors (and similar process in reverse when they are retrieved). This makes it impossible for other systems to easily be able to understand presto views. For example, our security service would like to be able to understand the security mode of a view. decoding the json string is fragile, as the string is not actually guaranteed to have any particular kind of structure.
Proposal
I propose a change to the ConnectorMetadata SPI for create view.
And then update Metadata/MetadataManager appropriately.
and similarly, getViews() would have option of returning the actual ViewDefinition.
Because we don't have a JsonCodec dependency in the SPI, we can't simply create a default implementation that encodes the viewDefinition and calls the old createView.
Options for handling the change:
just change the SPI, and all connectors will need to adapt (can serialize to json themselves, similar to how hive also currently then base64 encodes the json string)
leave 2 definitions, and have MetadataManager handle some try/catch of NOT_SUPPORTED exceptions for the new definition, then it calls the old one.
The text was updated successfully, but these errors were encountered:
This is a reasonable change. I think we should offer a brief deprecation period and essentially do both options:
Do option 2, that is, leave both definitions in place. Deprecate the version that uses the Sringified viewData and announce this in the release notes that it's deprecated.
Remove the old definition within the next 1-2 releases, and open a ticket for this task so we don't lose track.
Motivation
Currently, all view metadata is encoded via json to a string before being sent to connectors (and similar process in reverse when they are retrieved). This makes it impossible for other systems to easily be able to understand presto views. For example, our security service would like to be able to understand the security mode of a view. decoding the json string is fragile, as the string is not actually guaranteed to have any particular kind of structure.
Proposal
I propose a change to the ConnectorMetadata SPI for create view.
Currently we have:
Proposed new behavior - replace the viewData string with ViewDefinition
And then update Metadata/MetadataManager appropriately.
and similarly, getViews() would have option of returning the actual ViewDefinition.
Because we don't have a JsonCodec dependency in the SPI, we can't simply create a default implementation that encodes the viewDefinition and calls the old createView.
Options for handling the change:
The text was updated successfully, but these errors were encountered: