Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change mapreduce to mapReduce #1337

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private BsonDocument getCommand(@Nullable final ConnectionDescription descriptio
if (getDatabaseName() != null) {
outputDocument.put("db", new BsonString(getDatabaseName()));
}
BsonDocument commandDocument = new BsonDocument("mapreduce", new BsonString(namespace.getCollectionName()))
BsonDocument commandDocument = new BsonDocument("mapReduce", new BsonString(namespace.getCollectionName()))
.append("map", getMapFunction())
.append("reduce", getReduceFunction())
.append("out", outputDocument);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private CommandCreator getCommandCreator(final SessionContext sessionContext) {
}

private BsonDocument getCommand(final SessionContext sessionContext, final int maxWireVersion) {
BsonDocument commandDocument = new BsonDocument("mapreduce", new BsonString(namespace.getCollectionName()))
BsonDocument commandDocument = new BsonDocument("mapReduce", new BsonString(namespace.getCollectionName()))
.append("map", getMapFunction())
.append("reduce", getReduceFunction())
.append("out", new BsonDocument("inline", new BsonInt32(1)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class MapReduceToCollectionOperationSpecification extends OperationFunctionalSpe

when:
def operation = new MapReduceToCollectionOperation(getNamespace(), mapF, reduceF, out, WriteConcern.MAJORITY)
def expectedCommand = new BsonDocument('mapreduce', new BsonString(getCollectionName()))
def expectedCommand = new BsonDocument('mapReduce', new BsonString(getCollectionName()))
.append('map', mapF)
.append('reduce', reduceF)
.append('out', BsonDocument.parse('{replace: "outCollection"}'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class MapReduceWithInlineResultsOperationSpecification extends OperationFunction
when:
def operation = new MapReduceWithInlineResultsOperation<Document>(helper.namespace, new BsonJavaScript('function(){ }'),
new BsonJavaScript('function(key, values){ }'), bsonDocumentCodec)
def expectedCommand = new BsonDocument('mapreduce', new BsonString(helper.namespace.getCollectionName()))
def expectedCommand = new BsonDocument('mapReduce', new BsonString(helper.namespace.getCollectionName()))
.append('map', operation.getMapFunction())
.append('reduce', operation.getReduceFunction())
.append('out', new BsonDocument('inline', new BsonInt32(1)))
Expand Down Expand Up @@ -235,7 +235,7 @@ class MapReduceWithInlineResultsOperationSpecification extends OperationFunction
source.retain() >> source
source.getServerApi() >> null
def commandDocument = BsonDocument.parse('''
{ "mapreduce" : "coll",
{ "mapReduce" : "coll",
"map" : { "$code" : "function(){ }" },
"reduce" : { "$code" : "function(key, values){ }" },
"out" : { "inline" : 1 },
Expand Down Expand Up @@ -284,7 +284,7 @@ class MapReduceWithInlineResultsOperationSpecification extends OperationFunction
source.getConnection(_) >> { it[0].onResult(connection, null) }
source.retain() >> source
def commandDocument = BsonDocument.parse('''
{ "mapreduce" : "coll",
{ "mapReduce" : "coll",
"map" : { "$code" : "function(){ }" },
"reduce" : { "$code" : "function(key, values){ }" },
"out" : { "inline" : 1 },
Expand Down