Skip to content

Commit 4053bcc

Browse files
authored
Merge pull request #418 from mbostwick/feature/skip-tool
Add Skip Option To Tools
2 parents 0dd71c4 + 25edae1 commit 4053bcc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tool/parquet-tools/parquet-tools.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func main() {
2929
withPrettySize := flag.Bool("pretty", false, "show pretty size")
3030
uncompressedSize := flag.Bool("uncompressed", false, "show uncompressed size")
3131
catCount := flag.Int("count", 1000, "max count to cat. If it is nil, only show first 1000 records.")
32+
skipCount := flag.Int64("skip", 0, "skip count with cat. If it is nil,skip 0 records.")
3233
schemaFormat := flag.String("schema-format", "json", "schema format go/json (default to JSON schema)")
3334

3435
flag.Parse()
@@ -112,6 +113,12 @@ func main() {
112113
if cnt > 1000 {
113114
cnt = 1000
114115
}
116+
117+
err = pr.SkipRows(*skipCount)
118+
if err != nil {
119+
fmt.Fprintf(os.Stderr, "Can't skip[: %s\n", err)
120+
os.Exit(1)
121+
}
115122

116123
res, err := pr.ReadByNumber(cnt)
117124
if err != nil {

0 commit comments

Comments
 (0)