[
https://issues.apache.org/jira/browse/DRILL-7477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048558#comment-17048558
]
ASF GitHub Bot commented on DRILL-7477:
---------------------------------------
arina-ielchiieva commented on pull request #2005: DRILL-7477: Allow passing
table function parameters into ANALYZE statement
URL: https://github.com/apache/drill/pull/2005#discussion_r386106553
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
##########
@@ -721,6 +692,42 @@ private FormatMatcher findMatcher(FileStatus file) {
return null;
}
+ private void setMetadataProviderManager(DrillTable table, String
tableName) {
+ if (table != null) {
+ MetadataProviderManager providerManager = null;
+
+ if (schemaConfig.getOption(ExecConstants.METASTORE_ENABLED).bool_val) {
+ try {
+ MetastoreRegistry metastoreRegistry =
plugin.getContext().getMetastoreRegistry();
+ TableInfo tableInfo = TableInfo.builder()
+ .storagePlugin(plugin.getName())
+ .workspace(schemaName)
+ .name(tableName)
+ .build();
+
+ MetastoreTableInfo metastoreTableInfo = metastoreRegistry.get()
+ .tables()
+ .basicRequests()
+ .metastoreTableInfo(tableInfo);
+ if (metastoreTableInfo.isExists()) {
+ providerManager = new
MetastoreMetadataProviderManager(metastoreRegistry, tableInfo,
+ new
MetastoreMetadataProviderConfig(schemaConfig.getOption(ExecConstants.METASTORE_USE_SCHEMA_METADATA).bool_val,
+
schemaConfig.getOption(ExecConstants.METASTORE_USE_STATISTICS_METADATA).bool_val,
+
schemaConfig.getOption(ExecConstants.METASTORE_FALLBACK_TO_FILE_METADATA).bool_val));
+ }
+ } catch (MetastoreException e) {
+ logger.warn("Exception happened during obtaining Metastore
instance.", e);
Review comment:
I think besides indicating that this is Metastore error, you should write
what happens, for example, will use file system metadata provider etc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Allow passing table function parameters into ANALYZE statement
> --------------------------------------------------------------
>
> Key: DRILL-7477
> URL: https://issues.apache.org/jira/browse/DRILL-7477
> Project: Apache Drill
> Issue Type: Sub-task
> Affects Versions: 1.17.0
> Reporter: Vova Vysotskyi
> Assignee: Vova Vysotskyi
> Priority: Major
> Fix For: 1.18.0
>
>
> It would be useful to allow passing table function parameters into ANALYZE
> statement.
> One of the use-cases is to pass the inlined table schema to use it when
> producing ANALYZE.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)