Source:
public static ColumnResolver getResolverForCreation(final CreateTableStatement statement, final PhoenixConnection connection) throws SQLException { TableName baseTable = statement.getBaseTableName(); String schemaName; if (baseTable == null) { if (SchemaUtil.isSchemaCheckRequired(statement.getTableType(), connection.getQueryServices().getProps())) { schemaName = statement.getTableName().getSchemaName(); if (schemaName != null) { new SchemaResolver(connection, statement.getTableName().getSchemaName(), true); } else if (connection.getSchema() != null) { new SchemaResolver(connection, connection.getSchema(), true); } } return EMPTY_TABLE_RESOLVER; } NamedTableNode tableNode = NamedTableNode.create(null, baseTable, Collections.<ColumnDef>emptyList()); try { SingleTableColumnResolver visitor = new SingleTableColumnResolver(connection, tableNode, true, true); return visitor; } catch (TableNotFoundException e) { if (connection.getTenantId() == null && statement.getTableType() == PTableType.VIEW) { ConnectionQueryServices services = connection.getQueryServices(); byte[] fullTableName = SchemaUtil.getPhysicalName( SchemaUtil.getTableNameAsBytes(baseTable.getSchemaName(), baseTable.getTableName()), connection.getQueryServices().getProps()).getName(); HTableInterface htable = null; try { htable = services.getTable(fullTableName); } catch (UnsupportedOperationException ignore) { throw e; } finally { if (htable != null) Closeables.closeQuietly(htable); } tableNode = NamedTableNode.create(null, baseTable, statement.getColumnDefs()); boolean isNamespaceMapped = SchemaUtil.isNamespaceMappingEnabled(statement.getTableType(), connection.getQueryServices().getProps()); return new SingleTableColumnResolver(connection, tableNode, e.getTimeStamp(), new HashMap<String, UDFParseNode>(1), isNamespaceMapped); } throw e; } }

Target:
public static ColumnResolver getResolverForCreation(final CreateTableStatement statement, final PhoenixConnection connection) throws SQLException { TableName baseTable = statement.getBaseTableName(); String schemaName; if (baseTable == null) { if (SchemaUtil.isSchemaCheckRequired(statement.getTableType(), connection.getQueryServices().getProps())) { schemaName = statement.getTableName().getSchemaName(); if (schemaName != null) { new SchemaResolver(connection, statement.getTableName().getSchemaName(), true); } else if (connection.getSchema() != null) { new SchemaResolver(connection, connection.getSchema(), true); } } return EMPTY_TABLE_RESOLVER; } NamedTableNode tableNode = NamedTableNode.create(null, baseTable, Collections.<ColumnDef>emptyList()); try { SingleTableColumnResolver visitor = new SingleTableColumnResolver(connection, tableNode, true, true); return visitor; } catch (TableNotFoundException e) { if (connection.getTenantId() == null && statement.getTableType() == PTableType.VIEW) { ConnectionQueryServices services = connection.getQueryServices(); boolean isNamespaceMapped = SchemaUtil.isNamespaceMappingEnabled(statement.getTableType(), connection.getQueryServices().getProps()); byte[] fullTableName = SchemaUtil.getPhysicalHBaseTableName( baseTable.getSchemaName(), baseTable.getTableName(), isNamespaceMapped).getBytes(); HTableInterface htable = null; try { htable = services.getTable(fullTableName); } catch (UnsupportedOperationException ignore) { throw e; } finally { if (htable != null) Closeables.closeQuietly(htable); } tableNode = NamedTableNode.create(null, baseTable, statement.getColumnDefs()); return new SingleTableColumnResolver(connection, tableNode, e.getTimeStamp(), new HashMap<String, UDFParseNode>(1), isNamespaceMapped); } throw e; } }