Source:
<code>protected Scope visitAnalyze(Analyze node, Optional<Scope> scope) { analysis.setUpdateType("ANALYZE"); QualifiedObjectName tableName = createQualifiedObjectName(session, node, node.getTableName()); if (metadata.getView(session, tableName).isPresent()) { throw new SemanticException(NOT_SUPPORTED, node, "Analyzing views is not supported"); } validateProperties(node.getProperties(), scope); ConnectorId connectorId = metadata.getCatalogHandle(session, tableName.getCatalogName()) .orElseThrow(() -> new PrestoException(NOT_FOUND, "Catalog not found: " + tableName.getCatalogName())); Map<String, Object> analyzeProperties = metadata.getAnalyzePropertyManager().getProperties( connectorId, connectorId.getCatalogName(), mapFromProperties(node.getProperties()), session, metadata, analysis.getParameters()); <START> analysis.setAnalyzeTarget(metadata.getTableHandleForStatisticsCollection(session, tableName, analyzeProperties) <END> .orElseThrow(() -> (new SemanticException(MISSING_TABLE, node, "Table '%s' does not exist", tableName)))); analysis.addEmptyColumnReferencesForTable(accessControl, session.getIdentity(), tableName); accessControl.checkCanInsertIntoTable(session.getRequiredTransactionId(), session.getIdentity(), tableName); return createAndAssignScope(node, scope, Field.newUnqualified("rows", BIGINT)); }</code><technical_language>I need enumerate columns explicitly: suggestion TableHandle tableHandle = metadata.getTableHandleForAnalyze(session, tableName, analyzeProperties) .orElseThrow(() -> (new SemanticException(MISSING_TABLE, node, "Table '%s' exist", tableName))); // column accessible user run ANALYZE analysis.addTableColumnReferences( accessControl, session.getIdentity(), ImmutableMultimap.<QualifiedObjectName, String>builder() .putAll(tableName, metadata.getColumnHandles(session, tableHandle).keySet()) .build());</technical_language>

Target:
protected Scope visitAnalyze(Analyze node, Optional<Scope> scope) { analysis.setUpdateType("ANALYZE"); QualifiedObjectName tableName = createQualifiedObjectName(session, node, node.getTableName()); if (metadata.getView(session, tableName).isPresent()) { throw new SemanticException(NOT_SUPPORTED, node, "Analyzing views is not supported"); } validateProperties(node.getProperties(), scope); ConnectorId connectorId = metadata.getCatalogHandle(session, tableName.getCatalogName()) .orElseThrow(() -> new PrestoException(NOT_FOUND, "Catalog not found: " + tableName.getCatalogName())); Map<String, Object> analyzeProperties = metadata.getAnalyzePropertyManager().getProperties( connectorId, connectorId.getCatalogName(), mapFromProperties(node.getProperties()), session, metadata, analysis.getParameters()); TableHandle tableHandle = metadata.getTableHandleForStatisticsCollection(session, tableName, analyzeProperties) .orElseThrow(() -> (new SemanticException(MISSING_TABLE, node, "Table '%s' does not exist", tableName))); analysis.addTableColumnReferences( accessControl, session.getIdentity(), ImmutableMultimap.<QualifiedObjectName, String>builder() .putAll(tableName, metadata.getColumnHandles(session, tableHandle).keySet()) .build()); try { accessControl.checkCanInsertIntoTable(session.getRequiredTransactionId(), session.getIdentity(), tableName); } catch (AccessDeniedException exception) { throw new AccessDeniedException(format("Cannot ANALYZE (missing insert privilege) table %s", tableName)); } analysis.setAnalyzeTarget(tableHandle); return createAndAssignScope(node, scope, Field.newUnqualified("rows", BIGINT)); }