Skip to content

Commit 05c85c2

Browse files
bluewwdingmeng-xue
andauthored
Revert "[Storage] Support Parquet in Quick query (#15539)" (#15568)
This reverts commit 862d3c4. Co-authored-by: Dingmeng Xue <[email protected]>
1 parent ad87106 commit 05c85c2

File tree

8 files changed

+19
-93
lines changed

8 files changed

+19
-93
lines changed

src/Storage/Storage.Management.Test/Storage.Management.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Azure.Storage.Blobs" Version="12.10.0-beta.2" />
15-
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.8.0-beta.2" />
16-
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.8.0-beta.2" />
17-
<PackageReference Include="Azure.Storage.Queues" Version="12.8.0-beta.2" />
14+
<PackageReference Include="Azure.Storage.Blobs" Version="12.8.0" />
15+
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.6.0" />
16+
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.6.0" />
17+
<PackageReference Include="Azure.Storage.Queues" Version="12.6.0" />
1818
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="22.0.0" />
1919
</ItemGroup>
2020

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
- `Enable-AzStorageBlobLastAccessTimeTracking`
2323
- `Disable-AzStorageBlobLastAccessTimeTracking`
2424
- `Add-AzStorageAccountManagementPolicyAction`
25-
* Supported Parquet as input text config in blob quick query
26-
- `New-AzStorageBlobQueryConfig`
27-
- `Get-AzStorageBlobQueryResult`
2825
* Made `Get-AzDataLakeGen2ChildItem` list all datalake gen2 items by default, instead of needing user to list chunk by chunk.
2926
* Fixed BlobProperties is empty issue when using sas without prefix '?' [#15460]
3027
* Fixed synchronously copy small blob failure [#15548]

src/Storage/Storage.Management/help/Get-AzStorageBlobQueryResult.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ The **Get-AzStorageBlobQueryResult** cmdlet applies a simple Structured Query La
5151

5252
### Example 1: Query a blob
5353
```powershell
54-
PS C:\> $inputconfig = New-AzStorageBlobQueryConfig -AsParquet
54+
PS C:\> $inputconfig = New-AzStorageBlobQueryConfig -AsCsv -HasHeader
5555
56-
PS C:\> $outputconfig = New-AzStorageBlobQueryConfig -AsCsv -HasHeader
56+
PS C:\> $outputconfig = New-AzStorageBlobQueryConfig -AsJson
5757
5858
PS C:\> $queryString = "SELECT * FROM BlobStorage WHERE Name = 'a'"
5959
@@ -387,7 +387,7 @@ Accept wildcard characters: False
387387
```
388388
389389
### CommonParameters
390-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
390+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
391391
392392
## INPUTS
393393

src/Storage/Storage.Management/help/New-AzStorageBlobQueryConfig.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ New-AzStorageBlobQueryConfig [-AsCsv] [-RecordSeparator <String>] [-ColumnSepara
2323
New-AzStorageBlobQueryConfig [-AsJson] [-RecordSeparator <String>] [-AsJob] [<CommonParameters>]
2424
```
2525

26-
### Parquet
27-
```
28-
New-AzStorageBlobQueryConfig [-AsParquet] [-AsJob] [<CommonParameters>]
29-
```
30-
3126
## DESCRIPTION
3227
The **New-AzStorageBlobQueryConfig** cmdlet creates a blob query configuration object, which can be used in Get-AzStorageBlobQueryResult.
3328

@@ -99,21 +94,6 @@ Accept pipeline input: False
9994
Accept wildcard characters: False
10095
```
10196
102-
### -AsParquet
103-
Indicate to create a Blob Query Configuration for Parquet.
104-
105-
```yaml
106-
Type: System.Management.Automation.SwitchParameter
107-
Parameter Sets: Parquet
108-
Aliases:
109-
110-
Required: True
111-
Position: 0
112-
Default value: None
113-
Accept pipeline input: False
114-
Accept wildcard characters: False
115-
```
116-
11797
### -ColumnSeparator
11898
Optional.
11999
The string used to separate columns.
@@ -184,7 +164,7 @@ The string used to separate records.
184164
185165
```yaml
186166
Type: System.String
187-
Parameter Sets: Csv, Json
167+
Parameter Sets: (All)
188168
Aliases:
189169

190170
Required: False
@@ -195,7 +175,7 @@ Accept wildcard characters: False
195175
```
196176
197177
### CommonParameters
198-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
178+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
199179
200180
## INPUTS
201181

src/Storage/Storage/Blob/Cmdlet/NewAzStorageBlobQueryConfig .cs

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ public class NewAzStorageBlobQueryConfigCommand : AzureDataCmdlet
3232
/// </summary>
3333
private const string JsonParameterSet = "Json";
3434

35-
/// <summary>
36-
/// Parquet parameter set name
37-
/// </summary>
38-
private const string ParquetParameterSet = "Parquet";
39-
40-
[Parameter(Mandatory = true,
35+
[Parameter(Mandatory = true,
4136
Position = 0,
4237
HelpMessage = "Indicate to create a Blob Query Configuration for CSV.",
4338
ParameterSetName = CsvParameterSet)]
@@ -46,18 +41,11 @@ public class NewAzStorageBlobQueryConfigCommand : AzureDataCmdlet
4641

4742
[Parameter(Mandatory = true,
4843
Position = 0,
49-
HelpMessage = "Indicate to create a Blob Query Configuration for Json.",
44+
HelpMessage = "Indicate to create a Blob Query Configuration for Json.",
5045
ParameterSetName = JsonParameterSet)]
5146
[ValidateNotNullOrEmpty]
5247
public SwitchParameter AsJson { get; set; }
5348

54-
[Parameter(Mandatory = true,
55-
Position = 0,
56-
HelpMessage = "Indicate to create a Blob Query Configuration for Parquet.",
57-
ParameterSetName = ParquetParameterSet)]
58-
[ValidateNotNullOrEmpty]
59-
public SwitchParameter AsParquet { get; set; }
60-
6149
[Parameter(Mandatory = false, HelpMessage = "Optional. The string used to separate records.", ParameterSetName = CsvParameterSet)]
6250
[Parameter(Mandatory = false, HelpMessage = "Optional. The string used to separate records.", ParameterSetName = JsonParameterSet)]
6351
public string RecordSeparator { get; set; }
@@ -126,7 +114,7 @@ public override void ExecuteCmdlet()
126114
};
127115
WriteObject(queryConfig);
128116
}
129-
else if (this.AsCsv.IsPresent) // Csv
117+
else // Csv
130118
{
131119
PSBlobQueryTextConfiguration queryConfig = new PSBlobQueryCsvTextConfiguration()
132120
{
@@ -139,14 +127,6 @@ public override void ExecuteCmdlet()
139127
};
140128
WriteObject(queryConfig);
141129
}
142-
else // Parquet
143-
{
144-
PSBlobQueryParquetTextOptions queryConfig = new PSBlobQueryParquetTextOptions()
145-
{
146-
Type = BlobQueryConfigType.Parquet
147-
};
148-
WriteObject(queryConfig);
149-
}
150130
}
151131
}
152132
}

src/Storage/Storage/Common/BlobQueryTextConfiguration.cs

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel
2323
public enum BlobQueryConfigType
2424
{
2525
Csv,
26-
Json,
27-
Parquet
26+
Json
2827
}
2928

3029
/// <summary>
@@ -33,6 +32,7 @@ public enum BlobQueryConfigType
3332
public abstract class PSBlobQueryTextConfiguration
3433
{
3534
public BlobQueryConfigType Type { get; set; }
35+
public string RecordSeparator { get; set; }
3636

3737
public BlobQueryTextOptions ParseBlobQueryTextConfiguration()
3838
{
@@ -48,18 +48,14 @@ public BlobQueryTextOptions ParseBlobQueryTextConfiguration()
4848
HasHeaders = csvconfig.HasHeaders
4949
};
5050
}
51-
else if (this.Type == BlobQueryConfigType.Json) //json
51+
else //json
5252
{
5353
PSBlobQueryJsonTextConfiguration jsonconfig = (PSBlobQueryJsonTextConfiguration)this;
5454
return new BlobQueryJsonTextOptions()
5555
{
5656
RecordSeparator = jsonconfig.RecordSeparator
5757
};
5858
}
59-
else //Parquet
60-
{
61-
return new BlobQueryParquetTextOptions();
62-
}
6359
}
6460
}
6561

