Skip to content

Commit

Permalink
fix changefeed
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabh1007 committed Sep 18, 2024
1 parent 3da7b37 commit 67bb633
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public override async Task<ResponseMessage> ReadNextAsync(CancellationToken canc
operationType: OperationType.ReadFeed,
requestOptions: this.changeFeedRequestOptions,
task: (trace) => this.ReadNextInternalAsync(trace, cancellationToken),
openTelemetry: new (OpenTelemetryConstants.Operations.QueryChangeFeed, (response) => new OpenTelemetryResponse(responseMessage: response, querySpec: this.querySpec)),
openTelemetry: new (OpenTelemetryConstants.Operations.QueryChangeFeed, (response) => new OpenTelemetryResponse(responseMessage: response, querySpec: this.changeFeedQuerySpec?.ToSqlQuerySpec())),
traceComponent: TraceComponent.ChangeFeed,
traceLevel: TraceLevel.Info);
}
Expand Down
6 changes: 3 additions & 3 deletions Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedQuerySpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ internal bool ShouldSerializeQueryText()
}

/// <summary>
/// Returns if query is parameterized
/// Converts to SQL Query Specs
/// </summary>
public bool IsParameterized()
internal SqlQuerySpec ToSqlQuerySpec()
{
return false;
return new SqlQuerySpec(this.QueryText);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public void ExecuteTestSuite(IEnumerable<TInput> inputs, [CallerMemberName] stri
List<BaselineTestResult> baselineTestResults = new List<BaselineTestResult>();
int inputId = 0;
int totalInputs = inputs.Count();
Console.WriteLine($"Total inputs: {totalInputs}");
Debug.WriteLine($"Total inputs: {totalInputs}");
foreach (TInput input in inputs)
{
Console.WriteLine($"Execute input {++inputId}: {input.Description}..");
Debug.WriteLine($"Execute input {++inputId}: {input.Description}..");
TOutput output = this.ExecuteTest(input);
baselineTestResults.Add(new BaselineTestResult(input, output));
}
Expand Down

0 comments on commit 67bb633

Please sign in to comment.