class ShardingCTLHintBackendHandler implements TextProtocolBackendHandler {

    @SuppressWarnings("unchecked")
    @Override
    public BackendResponse execute() {
        if (!ProxyContext.getInstance().getSchemaContexts().getProps().<Boolean>getValue(ConfigurationPropertyKey.PROXY_HINT_ENABLED)) {
            throw new UnsupportedOperationException(String.format("%s should be true, please check your config", ConfigurationPropertyKey.PROXY_HINT_ENABLED.getKey()));
        }
        Optional<ShardingCTLHintStatement> shardingTCLStatement = new ShardingCTLHintParser(sql).doParse();
        if (!shardingTCLStatement.isPresent()) {
            throw new InvalidShardingCTLFormatException(sql);
        }
        HintCommand hintCommand = shardingTCLStatement.get().getHintCommand();
        hintCommandExecutor = HintCommandExecutorFactory.newInstance(hintCommand, backendConnection, sql);
        return hintCommandExecutor.execute(hintCommand);
    }

}