@@ -68,7 +64,6 @@ public BlobQueryTextOptions ParseBlobQueryTextConfiguration()
6864
/// </summary>
6965
public class PSBlobQueryJsonTextConfiguration : PSBlobQueryTextConfiguration
7066
{
71-
public string RecordSeparator { get; set; }
7267
public PSBlobQueryJsonTextConfiguration() { }
7368

7469
public PSBlobQueryJsonTextConfiguration(BlobQueryJsonTextOptions config)
@@ -91,7 +86,6 @@ public BlobQueryJsonTextOptions ParseBlobQueryJsonTextConfiguration()
9186
/// </summary>
9287
public class PSBlobQueryCsvTextConfiguration : PSBlobQueryTextConfiguration
9388
{
94-
public string RecordSeparator { get; set; }
9589
public string ColumnSeparator { get; set; }
9690
public char? QuotationCharacter { get; set; }
9791
public char? EscapeCharacter { get; set; }
@@ -123,28 +117,6 @@ public BlobQueryCsvTextOptions ParseBlobQueryCsvTextConfiguration()
123117
}
124118
}
125119

126-
127-
/// <summary>
128-
/// Wrapper Class for BlobQueryParquetTextOptions
129-
/// </summary>
130-
public class PSBlobQueryParquetTextOptions : PSBlobQueryTextConfiguration
131-
{
132-
public PSBlobQueryParquetTextOptions()
133-
{
134-
this.Type = BlobQueryConfigType.Parquet;
135-
}
136-
137-
public PSBlobQueryParquetTextOptions(BlobQueryParquetTextOptions config)
138-
{
139-
this.Type = BlobQueryConfigType.Parquet;
140-
}
141-
142-
public BlobQueryParquetTextOptions ParseBlobQueryParquetTextOptions()
143-
{
144-
return new BlobQueryParquetTextOptions();
145-
}
146-
}
147-
148120
/// <summary>
149121
/// Wrapper of BlobQueryError
150122
/// </summary>

