Skip to content

[BUG] BlockBlobClient.QueryAsync() require "recordSeparator" input, but it's optional in rest API #21401

@blueww

Description

@blueww

Describe the bug
"Azure.Storage.Blobs 12.9.0-beta.4" has a regression.
When run BlockBlobClient.QueryAsync(), it requires "recordSeparator" (and some other optional properties) in input BlobQueryOptions, But this is actually optional in rest API.

RecordSeparator Optional. The string used to separate records.

Expected behavior
BlockBlobClient.QueryAsync() should not fail when user not input "recordSeparator" , or other optional properties

Actual behavior (include Exception or Stack Trace)
BlockBlobClient.QueryAsync() fails when user not input "recordSeparator":

System.ArgumentNullException: Value cannot be null.
Parameter name: recordSeparator
   at Azure.Storage.Blobs.Models.DelimitedTextConfigurationInternal..ctor(String columnSeparator, String fieldQuote, String recordSeparator, String escapeChar, Boolean headersPresent)
   at Azure.Storage.Blobs.QuickQueryExtensions.ToQuickQuerySerialization(BlobQueryTextOptions textConfiguration, Boolean isInput)
   at Azure.Storage.Blobs.Specialized.BlockBlobClient.<QueryInternal>d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Storage.Blobs.Specialized.BlockBlobClient.<QueryAsync>d__51.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.WindowsAzure.Commands.Storage.Blob.GetStorageAzureBlobQueryResultCommand.<QueryAzureBlob>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.WindowsAzure.Commands.Storage.Common.LimitedConcurrencyTaskScheduler.<RunConcurrentTask>d__26.MoveNext()

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

  1. create BlobQueryOptions with "recordSeparator" not in InputTextConfiguration, OutputTextConfiguration
  2. Run BlockBlobClient.QueryAsync() with BlobQueryOptions created in step hierarchical namespace similar to a file system and CloudBlobContainer class inconsistency #1

Environment:

  • Name and version of the Library package used:
    "Azure.Storage.Blobs 12.9.0-beta.4"
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]
.NET Core SDK (reflecting any global.json):
 Version:   2.2.108
 Commit:    33ed5b90ce

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.108\

Host (useful for support):
  Version: 2.2.6
  Commit:  7dac9b1b51

.NET Core SDKs installed:
  2.2.108 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
  • IDE and version : [e.g. Visual Studio 16.3]
    VS 15.7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue is related to a non-management packageStorageStorage Service (Queues, Blobs, Files)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions