@@ -646,10 +646,7 @@ <T> CosmosPagedFlux<T> readAllItems(Class<T> classType) {
646
646
<T > CosmosPagedFlux <T > readAllItems (CosmosQueryRequestOptions options , Class <T > classType ) {
647
647
return UtilBridgeInternal .createCosmosPagedFlux (pagedFluxOptions -> {
648
648
CosmosAsyncClient client = this .getDatabase ().getClient ();
649
- CosmosQueryRequestOptions nonNullOptions = options != null ? options : new CosmosQueryRequestOptions ();
650
- CosmosQueryRequestOptions requestOptions = clientAccessor .shouldEnableEmptyPageDiagnostics (client ) ?
651
- queryOptionsAccessor .withEmptyPageDiagnosticsEnabled (nonNullOptions , true )
652
- : nonNullOptions ;
649
+ CosmosQueryRequestOptions requestOptions = options != null ? options : new CosmosQueryRequestOptions ();
653
650
654
651
QueryFeedOperationState state = new QueryFeedOperationState (
655
652
client ,
@@ -946,11 +943,8 @@ <T> CosmosPagedFlux<T> queryItemsInternal(
946
943
<T > Function <CosmosPagedFluxOptions , Flux <FeedResponse <T >>> queryItemsInternalFunc (
947
944
SqlQuerySpec sqlQuerySpec , CosmosQueryRequestOptions cosmosQueryRequestOptions , Class <T > classType ) {
948
945
CosmosAsyncClient client = this .getDatabase ().getClient ();
949
- CosmosQueryRequestOptions nonNullOptions =
946
+ CosmosQueryRequestOptions options =
950
947
cosmosQueryRequestOptions != null ? cosmosQueryRequestOptions : new CosmosQueryRequestOptions ();
951
- CosmosQueryRequestOptions options = clientAccessor .shouldEnableEmptyPageDiagnostics (client ) ?
952
- queryOptionsAccessor .withEmptyPageDiagnosticsEnabled (nonNullOptions , true )
953
- : nonNullOptions ;
954
948
955
949
Function <CosmosPagedFluxOptions , Flux <FeedResponse <T >>> pagedFluxOptionsFluxFunction = (pagedFluxOptions -> {
956
950
String spanName = this .queryItemsSpanName ;
@@ -982,11 +976,9 @@ <T> Function<CosmosPagedFluxOptions, Flux<FeedResponse<T>>> queryItemsInternalFu
982
976
Mono <SqlQuerySpec > sqlQuerySpecMono , CosmosQueryRequestOptions cosmosQueryRequestOptions , Class <T > classType ) {
983
977
Function <CosmosPagedFluxOptions , Flux <FeedResponse <T >>> pagedFluxOptionsFluxFunction = (pagedFluxOptions -> {
984
978
CosmosAsyncClient client = this .getDatabase ().getClient ();
985
- CosmosQueryRequestOptions nonNullOptions =
979
+ CosmosQueryRequestOptions options =
986
980
cosmosQueryRequestOptions != null ? cosmosQueryRequestOptions : new CosmosQueryRequestOptions ();
987
- CosmosQueryRequestOptions options = clientAccessor .shouldEnableEmptyPageDiagnostics (client ) ?
988
- queryOptionsAccessor .withEmptyPageDiagnosticsEnabled (nonNullOptions , true )
989
- : nonNullOptions ;
981
+
990
982
String spanName = this .queryItemsSpanName ;
991
983
992
984
QueryFeedOperationState state = new QueryFeedOperationState (
@@ -1556,13 +1548,8 @@ public <T> CosmosPagedFlux<T> readAllItems(
1556
1548
CosmosQueryRequestOptions options ,
1557
1549
Class <T > classType ) {
1558
1550
CosmosAsyncClient client = this .getDatabase ().getClient ();
1559
- final CosmosQueryRequestOptions requestOptions = options == null
1560
- ? queryOptionsAccessor .withEmptyPageDiagnosticsEnabled (
1561
- new CosmosQueryRequestOptions (),
1562
- clientAccessor .shouldEnableEmptyPageDiagnostics (client ))
1563
- : clientAccessor .shouldEnableEmptyPageDiagnostics (client )
1564
- ? queryOptionsAccessor .withEmptyPageDiagnosticsEnabled (options , true )
1565
- : options ;
1551
+ final CosmosQueryRequestOptions requestOptions = options == null ? new CosmosQueryRequestOptions () : options ;
1552
+
1566
1553
requestOptions .setPartitionKey (partitionKey );
1567
1554
1568
1555
return UtilBridgeInternal .createCosmosPagedFlux (pagedFluxOptions -> {
0 commit comments