src/Storage/Storage/Storage.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Azure.Storage.Blobs" Version="12.10.0-beta.2" />
16-
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.8.0-beta.2" />
17-
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.8.0-beta.2" />
18-
<PackageReference Include="Azure.Storage.Queues" Version="12.8.0-beta.2" />
15+
<PackageReference Include="Azure.Storage.Blobs" Version="12.8.0" />
16+
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.6.0" />
17+
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.6.0" />
18+
<PackageReference Include="Azure.Storage.Queues" Version="12.6.0" />
1919
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
2020
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
2121
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.2.2" />

tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@
1212
"Az.Storage","Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.SetAzureStorageFileContent","Set-AzStorageFileContent","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Set-AzStorageFileContent' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Set-AzStorageFileContent'."
1313
"Az.Storage","Microsoft.Azure.Commands.Management.Storage.NewAzureStorageAccountCommand","New-AzStorageAccount","0","2040","The validation set for parameter 'DefaultSharePermission' for cmdlet 'New-AzStorageAccount' no longer contains the value 'StorageFileDataSmbShareOwner'.","Add 'StorageFileDataSmbShareOwner' back to the validation set for 'DefaultSharePermission'."
1414
"Az.Storage","Microsoft.Azure.Commands.Management.Storage.SetAzureStorageAccountCommand","Set-AzStorageAccount","0","2040","The validation set for parameter 'DefaultSharePermission' for cmdlet 'Set-AzStorageAccount' no longer contains the value 'StorageFileDataSmbShareOwner'.","Add 'StorageFileDataSmbShareOwner' back to the validation set for 'DefaultSharePermission'."
15-
"Az.Storage","Microsoft.WindowsAzure.Commands.Storage.Blob.GetStorageAzureBlobQueryResultCommand","Get-AzStorageBlobQueryResult","0","3010","The property 'RecordSeparator' of type 'Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.PSBlobQueryTextConfiguration' has been removed.","Add the property 'RecordSeparator' back to type 'Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.PSBlobQueryTextConfiguration'."
16-
"Az.Storage","Microsoft.WindowsAzure.Commands.Storage.Blob.GetStorageAzureBlobQueryResultCommand","Get-AzStorageBlobQueryResult","0","3010","The property 'RecordSeparator' of type 'Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.PSBlobQueryTextConfiguration' has been removed.","Add the property 'RecordSeparator' back to type 'Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.PSBlobQueryTextConfiguration'."
17-
"Az.Storage","Microsoft.Azure.Commands.Management.Storage.NewAzStorageBlobQueryConfigCommand","New-AzStorageBlobQueryConfig","0","3010","The property 'RecordSeparator' of type 'Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.PSBlobQueryTextConfiguration' has been removed.","Add the property 'RecordSeparator' back to type 'Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.PSBlobQueryTextConfiguration'."

0 commit comments

Comments
 (0)