Accept --columns as a JSON array.

Promote NuGet to 0.1.21
This commit is contained in:
Igor Borodin 2023-02-16 14:37:59 +02:00
Родитель b556f434eb
Коммит 2d48acc2d1
3 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -2,14 +2,14 @@
<package >
<metadata>
<id>pq2json_linux</id>
<version>0.1.20</version>
<version>0.1.21</version>
<authors>Evgeney Ryzhyk</authors>
<owners>Evgeney Ryzhyk</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Azure/azure-kusto-parquet-conv</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Parquet to JSON (line delimited) converter tool.</description>
<releaseNotes>Updated Rust dependencies for security fixes.</releaseNotes>
<releaseNotes>Accept --columns as a JSON array.</releaseNotes>
<copyright>Copyright 2020</copyright>
<tags></tags>
<dependencies></dependencies>

Просмотреть файл

@ -2,14 +2,14 @@
<package >
<metadata>
<id>pq2json</id>
<version>0.1.20</version>
<version>0.1.21</version>
<authors>Evgeney Ryzhyk</authors>
<owners>Evgeney Ryzhyk</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Azure/azure-kusto-parquet-conv</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Parquet to JSON (line delimited) converter tool.</description>
<releaseNotes>Updated Rust dependencies for security fixes.</releaseNotes>
<releaseNotes>Accept --columns as a JSON array.</releaseNotes>
<copyright>Copyright 2020</copyright>
<tags></tags>
<dependencies></dependencies>

Просмотреть файл

@ -139,9 +139,10 @@ fn main() {
timestamp_rendering,
omit_empty_lists: matches.is_present("omit-empty-lists") || matches.is_present("prune"),
convert_types: matches.is_present("convert-types"),
columns: matches
.value_of("columns")
.map(|columns| columns.split(",").map(|s| s.to_string()).collect()),
columns: matches.value_of("columns").map(|columns| {
serde_json::from_str::<Vec<String>>(columns)
.expect("Expected a well-formed JSON array of column names, each surrounded by escaped double-quotes")
}),
csv: matches.is_present("csv"),
};