private static void crawlColumnDataTypes( final MutableCatalog catalog, final RetrieverConnection retrieverConnection, final SchemaCrawlerOptions options) throws SchemaCrawlerException { try { LOGGER.log(Level.INFO, "Crawling column data types"); final StopWatch stopWatch = new StopWatch("crawlColumnDataTypes"); final SchemaInfoLevel infoLevel = options.getSchemaInfoLevel(); final DatabaseInfoRetriever retriever = new DatabaseInfoRetriever(retrieverConnection, catalog); stopWatch.time( "retrieveSystemColumnDataTypes", () -> { if (infoLevel.isRetrieveColumnDataTypes()) { LOGGER.log(Level.INFO, "Retrieving system column data types"); retriever.retrieveSystemColumnDataTypes(); } else { LOGGER.log( Level.INFO, "Not retrieving system column data types, since this was not requested"); } return null; }); stopWatch.time( "retrieveUserDefinedColumnDataTypes", () -> { if (infoLevel.isRetrieveUserDefinedColumnDataTypes()) { LOGGER.log(Level.INFO, "Retrieving user column data types"); for (final Schema schema : retriever.getSchemas()) { retriever.retrieveUserDefinedColumnDataTypes( schema.getCatalogName(), schema.getName()); } } else { LOGGER.log( Level.INFO, "Not retrieving user column data types, since this was not requested"); } return null; }); LOGGER.log(Level.INFO, stopWatch.toString()); } catch (final Exception e) { if (e instanceof SchemaCrawlerSQLException) { throw new SchemaCrawlerException(e.getMessage(), e.getCause()); } else if (e instanceof SchemaCrawlerException) { throw (SchemaCrawlerException) e; } else { throw new SchemaCrawlerException("Exception retrieving column data type information", e); } } }