`CREATE TABLE test (x Int32, y Int32, s String, PRIMARY KEY (x, y)) ENGINE = MergeTree;`
should be equivalent to
`CREATE TABLE test (x Int32, y Int32, s String) ENGINE = MergeTree PRIMARY KEY (x, y);`
metadata.sorting_key
            = KeyDescription::getSortingKeyFromAST(engine_args[arg_num], metadata.columns, args.context, merging_param_key_arg);
        
        metadata.primary_key = KeyDescription::getKeyFromAST(engine_args[arg_num], metadata.columns, args.context);
        
        
        metadata.primary_key.definition_ast = nullptr;
        ++arg_num;
        const auto * ast = engine_args[arg_num]->as<ASTLiteral>();
        if (ast && ast->value.getType() == Field::Types::UInt64)
            storage_settings->index_granularity = safeGet<UInt64>(ast->value);
        else
            throw Exception(
                "Index granularity must be a positive integer" + getMergeTreeVerboseHelp(is_extended_storage_def),
                ErrorCodes::BAD_ARGUMENTS);
        ++arg_num;
    }
    
    
    if (storage_settings->randomize_part_type
        && !storage_settings->min_rows_for_wide_part.changed
        && !storage_settings->min_bytes_for_wide_part.changed)
    {
        randomizePartTypeSettings(storage_settings);
        LOG_INFO(&Poco::Logger::get(args.table_id.getNameForLogs() + " (registerStorageMergeTree)"),
            "Applied setting 'randomize_part_type'. "
            "Setting 'min_rows_for_wide_part' changed to {}. "
            "Setting 'min_bytes_for_wide_part' changed to {}.",
            storage_settings->min_rows_for_wide_part, storage_settings->min_bytes_for_wide_part);