diff --git a/api/client/connection.go b/api/client/connection.go index ed0476e9ad..84b0b8f761 100644 --- a/api/client/connection.go +++ b/api/client/connection.go @@ -61,8 +61,8 @@ func NewConnection() *Connection { // and a base URL derived from the hostURL argument. func NewConnectionTo(hostURL string) *Connection { defaultHeader := http.Header{ - "Accept": []string{api.MediaTypeZNG}, - "Content-Type": []string{api.MediaTypeZNG}, + "Accept": []string{api.MediaTypeBSUP}, + "Content-Type": []string{api.MediaTypeBSUP}, } return &Connection{ client: &http.Client{}, @@ -409,7 +409,7 @@ func (c *Connection) doVector(ctx context.Context, pool, revision string, object func (c *Connection) SubscribeEvents(ctx context.Context) (*EventsClient, error) { req := c.NewRequest(ctx, http.MethodGet, "/events", nil) - req.Header.Set("Accept", api.MediaTypeZSON) + req.Header.Set("Accept", api.MediaTypeJSUP) resp, err := c.Do(req) if err != nil { return nil, err diff --git a/api/mime.go b/api/mime.go index 7d52587a0c..cc2c285aec 100644 --- a/api/mime.go +++ b/api/mime.go @@ -10,17 +10,17 @@ import ( const ( MediaTypeAny = "*/*" MediaTypeArrowStream = "application/vnd.apache.arrow.stream" + MediaTypeBSUP = "application/x-bsup" + MediaTypeCSUP = "application/x-csup" MediaTypeCSV = "text/csv" MediaTypeJSON = "application/json" + MediaTypeJSUP = "application/x-jsup" MediaTypeLine = "application/x-line" MediaTypeNDJSON = "application/x-ndjson" MediaTypeParquet = "application/x-parquet" MediaTypeTSV = "text/tab-separated-values" - MediaTypeVNG = "application/x-vng" MediaTypeZeek = "application/x-zeek" MediaTypeZJSON = "application/x-zjson" - MediaTypeZNG = "application/x-zng" - MediaTypeZSON = "application/x-zson" ) type ErrUnsupportedMimeType struct { @@ -46,10 +46,16 @@ func MediaTypeToFormat(s string, dflt string) (string, error) { return dflt, nil case MediaTypeArrowStream: return "arrows", nil + case MediaTypeBSUP: + return "bsup", nil + case MediaTypeCSUP: + return "csup", nil case MediaTypeCSV: return "csv", nil case MediaTypeJSON: return "json", nil + case MediaTypeJSUP: + return "jsup", nil case MediaTypeLine: return "line", nil case MediaTypeNDJSON: @@ -58,16 +64,10 @@ func MediaTypeToFormat(s string, dflt string) (string, error) { return "parquet", nil case MediaTypeTSV: return "tsv", nil - case MediaTypeVNG: - return "vng", nil case MediaTypeZeek: return "zeek", nil case MediaTypeZJSON: return "zjson", nil - case MediaTypeZNG: - return "zng", nil - case MediaTypeZSON: - return "zson", nil } return "", &ErrUnsupportedMimeType{typ} } @@ -76,10 +76,16 @@ func FormatToMediaType(format string) (string, error) { switch format { case "arrows": return MediaTypeArrowStream, nil + case "bsup": + return MediaTypeBSUP, nil + case "csup": + return MediaTypeCSUP, nil case "csv": return MediaTypeCSV, nil case "json": return MediaTypeJSON, nil + case "jsup": + return MediaTypeJSUP, nil case "line": return MediaTypeLine, nil case "ndjson": @@ -88,16 +94,10 @@ func FormatToMediaType(format string) (string, error) { return MediaTypeParquet, nil case "tsv": return MediaTypeTSV, nil - case "vng": - return MediaTypeVNG, nil case "zeek": return MediaTypeZeek, nil case "zjson": return MediaTypeZJSON, nil - case "zng": - return MediaTypeZNG, nil - case "zson": - return MediaTypeZSON, nil default: return "", fmt.Errorf("unknown format type: %s", format) } diff --git a/api/queryio/writer.go b/api/queryio/writer.go index a5a1343322..2070995955 100644 --- a/api/queryio/writer.go +++ b/api/queryio/writer.go @@ -33,7 +33,7 @@ func NewWriter(w io.WriteCloser, format string, flusher http.Flusher, ctrl bool) } var err error switch format { - case "zng": + case "bsup": d.writer = NewZNGWriter(w) case "zjson": d.writer = NewZJSONWriter(w) diff --git a/cli/inputflags/flags.go b/cli/inputflags/flags.go index ed8bfe66fe..297984580c 100644 --- a/cli/inputflags/flags.go +++ b/cli/inputflags/flags.go @@ -28,7 +28,7 @@ func (f *Flags) Options() anyio.ReaderOpts { } func (f *Flags) SetFlags(fs *flag.FlagSet, validate bool) { - fs.StringVar(&f.Format, "i", "auto", "format of input data [auto,arrows,csv,json,line,parquet,tsv,vng,zeek,zjson,zng,zson]") + fs.StringVar(&f.Format, "i", "auto", "format of input data [auto,arrows,bsup,csup,csv,json,jsup,line,parquet,tsv,zeek,zjson]") f.CSV.Delim = ',' fs.Func("csv.delim", `CSV field delimiter (default ",")`, func(s string) error { if len(s) != 1 { @@ -38,12 +38,12 @@ func (f *Flags) SetFlags(fs *flag.FlagSet, validate bool) { return nil }) - fs.BoolVar(&f.ZNG.Validate, "zng.validate", validate, "validate format when reading ZNG") - fs.IntVar(&f.ZNG.Threads, "zng.threads", 0, "number of ZNG read threads (0=GOMAXPROCS)") + fs.BoolVar(&f.ZNG.Validate, "bsup.validate", validate, "validate format when reading Super Binary") + fs.IntVar(&f.ZNG.Threads, "bsup.threads", 0, "number of Super Binary read threads (0=GOMAXPROCS)") f.ReadMax = auto.NewBytes(zngio.MaxSize) - fs.Var(&f.ReadMax, "zng.readmax", "maximum ZNG read buffer size in MiB, MB, etc.") + fs.Var(&f.ReadMax, "bsup.readmax", "maximum Super Binary read buffer size in MiB, MB, etc.") f.ReadSize = auto.NewBytes(zngio.ReadSize) - fs.Var(&f.ReadSize, "zng.readsize", "target ZNG read buffer size in MiB, MB, etc.") + fs.Var(&f.ReadSize, "bsup.readsize", "target Super Binary read buffer size in MiB, MB, etc.") } // Init is called after flags have been parsed. diff --git a/cli/outputflags/flags.go b/cli/outputflags/flags.go index 1981387d17..845947f4f6 100644 --- a/cli/outputflags/flags.go +++ b/cli/outputflags/flags.go @@ -22,17 +22,17 @@ import ( type Flags struct { anyio.WriterOpts DefaultFormat string - split string - splitSize auto.Bytes - outputFile string + color bool forceBinary bool - jsonShortcut bool jsonPretty bool - zsonShortcut bool - zsonPretty bool - zsonPersist string - color bool + jsonShortcut bool + jsupPersist string + jsupPretty bool + jsupShortcut bool + outputFile string pretty int + split string + splitSize auto.Bytes unbuffered bool } @@ -41,24 +41,21 @@ func (f *Flags) Options() anyio.WriterOpts { } func (f *Flags) setFlags(fs *flag.FlagSet) { - // zio stuff - fs.BoolVar(&f.color, "color", true, "enable/disable color formatting for -Z and lake text output") f.ZNG = &zngio.WriterOpts{} - fs.BoolVar(&f.ZNG.Compress, "zng.compress", true, "compress ZNG frames") - fs.IntVar(&f.ZNG.FrameThresh, "zng.framethresh", zngio.DefaultFrameThresh, - "minimum ZNG frame size in uncompressed bytes") - fs.IntVar(&f.pretty, "pretty", 4, - "tab size to pretty print JSON/ZSON output (0 for newline-delimited JSON/ZSON") - fs.StringVar(&f.zsonPersist, "persist", "", + fs.BoolVar(&f.ZNG.Compress, "bsup.compress", true, "compress Super Binary frames") + fs.IntVar(&f.ZNG.FrameThresh, "bsup.framethresh", zngio.DefaultFrameThresh, + "minimum Super Binary frame size in uncompressed bytes") + fs.BoolVar(&f.color, "color", true, "enable/disable color formatting for -Z and lake text output") + fs.StringVar(&f.jsupPersist, "persist", "", "regular expression to persist type definitions across the stream") - - // emitter stuff + fs.IntVar(&f.pretty, "pretty", 4, + "tab size to pretty print JSON and Super JSON output (0 for newline-delimited output") + fs.StringVar(&f.outputFile, "o", "", "write data to output file") fs.StringVar(&f.split, "split", "", "split output into one file per data type in this directory (but see -splitsize)") fs.Var(&f.splitSize, "splitsize", "if >0 and -split is set, split into files at least this big rather than by data type") fs.BoolVar(&f.unbuffered, "unbuffered", false, "disable output buffering") - fs.StringVar(&f.outputFile, "o", "", "write data to output file") } func (f *Flags) SetFlags(fs *flag.FlagSet) { @@ -73,48 +70,48 @@ func (f *Flags) SetFlagsWithFormat(fs *flag.FlagSet, format string) { func (f *Flags) SetFormatFlags(fs *flag.FlagSet) { if f.DefaultFormat == "" { - f.DefaultFormat = "zng" + f.DefaultFormat = "bsup" } - fs.StringVar(&f.Format, "f", f.DefaultFormat, "format for output data [arrows,csv,json,lake,parquet,table,text,tsv,vng,zeek,zjson,zng,zson]") - fs.BoolVar(&f.jsonShortcut, "j", false, "use line-oriented JSON output independent of -f option") + fs.StringVar(&f.Format, "f", f.DefaultFormat, "format for output data [arrows,bsup,csup,csv,json,jsup,lake,parquet,table,text,tsv,zeek,zjson]") + fs.BoolVar(&f.forceBinary, "B", false, "allow Super Binary to be sent to a terminal output") fs.BoolVar(&f.jsonPretty, "J", false, "use formatted JSON output independent of -f option") - fs.BoolVar(&f.zsonShortcut, "z", false, "use line-oriented ZSON output independent of -f option") - fs.BoolVar(&f.zsonPretty, "Z", false, "use formatted ZSON output independent of -f option") - fs.BoolVar(&f.forceBinary, "B", false, "allow binary zng be sent to a terminal output") + fs.BoolVar(&f.jsonShortcut, "j", false, "use line-oriented JSON output independent of -f option") + fs.BoolVar(&f.jsupPretty, "Z", false, "use formatted Super JSON output independent of -f option") + fs.BoolVar(&f.jsupShortcut, "z", false, "use line-oriented Super JSON output independent of -f option") } func (f *Flags) Init() error { f.JSON.Pretty, f.ZSON.Pretty = f.pretty, f.pretty - if f.zsonPersist != "" { - re, err := regexp.Compile(f.zsonPersist) + if f.jsupPersist != "" { + re, err := regexp.Compile(f.jsupPersist) if err != nil { return err } f.ZSON.Persist = re } if f.jsonShortcut || f.jsonPretty { - if f.Format != f.DefaultFormat || f.zsonShortcut || f.zsonPretty { + if f.Format != f.DefaultFormat || f.jsupShortcut || f.jsupPretty { return errors.New("cannot use -j or -J with -f, -z, or -Z") } f.Format = "json" if !f.jsonPretty { f.JSON.Pretty = 0 } - } else if f.zsonShortcut || f.zsonPretty { + } else if f.jsupShortcut || f.jsupPretty { if f.Format != f.DefaultFormat { return errors.New("cannot use -z or -Z with -f") } - f.Format = "zson" - if !f.zsonPretty { + f.Format = "jsup" + if !f.jsupPretty { f.ZSON.Pretty = 0 } } if f.outputFile == "-" { f.outputFile = "" } - if f.outputFile == "" && f.split == "" && f.Format == "zng" && !f.forceBinary && + if f.outputFile == "" && f.split == "" && f.Format == "bsup" && !f.forceBinary && terminal.IsTerminalFile(os.Stdout) { - f.Format = "zson" + f.Format = "jsup" f.ZSON.Pretty = 0 } if f.unbuffered { diff --git a/cmd/super/db/manage/ztests/config.yaml b/cmd/super/db/manage/ztests/config.yaml index 8278ce1275..27cb51ba59 100644 --- a/cmd/super/db/manage/ztests/config.yaml +++ b/cmd/super/db/manage/ztests/config.yaml @@ -6,7 +6,7 @@ script: | super db create -q test3 super db branch -use test2 -q live super db manage -config=inherit.yaml -log.path=inherit.log - super -Z -c 'msg == "updating pool" | cut name, branch | sort name' inherit.log > inherit.zson + super -Z -c 'msg == "updating pool" | cut name, branch | sort name' inherit.log > inherit.jsup inputs: - name: inherit.yaml @@ -18,7 +18,7 @@ inputs: branch: "live" outputs: - - name: inherit.zson + - name: inherit.jsup data: | { name: "test1", diff --git a/cmd/super/db/serve/command.go b/cmd/super/db/serve/command.go index 9ff3af8721..3bae6df78e 100644 --- a/cmd/super/db/serve/command.go +++ b/cmd/super/db/serve/command.go @@ -76,7 +76,7 @@ func New(parent charm.Command, f *flag.FlagSet) (charm.Command, error) { c.conf.CORSAllowedOrigins = append(c.conf.CORSAllowedOrigins, s) return nil }) - f.StringVar(&c.conf.DefaultResponseFormat, "defaultfmt", service.DefaultZedFormat, "default response format") + f.StringVar(&c.conf.DefaultResponseFormat, "defaultfmt", service.DefaultFormat, "default response format") f.StringVar(&c.listenAddr, "l", ":9867", "[addr]:port to listen on") f.DurationVar(&c.manage, "manage", 0, "when positive, run lake maintenance tasks at this interval") f.StringVar(&c.portFile, "portfile", "", "write listen port to file") diff --git a/cmd/super/db/ztests/query-stats.yaml b/cmd/super/db/ztests/query-stats.yaml index d09ba31eb7..949e152a88 100644 --- a/cmd/super/db/ztests/query-stats.yaml +++ b/cmd/super/db/ztests/query-stats.yaml @@ -2,12 +2,12 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q test - super db load -q -use test babble.zson + super db load -q -use test babble.jsup super db query -s -z "from test | count()" inputs: - - name: babble.zson - source: ../../../../testdata/babble.zson + - name: babble.jsup + source: ../../../../testdata/babble.jsup outputs: - name: stdout diff --git a/cmd/super/dev/dig/ztests/frames.yaml b/cmd/super/dev/dig/ztests/frames.yaml index 1f13535e78..4f78faff19 100644 --- a/cmd/super/dev/dig/ztests/frames.yaml +++ b/cmd/super/dev/dig/ztests/frames.yaml @@ -1,13 +1,13 @@ script: | - super a.zson > c.zng - super b.zson >> c.zng - super dev dig frames -z c.zng + super a.jsup > c.bsup + super b.jsup >> c.bsup + super dev dig frames -z c.bsup inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:2} diff --git a/cmd/super/dev/vng/command.go b/cmd/super/dev/vng/command.go index 7be8b83dfb..a116e2c6f4 100644 --- a/cmd/super/dev/vng/command.go +++ b/cmd/super/dev/vng/command.go @@ -20,7 +20,7 @@ import ( ) var spec = &charm.Spec{ - Name: "vng", + Name: "csup", Usage: "vng uri", Short: "dump VNG metadata", Long: ` diff --git a/cmd/super/root/command.go b/cmd/super/root/command.go index ce0fcf9b58..c011eae0f5 100644 --- a/cmd/super/root/command.go +++ b/cmd/super/root/command.go @@ -41,8 +41,9 @@ See https://github.com/brimdata/super/tree/main/docs/language for details. Supported input formats include CSV, JSON, NDJSON, Parquet, -VNG, ZNG, ZSON, and Zeek TSV. Supported output formats include -all the input formats along with a SQL-like table format. +Super JSON, Super Binary, Super Columnar, and Zeek TSV. +Supported output formats include all the input formats along with +a SQL-like table format. "zq" must be run with at least one input. Input files can be file system paths; "-" for standard input; or HTTP, HTTPS, or S3 URLs. @@ -61,7 +62,7 @@ flag to indicate a destination directory for separate output files for each output type. This flag may be used in combination with -o, which provides the prefix for the file path, e.g., - zq -f parquet -split out -o example-output input.zng + zq -f parquet -split out -o example-output input.bsup When writing to stdout and stdout is a terminal, the default output format is ZSON. Otherwise, the default format is binary ZNG. In either case, the default @@ -85,8 +86,8 @@ The "zq" engine processes data natively in Zed so if you intend to run many queries over the same data, you will see substantial performance gains by converting your data to the efficient binary form of Zed called ZNG, e.g., - zq -f zng input.json > fast.zng - zq fast.zng + zq -f zng input.json > fast.bsup + zq fast.bsup ... Please see https://github.com/brimdata/super for more information. diff --git a/cmd/super/ztests/aggmem.yaml b/cmd/super/ztests/aggmem.yaml index 0009ab41cb..ed1e29e547 100644 --- a/cmd/super/ztests/aggmem.yaml +++ b/cmd/super/ztests/aggmem.yaml @@ -1,9 +1,9 @@ script: | - super -aggmem 1B -z -c 'collect(this)' a.zson - ! super -aggmem 0 a.zson + super -aggmem 1B -z -c 'collect(this)' a.jsup + ! super -aggmem 0 a.jsup inputs: - - name: a.zson + - name: a.jsup data: | {a:1} diff --git a/cmd/super/ztests/call-user-op-with-src.yaml b/cmd/super/ztests/call-user-op-with-src.yaml index bd9c9d5d25..94b64c0134 100644 --- a/cmd/super/ztests/call-user-op-with-src.yaml +++ b/cmd/super/ztests/call-user-op-with-src.yaml @@ -5,9 +5,9 @@ inputs: - name: countfile.zed data: | op countfile(): ( - file test.zson | count() + file test.jsup | count() ) - - name: test.zson + - name: test.jsup data: '{} {} {} {}' outputs: diff --git a/cmd/super/ztests/diropt2.yaml b/cmd/super/ztests/diropt2.yaml index 52416b1c8b..edef1d04c4 100644 --- a/cmd/super/ztests/diropt2.yaml +++ b/cmd/super/ztests/diropt2.yaml @@ -13,12 +13,12 @@ inputs: {_path:"dns",a:4} outputs: - - name: out/foo-conn.zson + - name: out/foo-conn.jsup data: | {_path:"conn",a:"foo"} {_path:"conn",a:"hello"} {_path:"conn",a:"world"} - - name: out/foo-dns.zson + - name: out/foo-dns.jsup data: | {_path:"dns",a:1} {_path:"dns",a:2} diff --git a/cmd/super/ztests/from-file.yaml b/cmd/super/ztests/from-file.yaml index ac422abd9d..2289ea455e 100644 --- a/cmd/super/ztests/from-file.yaml +++ b/cmd/super/ztests/from-file.yaml @@ -1,14 +1,14 @@ script: | - super -z -c 'file a.zson' + super -z -c 'file a.jsup' super -z -I query.zed inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - name: query.zed data: | - file a.zson + file a.jsup outputs: - name: stdout diff --git a/cmd/super/ztests/http-multiple.yaml b/cmd/super/ztests/http-multiple.yaml index 93fb362775..3d81e719e2 100644 --- a/cmd/super/ztests/http-multiple.yaml +++ b/cmd/super/ztests/http-multiple.yaml @@ -1,13 +1,13 @@ script: | . http.bash - super -z -c "sort ts" $http_base_url/log1.zson $http_base_url/log2.zson + super -z -c "sort ts" $http_base_url/log1.jsup $http_base_url/log2.jsup inputs: - name: http.bash - - name: log1.zson + - name: log1.jsup data: | {ts:2018-03-24T17:15:21.255387Z,uid:"C8Tful1TvM3Zf5x8fl"} - - name: log2.zson + - name: log2.jsup data: | {ts:2018-03-24T17:15:21.411148Z,uid:"CXWfTK3LRdiuQxBbM6"} diff --git a/cmd/super/ztests/http-simple.yaml b/cmd/super/ztests/http-simple.yaml index 795e73bbd4..98023a477a 100644 --- a/cmd/super/ztests/http-simple.yaml +++ b/cmd/super/ztests/http-simple.yaml @@ -1,11 +1,11 @@ script: | . http.bash - super -z -c 'count()' $http_base_url/babble.zson + super -z -c 'count()' $http_base_url/babble.jsup inputs: - name: http.bash - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup outputs: - name: stdout diff --git a/cmd/super/ztests/j-flag.yaml b/cmd/super/ztests/j-flag.yaml index 7d859ec3aa..ed2e0650bc 100644 --- a/cmd/super/ztests/j-flag.yaml +++ b/cmd/super/ztests/j-flag.yaml @@ -1,11 +1,11 @@ script: | - super -j in.zson - ! super -j -f zson in.zson - ! super -j -z in.zson - ! super -j -Z in.zson + super -j in.jsup + ! super -j -f jsup in.jsup + ! super -j -z in.jsup + ! super -j -Z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:1} diff --git a/cmd/super/ztests/s3-multiple.yaml b/cmd/super/ztests/s3-multiple.yaml index a0e969bc2f..98f08f4bcd 100644 --- a/cmd/super/ztests/s3-multiple.yaml +++ b/cmd/super/ztests/s3-multiple.yaml @@ -1,15 +1,15 @@ script: | source minio.sh - mv *.zson data/bucket - super -z -c "sort ts" s3://bucket/log1.zson s3://bucket/log2.zson + mv *.jsup data/bucket + super -z -c "sort ts" s3://bucket/log1.jsup s3://bucket/log2.jsup inputs: - name: minio.sh source: ../../../testdata/minio.sh - - name: log1.zson + - name: log1.jsup data: | {ts:2018-03-24T17:15:21.255387Z,uid:"C8Tful1TvM3Zf5x8fl"} - - name: log2.zson + - name: log2.jsup data: | {ts:2018-03-24T17:15:21.411148Z,uid:"CXWfTK3LRdiuQxBbM6"} diff --git a/cmd/super/ztests/s3-simple.yaml b/cmd/super/ztests/s3-simple.yaml index b863906f52..fbbe41636e 100644 --- a/cmd/super/ztests/s3-simple.yaml +++ b/cmd/super/ztests/s3-simple.yaml @@ -1,11 +1,11 @@ script: | source minio.sh - mv babble.zson ./data/bucket - super -z -c "count()" s3://bucket/babble.zson + mv babble.jsup ./data/bucket + super -z -c "count()" s3://bucket/babble.jsup inputs: - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup - name: minio.sh source: ../../../testdata/minio.sh diff --git a/cmd/super/ztests/single-arg-error.yaml b/cmd/super/ztests/single-arg-error.yaml index 98a9a8736c..bf7c292aea 100644 --- a/cmd/super/ztests/single-arg-error.yaml +++ b/cmd/super/ztests/single-arg-error.yaml @@ -1,9 +1,9 @@ script: | - ! super -c 'file sample.zson | count(' + ! super -c 'file sample.jsup | count(' outputs: - name: stderr data: | super: error parsing SuperPipe at line 1, column 26: - file sample.zson | count( + file sample.jsup | count( === ^ === diff --git a/cmd/super/ztests/split-o.yaml b/cmd/super/ztests/split-o.yaml index 6941eab982..d7ba0a31f0 100644 --- a/cmd/super/ztests/split-o.yaml +++ b/cmd/super/ztests/split-o.yaml @@ -10,11 +10,11 @@ inputs: 2 outputs: - - name: dir/prefix-0.zson + - name: dir/prefix-0.jsup data: | 1 2 - - name: dir/prefix-1.zson + - name: dir/prefix-1.jsup data: | {a:1} {a:2} diff --git a/cmd/super/ztests/split.yaml b/cmd/super/ztests/split.yaml index 643d261883..216ffdb4e8 100644 --- a/cmd/super/ztests/split.yaml +++ b/cmd/super/ztests/split.yaml @@ -10,11 +10,11 @@ inputs: 2 outputs: - - name: dir/0.zson + - name: dir/0.jsup data: | 1 2 - - name: dir/1.zson + - name: dir/1.jsup data: | {a:1} {a:2} diff --git a/cmd/super/ztests/splitsize.yaml b/cmd/super/ztests/splitsize.yaml index b1ec133b15..65ca6b56ae 100644 --- a/cmd/super/ztests/splitsize.yaml +++ b/cmd/super/ztests/splitsize.yaml @@ -1,39 +1,39 @@ script: | - super -z -split 2B -splitsize 2B in.zson - super -z -split 4B -splitsize 4B in.zson - super -z -split 6B -splitsize 6B in.zson - super -z -split 6B-o -splitsize 6B -o prefix in.zson + super -z -split 2B -splitsize 2B in.jsup + super -z -split 4B -splitsize 4B in.jsup + super -z -split 6B -splitsize 6B in.jsup + super -z -split 6B-o -splitsize 6B -o prefix in.jsup inputs: - - name: in.zson + - name: in.jsup data: | 0 1 2 outputs: - - name: 2B/0.zson + - name: 2B/0.jsup data: | 0 - - name: 2B/1.zson + - name: 2B/1.jsup data: | 1 - - name: 2B/2.zson + - name: 2B/2.jsup data: | 2 - - name: 4B/0.zson + - name: 4B/0.jsup data: | 0 1 - - name: 4B/1.zson + - name: 4B/1.jsup data: | 2 - - name: 6B/0.zson + - name: 6B/0.jsup data: | 0 1 2 - - name: 6B-o/prefix-0.zson + - name: 6B-o/prefix-0.jsup data: | 0 1 diff --git a/cmd/super/ztests/stop-on-error-1.yaml b/cmd/super/ztests/stop-on-error-1.yaml index 5326564939..f8635b89a7 100644 --- a/cmd/super/ztests/stop-on-error-1.yaml +++ b/cmd/super/ztests/stop-on-error-1.yaml @@ -1,15 +1,15 @@ script: | - ! super -c "*" good.zson bad.zson + ! super -c "*" good.jsup bad.jsup inputs: - - name: good.zson + - name: good.jsup data: | {_path:"conn",ts:1970-01-01T00:00:01Z} - - name: bad.zson + - name: bad.jsup data: | This is not a detectable format. outputs: - name: stderr regexp: | - bad.zson: format detection error.* + bad.jsup: format detection error.* diff --git a/cmd/super/ztests/stop-on-error-2.yaml b/cmd/super/ztests/stop-on-error-2.yaml index a700f7282a..aef5f1dad3 100644 --- a/cmd/super/ztests/stop-on-error-2.yaml +++ b/cmd/super/ztests/stop-on-error-2.yaml @@ -1,11 +1,11 @@ script: | - super -z -e=false -c "*" good.zson bad.zson + super -z -e=false -c "*" good.jsup bad.jsup inputs: - - name: good.zson + - name: good.jsup data: | {_path:"conn",ts:1970-01-01T00:00:01Z} - - name: bad.zson + - name: bad.jsup data: | This is not a detectable format. @@ -15,4 +15,4 @@ outputs: {_path:"conn",ts:1970-01-01T00:00:01Z} - name: stderr regexp: | - bad.zson: format detection error.* + bad.jsup: format detection error.* diff --git a/cmd/super/ztests/stop-on-error-3.yaml b/cmd/super/ztests/stop-on-error-3.yaml index e5274e49c0..3bac1b3ef0 100644 --- a/cmd/super/ztests/stop-on-error-3.yaml +++ b/cmd/super/ztests/stop-on-error-3.yaml @@ -1,12 +1,12 @@ # Second input has bad middle line (detection succeeds). script: | - ! super -z -e=false -c "*" good.zson bad.zson + ! super -z -e=false -c "*" good.jsup bad.jsup inputs: - - name: good.zson + - name: good.jsup data: | {_path:"conn",ts:1970-01-01T00:00:01Z} - - name: bad.zson + - name: bad.jsup data: | {_path:"conn",ts:1970-01-01T00:00:01Z} {_path:"conn",ts:1970-01-01T00:00:01Z} @@ -19,4 +19,4 @@ outputs: {_path:"conn",ts:1970-01-01T00:00:01Z} - name: stderr data: | - bad.zson: no such type name: "1" + bad.jsup: no such type name: "1" diff --git a/cmd/super/ztests/unbuffered.yaml b/cmd/super/ztests/unbuffered.yaml index bb0fbb9dd6..8ddef888de 100644 --- a/cmd/super/ztests/unbuffered.yaml +++ b/cmd/super/ztests/unbuffered.yaml @@ -1,14 +1,14 @@ script: | mkfifo fifo # "-i json" avoids reader buffering. - super -i json -unbuffered -z fifo > out.zson & + super -i json -unbuffered -z fifo > out.jsup & # Prevent zq from seeing EOF on fifo and exiting before the shell exits. exec 10> fifo echo 1 > fifo - # Wait for out.zson to have size greater than zero. - while [ ! -s out.zson -a $((i++)) -lt 50 ]; do sleep 0.1; done - # Get out.zson contents now, before zq exits. - cat out.zson + # Wait for out.jsup to have size greater than zero. + while [ ! -s out.jsup -a $((i++)) -lt 50 ]; do sleep 0.1; done + # Get out.jsup contents now, before zq exits. + cat out.jsup outputs: - name: stdout diff --git a/compiler/parser/ztests/comments.yaml b/compiler/parser/ztests/comments.yaml index d44588d2e5..7de0b203e3 100644 --- a/compiler/parser/ztests/comments.yaml +++ b/compiler/parser/ztests/comments.yaml @@ -1,12 +1,12 @@ script: | - super -z -I count.zed in.zson + super -z -I count.zed in.jsup inputs: - name: count.zed data: | 2 | c := count() //, , sum(v) // moon - - name: in.zson + - name: in.jsup data: | {v:1} {v:2} diff --git a/compiler/parser/ztests/glob-mul.yaml b/compiler/parser/ztests/glob-mul.yaml index a15e0d90a6..e104837bcc 100644 --- a/compiler/parser/ztests/glob-mul.yaml +++ b/compiler/parser/ztests/glob-mul.yaml @@ -1,10 +1,10 @@ script: | - super -z -c "grep(a*b,s)" in.zson + super -z -c "grep(a*b,s)" in.jsup echo === - super -z -c "s==a*b+1" in.zson + super -z -c "s==a*b+1" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {s:"axb"} {s:7(int32),a:2(int32),b:3(int32)} diff --git a/compiler/parser/ztests/multi-line.yaml b/compiler/parser/ztests/multi-line.yaml index 92e10f705b..85341a5b8a 100644 --- a/compiler/parser/ztests/multi-line.yaml +++ b/compiler/parser/ztests/multi-line.yaml @@ -1,5 +1,5 @@ script: | - super -z -I count.zed in.zson + super -z -I count.zed in.jsup inputs: - name: count.zed @@ -7,7 +7,7 @@ inputs: c := count() - - name: in.zson + - name: in.jsup data: | {s:"1"} {s:"2"} diff --git a/compiler/parser/ztests/where-expr.yaml b/compiler/parser/ztests/where-expr.yaml index 57ee033878..77a5de8acd 100644 --- a/compiler/parser/ztests/where-expr.yaml +++ b/compiler/parser/ztests/where-expr.yaml @@ -1,10 +1,10 @@ script: | - super -z -c "_path == 'conn' | count()" in.zson + super -z -c "_path == 'conn' | count()" in.jsup echo === - super -z -c "count() where _path == 'conn'" in.zson + super -z -c "count() where _path == 'conn'" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {_path:"conn"} {_path:"dns"} diff --git a/compiler/parser/ztests/where-search.yaml b/compiler/parser/ztests/where-search.yaml index 8b40f2b7b3..e1f8381c8a 100644 --- a/compiler/parser/ztests/where-search.yaml +++ b/compiler/parser/ztests/where-search.yaml @@ -1,10 +1,10 @@ script: | - super -z -c 'count() where grep("foo")' in.zson + super -z -c 'count() where grep("foo")' in.jsup echo === - super -z -c "foo | count()" in.zson + super -z -c "foo | count()" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {_path:"conn"} {_path:"foo"} diff --git a/compiler/ztests/const-from.yaml b/compiler/ztests/const-from.yaml index 45457214b6..a702938fd5 100644 --- a/compiler/ztests/const-from.yaml +++ b/compiler/ztests/const-from.yaml @@ -5,15 +5,15 @@ inputs: data: | const A=1 from ( - file a.zson => put x:=A+1 - file b.zson => put x:=A + file a.jsup => put x:=A+1 + file b.jsup => put x:=A ) | sort x - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:2} diff --git a/compiler/ztests/const-source.yaml b/compiler/ztests/const-source.yaml index 316d09f12c..0a53ea436d 100644 --- a/compiler/ztests/const-source.yaml +++ b/compiler/ztests/const-source.yaml @@ -4,7 +4,7 @@ script: | super db create -q test super db compile -dag -C 'const POOL = "test" from [POOL]' | sed -e "s/[a-zA-Z0-9]\{27\}/XXX/" echo "===" - super compile -dag -C 'const FILE = "A.zson" from [FILE]' + super compile -dag -C 'const FILE = "A.jsup" from [FILE]' echo "===" super db compile -dag -C 'const URL = "http://brimdata.io" get [URL]' ! super db compile -dag -C 'const POOL = 3.14 from [POOL]' @@ -22,9 +22,9 @@ outputs: ) === ( - const FILE = "A.zson" + const FILE = "A.jsup" - file A.zson + file A.jsup | output main ) === diff --git a/compiler/ztests/fork-from-and-pass.yaml b/compiler/ztests/fork-from-and-pass.yaml index 33ac4859a0..f5e5c05848 100644 --- a/compiler/ztests/fork-from-and-pass.yaml +++ b/compiler/ztests/fork-from-and-pass.yaml @@ -1,10 +1,10 @@ skip: XXX let's discuss this one script: | - super -c 'fork (=> from (file a.zson) => pass)' a.zson + super -c 'fork (=> from (file a.jsup) => pass)' a.jsup inputs: - - name: a.zson + - name: a.jsup data: | {a:1} diff --git a/compiler/ztests/fork-from.yaml b/compiler/ztests/fork-from.yaml index 8b3576fd42..51256ecc65 100644 --- a/compiler/ztests/fork-from.yaml +++ b/compiler/ztests/fork-from.yaml @@ -5,13 +5,13 @@ inputs: - name: query.zed data: | fork ( - => from (file a.zson => pass) - => from (file b.zson => pass) + => from (file a.jsup => pass) + => from (file b.jsup => pass) ) | sort a - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {a:2} diff --git a/compiler/ztests/from-fork.yaml b/compiler/ztests/from-fork.yaml index 76a689fc48..fa4cf0416c 100644 --- a/compiler/ztests/from-fork.yaml +++ b/compiler/ztests/from-fork.yaml @@ -1,8 +1,8 @@ script: | - super -z -c 'from (file in.zson file in.zson ) | fork (=> count() => count())' + super -z -c 'from (file in.jsup file in.jsup ) | fork (=> count() => count())' inputs: - - name: in.zson + - name: in.jsup data: | 1 diff --git a/compiler/ztests/from-pass.yaml b/compiler/ztests/from-pass.yaml index 1a1eb52774..153ff2be4d 100644 --- a/compiler/ztests/from-pass.yaml +++ b/compiler/ztests/from-pass.yaml @@ -1,18 +1,18 @@ -script: super -z -I join.zed left.zson +script: super -z -I join.zed left.jsup inputs: - name: join.zed data: | * | from ( pass - file right.zson + file right.jsup ) | inner join on x=y matched:=true - - name: left.zson + - name: left.jsup data: | {x:1,s:"one"} {x:2,s:"two"} {x:3,s:"three"} - - name: right.zson + - name: right.jsup data: | {y:2,y:"y-two"} diff --git a/compiler/ztests/join-desc.yaml b/compiler/ztests/join-desc.yaml index 3931ff9bb3..932fab8d48 100644 --- a/compiler/ztests/join-desc.yaml +++ b/compiler/ztests/join-desc.yaml @@ -1,21 +1,21 @@ script: | - super -z -I file.zed > file.zson + super -z -I file.zed > file.jsup export SUPER_DB_LAKE=test super db init -q super db create -q -use -orderby likes:desc people - super db load -q people.zson + super db load -q people.jsup super db create -q -use -orderby flavor:desc fruits - super db load -q fruits.zson - super db query -z -I pool.zed > pool.zson + super db load -q fruits.jsup + super db query -z -I pool.zed > pool.jsup inputs: - - name: people.zson + - name: people.jsup data: | {"name":"morgan","age":61,"likes":"tart"} {"name":"quinn","age":14,"likes":"sweet","note":"many kids enjoy sweets"} {"name":"jessie","age":30,"likes":"plain"} {"name":"chris","age":47,"likes":"tart"} - - name: fruits.zson + - name: fruits.jsup data: | {"name":"apple","color":"red","flavor":"tart"} {"name":"banana","color":"yellow","flavor":"sweet"} @@ -25,8 +25,8 @@ inputs: {"name":"figs","color":"brown","flavor":"plain"} - name: file.zed data: | - file fruits.zson | sort -r flavor - | join (file people.zson | sort -r likes) on flavor=likes eater:=name + file fruits.jsup | sort -r flavor + | join (file people.jsup | sort -r likes) on flavor=likes eater:=name - name: pool.zed data: | from fruits @@ -35,7 +35,7 @@ inputs: outputs: - name: stdout data: "" - - name: file.zson + - name: file.jsup data: | {name:"apple",color:"red",flavor:"tart",eater:"morgan"} {name:"apple",color:"red",flavor:"tart",eater:"chris"} @@ -43,7 +43,7 @@ outputs: {name:"strawberry",color:"red",flavor:"sweet",eater:"quinn"} {name:"dates",color:"brown",flavor:"sweet",note:"in season",eater:"quinn"} {name:"figs",color:"brown",flavor:"plain",eater:"jessie"} - - name: pool.zson + - name: pool.jsup data: | {name:"apple",color:"red",flavor:"tart",eater:"morgan"} {name:"apple",color:"red",flavor:"tart",eater:"chris"} diff --git a/compiler/ztests/quoted-type.yaml b/compiler/ztests/quoted-type.yaml index 18d4adb2af..7f19c7ecb7 100644 --- a/compiler/ztests/quoted-type.yaml +++ b/compiler/ztests/quoted-type.yaml @@ -1,10 +1,10 @@ script: | - super -z -c 'is(<"@foo">)' in.zson + super -z -c 'is(<"@foo">)' in.jsup echo === - super -z -c 'const foo = <"@foo"={x:int64}> const yz = <"Y Z"={y:"@foo"}> is(<"Y Z">)' in.zson + super -z -c 'const foo = <"@foo"={x:int64}> const yz = <"Y Z"={y:"@foo"}> is(<"Y Z">)' in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {x:1} {x:2}(="@foo") diff --git a/docs/commands/zed.md b/docs/commands/zed.md index 619066ecb3..6c6cbe54d2 100644 --- a/docs/commands/zed.md +++ b/docs/commands/zed.md @@ -476,7 +476,7 @@ pools. For example, this command ``` -zed load sample1.json sample2.zng sample3.zson +zed load sample1.json sample2.bsup sample3.jsup ``` loads files of varying formats in a single commit to the working branch. @@ -484,13 +484,13 @@ An alternative branch may be specified with a branch reference with the `-use` option, i.e., `@`. Supposing a branch called `live` existed, data can be committed into this branch as follows: ``` -zed load -use logs@live sample.zng +zed load -use logs@live sample.bsup ``` Or, as mentioned above, you can set the default branch for the load command via `use`: ``` zed use logs@live -zed load sample.zng +zed load sample.bsup ``` During a `load` operation, a commit is broken out into units called _data objects_ where a target object size is configured into the pool, @@ -537,11 +537,11 @@ data provenance and audit capabilities by embedding custom metadata in the commit history. Since commit objects are stored as Zed, the metadata can easily be -queried by running the `log -f zng` to retrieve the log in ZNG format, +queried by running the `log -f bsup` to retrieve the log in ZNG format, for example, and using [`zq`](zq.md) to pull the metadata out as in: ``` -zed log -f zng | zq 'has(meta) | yield {id,meta}' - +zed log -f bsup | zq 'has(meta) | yield {id,meta}' - ``` ### Log @@ -689,7 +689,7 @@ zed query 'from HEAD' When querying data to the ZNG output format, output from a pool can be easily piped to other commands like `zq`, e.g., ``` -zed query -f zng 'from logs' | zq -f table 'count() by field' - +zed query -f bsup 'from logs' | zq -f table 'count() by field' - ``` Of course, it's even more efficient to run the query inside of the pool traversal like this: diff --git a/docs/commands/zq.md b/docs/commands/zq.md index 46f5794064..ff10c0c9e8 100644 --- a/docs/commands/zq.md +++ b/docs/commands/zq.md @@ -196,7 +196,7 @@ The output format defaults to either ZSON or ZNG and may be specified with the `-f` option. Since ZSON is a common format choice, the `-z` flag is a shortcut for -`-f zson`. Also, `-Z` is a shortcut for `-f zson` with `-pretty 4` as +`-f jsup`. Also, `-Z` is a shortcut for `-f jsup` with `-pretty 4` as [described below](#pretty-printing). And since JSON is another common format choice, the `-j` flag is a shortcut for @@ -212,11 +212,11 @@ in a scripted test that works fine on the command line but fails in CI), we felt that the design of having a uniform default had worse consequences: * If the default format were ZSON, it would be very easy to create pipelines and deploy to production systems that were accidentally using ZSON instead of -the much more efficient ZNG format because the `-f zng` had been mistakenly +the much more efficient ZNG format because the `-f bsup` had been mistakenly omitted from some command. The beauty of Zed is that all of this "just works" but it would otherwise perform poorly. * If the default format were ZNG, then users would be endlessly annoyed by -binary output to their terminal when forgetting to type `-f zson`. +binary output to their terminal when forgetting to type `-f jsup`. In practice, we have found that the output defaults "just do the right thing" almost all of the time. @@ -225,7 +225,7 @@ In practice, we have found that the output defaults ZSON and JSON text may be "pretty printed" with the `-pretty` option, which takes the number of spaces to use for indentation. As this is a common option, -the `-Z` option is a shortcut for `-f zson -pretty 4` and `-J` is a shortcut +the `-Z` option is a shortcut for `-f jsup -pretty 4` and `-J` is a shortcut for `-f json -pretty 4`. For example, @@ -247,7 +247,7 @@ produces ``` and ```mdtest-command -echo '{a:{b:1,c:[1,2]},d:"foo"}' | super -f zson -pretty 2 - +echo '{a:{b:1,c:[1,2]},d:"foo"}' | super -f jsup -pretty 2 - ``` produces ```mdtest-output @@ -278,9 +278,9 @@ or register schemas or "protos" with the downstream entities. In particular, ZNG data can simply be concatenated together, e.g., ```mdtest-command -super -f zng -c 'yield 1,[1,2,3]' > a.zng -super -f zng -c 'yield {s:"hello"},{s:"world"}' > b.zng -cat a.zng b.zng | super -z - +super -f bsup -c 'yield 1,[1,2,3]' > a.bsup +super -f bsup -c 'yield {s:"hello"},{s:"world"}' > b.bsup +cat a.bsup b.bsup | super -z - ``` produces ```mdtest-output @@ -291,8 +291,8 @@ produces ``` And while this ZSON output is human readable, the ZNG files are binary, e.g., ```mdtest-command -super -f zng -c 'yield 1,[1,2,3]' > a.zng -hexdump -C a.zng +super -f bsup -c 'yield 1,[1,2,3]' > a.bsup +hexdump -C a.bsup ``` produces ```mdtest-output @@ -441,9 +441,9 @@ it's rare to request it explicitly via `-f`. However, since it's possible for the `lake` format is useful to reverse this. For example, imagine you'd executed a [meta-query](zed.md#meta-queries) via -`zed query -Z "from :pools"` and saved the output in this file `pools.zson`. +`zed query -Z "from :pools"` and saved the output in this file `pools.jsup`. -```mdtest-input pools.zson +```mdtest-input pools.jsup { ts: 2024-07-19T19:28:22.893089Z, name: "MyPool", @@ -465,7 +465,7 @@ Using `zq -f lake`, this can be rendered in the same pretty-printed form as it would have originally appeared in the output of `zed ls`, e.g., ```mdtest-command -super -f lake pools.zson +super -f lake pools.jsup ``` produces ```mdtest-output @@ -691,9 +691,9 @@ where we used a semi-structured Zeek "conn" log from the `zeek-default` director It is easy to convert the Zeek logs to a local ZNG file using `zq`'s built-in [`get` operator](../language/operators/get.md): ``` -super -o conn.zng -c 'get https://raw.githubusercontent.com/brimdata/zed-sample-data/main/zeek-default/conn.log.gz' +super -o conn.bsup -c 'get https://raw.githubusercontent.com/brimdata/zed-sample-data/main/zeek-default/conn.log.gz' ``` -This creates a new file `conn.zng` from the Zeek log file fetched from GitHub. +This creates a new file `conn.bsup` from the Zeek log file fetched from GitHub. Note that this data is a gzip'd file in the Zeek format and `zq`'s auto-detector figures out both that it is gzip'd and that the uncompressed format is Zeek. @@ -701,7 +701,7 @@ There's no need to specify flags for this. Next, a JSON file can be converted from ZNG using: ``` -super -f json conn.zng > conn.json +super -f json conn.bsup > conn.json ``` Note here that we lose information in this conversion because the rich data types of Zed (that were [translated from the Zeek format](../integrations/zeek/data-type-compatibility.md)) are lost. @@ -720,10 +720,10 @@ loading the JSON into SQLite.) Note the resulting file sizes: ``` -% du -h conn.json conn.db conn.zng +% du -h conn.json conn.db conn.bsup 416M conn.json 192M conn.db - 38M conn.zng + 38M conn.bsup ``` Much of the performance of ZNG derives from an efficient, parallelizable structure where frames of data are compressed @@ -750,14 +750,14 @@ The command lines for the `count` test were: ``` jq -s length conn.json sqlite3 conn.db 'select count(*) from conn' -super -c 'count()' conn.zng +super -c 'count()' conn.bsup super -c 'count()' conn.json ``` The command lines for the `search` test were: ``` jq 'select(.id.orig_h=="10.47.23.5")' conn.json sqlite3 conn.db 'select * from conn where json_extract(id, "$.orig_h")=="10.47.23.5"' -super -c 'id.orig_h==10.47.23.5' conn.zng +super -c 'id.orig_h==10.47.23.5' conn.bsup super -c 'id.orig_h==10.47.23.5' conn.json ``` Here, we look for an IP address (10.47.23.5) in a specific @@ -770,7 +770,7 @@ The command lines for the `agg` test were: ``` jq -n -f agg.jq conn.json sqlite3 conn.db 'select sum(orig_bytes),json_extract(id, "$.orig_h") as orig_h from conn group by orig_h' -super -c "sum(orig_bytes) by id.orig_h" conn.zng +super -c "sum(orig_bytes) by id.orig_h" conn.bsup super -c "sum(orig_bytes) by id.orig_h" conn.json ``` where the `agg.jq` script is: diff --git a/docs/formats/vng.md b/docs/formats/vng.md index 113b31f1a9..67ba9d666c 100644 --- a/docs/formats/vng.md +++ b/docs/formats/vng.md @@ -381,7 +381,7 @@ Start with this [Super JSON](jsup.md)): To convert to VNG format: ``` -super -f vng hello.jsup > hello.vng +super -f csup hello.jsup > hello.csup ``` Segments in the VNG format would be laid out like this: diff --git a/docs/integrations/zeek/shaping-zeek-json.md b/docs/integrations/zeek/shaping-zeek-json.md index f5065fb3e9..efb8a70b37 100644 --- a/docs/integrations/zeek/shaping-zeek-json.md +++ b/docs/integrations/zeek/shaping-zeek-json.md @@ -323,7 +323,7 @@ output them all in a single binary [ZNG](../../formats/zng.md) file as follows: ``` -super -I shaper.zed *.log > /tmp/all.zng +super -I shaper.zed *.log > /tmp/all.bsup ``` If you wish to apply the shaper and then perform additional diff --git a/docs/lake/format.md b/docs/lake/format.md index 4a95e711ae..faee43f4b6 100644 --- a/docs/lake/format.md +++ b/docs/lake/format.md @@ -92,9 +92,9 @@ Immutable objects are named as follows: |object type|name| |-----------|----| -|vector data|`/data/.vng`| -|sequence data|`/data/.zng`| -|sequence seek index|`/data/-seek.zng`| +|vector data|`/data/.csup`| +|sequence data|`/data/.bsup`| +|sequence seek index|`/data/-seek.bsup`| `` is the KSUID of the data object. @@ -158,7 +158,7 @@ adding a commit object to a pool changes nothing until a branch pointer is mutated to point at that object. Each atomic journal commit object is a ZNG file numbered 1 to the end of journal (HEAD), -e.g., `1.zng`, `2.zng`, etc., each number corresponding to a journal ID. +e.g., `1.bsup`, `2.bsup`, etc., each number corresponding to a journal ID. The 0 value is reserved as the null journal ID. The journal's TAIL begins at 1 and is increased as journal entries are purged. Entries are added at the HEAD and removed from the TAIL. @@ -249,23 +249,23 @@ do not overlap. This is just the basic LSM algorithm at work. ``` / - lake.zng + lake.bsup pools/ HEAD TAIL - 1.zng - 2.zng + 1.bsup + 2.bsup ... / branches/ HEAD TAIL - 1.zng - 2.zng + 1.bsup + 2.bsup ... commits/ - .zng - .zng + .bsup + .bsup ... data/ .{zng,vng} diff --git a/docs/language/operators/from.md b/docs/language/operators/from.md index 718001a11c..3f203ca53b 100644 --- a/docs/language/operators/from.md +++ b/docs/language/operators/from.md @@ -101,9 +101,9 @@ coinflips@trial numbers@main ``` -The following file `hello.zson` is also used. +The following file `hello.jsup` is also used. -```mdtest-input hello.zson +```mdtest-input hello.jsup {greeting:"hello world!"} ``` @@ -112,7 +112,7 @@ The following file `hello.zson` is also used. _Source structured data from a local file_ ```mdtest-command -super -z -c 'file hello.zson | yield greeting' +super -z -c 'file hello.jsup | yield greeting' ``` => ```mdtest-output @@ -121,7 +121,7 @@ super -z -c 'file hello.zson | yield greeting' _Source data from a local file, but in line format_ ```mdtest-command -super -z -c 'file hello.zson format line' +super -z -c 'file hello.jsup format line' ``` => ```mdtest-output diff --git a/docs/language/ztests/language-directed-acyclic-flow-graphs-1.yaml b/docs/language/ztests/language-directed-acyclic-flow-graphs-1.yaml index 72b333b488..c090f24385 100644 --- a/docs/language/ztests/language-directed-acyclic-flow-graphs-1.yaml +++ b/docs/language/ztests/language-directed-acyclic-flow-graphs-1.yaml @@ -23,11 +23,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q PoolOne - super db load -q -use PoolOne fruit.zson + super db load -q -use PoolOne fruit.jsup super db query -z -I split.spq inputs: - - name: fruit.zson + - name: fruit.jsup data: | {ts:2018-03-24T17:15:21Z,name:"apple",color:"red"} {ts:2018-03-24T17:16:55Z,name:"banana",color:"yellow"} diff --git a/docs/language/ztests/language-directed-acyclic-flow-graphs-2.yaml b/docs/language/ztests/language-directed-acyclic-flow-graphs-2.yaml index 58ee54b2a9..10fd70e625 100644 --- a/docs/language/ztests/language-directed-acyclic-flow-graphs-2.yaml +++ b/docs/language/ztests/language-directed-acyclic-flow-graphs-2.yaml @@ -23,18 +23,18 @@ script: | super db init -q super db create -q -orderby color PoolOne super db create -q -orderby price PoolTwo - super db load -q -use PoolOne fruit.zson - super db load -q -use PoolTwo prices.zson + super db load -q -use PoolOne fruit.jsup + super db load -q -use PoolTwo prices.jsup super db query -z -I join.spq inputs: - - name: fruit.zson + - name: fruit.jsup data: | {key:"apple",color:"red"} {key:"banana",color:"yellow"} {key:"avocado",color:"green"} {key:"strawberry",color:"red"} - - name: prices.zson + - name: prices.jsup data: | {key:"apple",price:1.5} {key:"banana",price:2.1} diff --git a/docs/language/ztests/language-directed-acyclic-flow-graphs-3.yaml b/docs/language/ztests/language-directed-acyclic-flow-graphs-3.yaml index a627eb93b2..4181bfe787 100644 --- a/docs/language/ztests/language-directed-acyclic-flow-graphs-3.yaml +++ b/docs/language/ztests/language-directed-acyclic-flow-graphs-3.yaml @@ -22,11 +22,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q -orderby name fruit - super db load -q -use fruit fruit.zson + super db load -q -use fruit fruit.jsup super db query -z -I switch.spq inputs: - - name: fruit.zson + - name: fruit.jsup data: | {name:"apple",color:"red",price:1.5} {name:"banana",color:"yellow",price:2.1} diff --git a/docs/tutorials/github1.zng b/docs/tutorials/github1.bsup similarity index 100% rename from docs/tutorials/github1.zng rename to docs/tutorials/github1.bsup diff --git a/docs/tutorials/github2.zng b/docs/tutorials/github2.bsup similarity index 100% rename from docs/tutorials/github2.zng rename to docs/tutorials/github2.bsup diff --git a/docs/tutorials/prs.zng b/docs/tutorials/prs.bsup similarity index 100% rename from docs/tutorials/prs.zng rename to docs/tutorials/prs.bsup diff --git a/docs/tutorials/zed.md b/docs/tutorials/zed.md index f7f169d08c..ca6876397c 100644 --- a/docs/tutorials/zed.md +++ b/docs/tutorials/zed.md @@ -68,10 +68,10 @@ prs key created_at order desc ``` Let's add some pull request data I've prefetched from the GitHub API -[here](github1.zng): +[here](github1.bsup): ```bash -$ zed load -use prs github1.zng +$ zed load -use prs github1.bsup ``` => ``` @@ -140,10 +140,10 @@ That's not a lot of data, so let's add some more. ## Adding additional data Additional data can be added to our pool by running `zed load` on our second -[data set](github2.zng): +[data set](github2.bsup): ```bash -$ zed load github2.zng +$ zed load github2.bsup ``` Running our `min(created_at), max(created_at)` query, we'll see that we now have diff --git a/docs/tutorials/zq.md b/docs/tutorials/zq.md index 75294ac63d..d7c0a3a9a2 100644 --- a/docs/tutorials/zq.md +++ b/docs/tutorials/zq.md @@ -819,12 +819,12 @@ First, let's get rid of the outer array and generate elements of an array as a sequence of Zed records that have been fused and let's filter out the empty records: ``` -super -c 'over this | len(this) != 0 | fuse' prs.json > prs1.zng +super -c 'over this | len(this) != 0 | fuse' prs.json > prs1.bsup ``` We can check that worked with count: ``` -super -z -c 'count()' prs1.zng -super -z -c 'sample | count()' prs1.zng +super -z -c 'count()' prs1.bsup +super -z -c 'sample | count()' prs1.bsup ``` produces ``` @@ -836,7 +836,7 @@ and exactly one shape since the data was fused. Now, let's drop the fields we aren't interested in: ``` -super -c 'drop head,base,_links' prs1.zng > prs2.zng +super -c 'drop head,base,_links' prs1.bsup > prs2.bsup ``` Finally, let's clean up those dates. To track down all the candidates, we can run this Zed to group field names by their type and limit the output @@ -846,7 +846,7 @@ super -z -c ' over this | kind(value)=="primitive" | fields:=union(key[0]) by type:=typeof(value) -' prs2.zng +' prs2.bsup ``` which gives ``` @@ -866,7 +866,7 @@ to be * `updated_at`. You can do a quick check of the theory by running... ``` -super -z -c '{closed_at,merged_at,created_at,updated_at}' prs2.zng +super -z -c '{closed_at,merged_at,created_at,updated_at}' prs2.bsup ``` and you will get strings that are all ISO dates: ``` @@ -876,14 +876,14 @@ and you will get strings that are all ISO dates: ``` To fix those strings, we simply transform the fields in place using the (implied) [put operator](../language/operators/put.md) and redirect the final -output the ZNG file `prs.zng`: +output the ZNG file `prs.bsup`: ``` super -c ' closed_at:=time(closed_at), merged_at:=time(merged_at), created_at:=time(created_at), updated_at:=time(updated_at) -' prs2.zng > prs.zng +' prs2.bsup > prs.bsup ``` We can check the result with our type analysis: ```mdtest-command dir=docs/tutorials @@ -892,7 +892,7 @@ super -z -c ' | kind(value)=="primitive" | fields:=union(key[0]) by type:=typeof(value) | sort type -' prs.zng +' prs.bsup ``` which now gives: ```mdtest-output @@ -928,13 +928,13 @@ over this // traverse the array of objects We can then put this in a file, called say `transform.zed`, and use the `-I` argument to run all the transformations in one fell swoop: ``` -super -I transform.zed prs.json > prs.zng +super -I transform.zed prs.json > prs.bsup ``` ## Running Analytics Now that we've cleaned up our data, we can reliably and easily run analytics -on the finalized ZNG file `prs.zng`. +on the finalized ZNG file `prs.bsup`. Zed gives us the best of both worlds of JSON and relational tables: we have the structure and clarity of the relational model while retaining the flexibility @@ -944,7 +944,7 @@ to put your clean data into all the right places. Let's start with something simple. How about we output a "PR Report" listing the title of each PR along with its PR number and creation date: ```mdtest-command dir=docs/tutorials -super -f table -c '{DATE:created_at,NUMBER:f"PR #{number}",TITLE:title}' prs.zng +super -f table -c '{DATE:created_at,NUMBER:f"PR #{number}",TITLE:title}' prs.bsup ``` and you'll see this output... ```mdtest-output head @@ -966,7 +966,7 @@ chronologically. This command retrieves the last five PRs in the dataset: super -f table -c ' tail 5 | {DATE:created_at,"NUMBER":f"PR #{number}",TITLE:title} -' prs.zng +' prs.bsup ``` and the output is: ```mdtest-output @@ -981,7 +981,7 @@ DATE NUMBER TITLE How about some aggregations? We can count the number of PRs and sort by the count highest first: ```mdtest-command dir=docs/tutorials -super -z -c "count() by user:=user.login | sort count desc" prs.zng +super -z -c "count() by user:=user.login | sort count desc" prs.bsup ``` produces ```mdtest-output @@ -995,7 +995,7 @@ How about getting a list of all of the reviewers? To do this, we need to traverse the records in the `requested_reviewers` array and collect up the login field from each record: ```mdtest-command dir=docs/tutorials -super -z -c 'over requested_reviewers | collect(login)' prs.zng +super -z -c 'over requested_reviewers | collect(login)' prs.bsup ``` Oops, this gives us an array of the reviewer logins with repetitions since [collect](../language/aggregates/collect.md) @@ -1010,7 +1010,7 @@ computes the set-wise union of its input and produces a Zed `set` type as its output. In this case, the output is a set of strings, written `|[string]|` in the Zed language. For example: ```mdtest-command dir=docs/tutorials -super -z -c 'over requested_reviewers | reviewers:=union(login)' prs.zng +super -z -c 'over requested_reviewers | reviewers:=union(login)' prs.bsup ``` produces ```mdtest-output @@ -1030,7 +1030,7 @@ Instead of computing a set-union over all the reviewers across all PRs, we instead want to compute the set-union over the reviewers in each PR. We can do this as follows: ```mdtest-command dir=docs/tutorials -super -z -c 'over requested_reviewers => ( reviewers:=union(login) )' prs.zng +super -z -c 'over requested_reviewers => ( reviewers:=union(login) )' prs.bsup ``` which produces an output like this: ```mdtest-output head @@ -1058,7 +1058,7 @@ super -z -c ' | {user,reviewers} ) | sort user,len(reviewers) -' prs.zng +' prs.bsup ``` which gives us ```mdtest-output head @@ -1082,7 +1082,7 @@ super -Z -c ' ) | groups:=union(reviewers) by user | sort user,len(groups) -' prs.zng +' prs.bsup ``` and we get ```mdtest-output @@ -1206,7 +1206,7 @@ super -z -c ' ) | avg_reviewers:=avg(len(reviewers)) by user | sort avg_reviewers -' prs.zng +' prs.bsup ``` which produces ```mdtest-output @@ -1227,7 +1227,7 @@ super -j -c ' ) | groups:=union(reviewers) by user | sort user,len(groups) -' prs.zng +' prs.bsup ``` produces ```mdtest-output diff --git a/lake/api/remote.go b/lake/api/remote.go index e1517fd9e4..d2e5a61856 100644 --- a/lake/api/remote.go +++ b/lake/api/remote.go @@ -110,7 +110,7 @@ func (r *remote) Load(ctx context.Context, _ *super.Context, poolID ksuid.KSUID, } pw.CloseWithError(err) }() - res, err := r.conn.Load(ctx, poolID, branchName, api.MediaTypeZNG, pr, commit) + res, err := r.conn.Load(ctx, poolID, branchName, api.MediaTypeBSUP, pr, commit) return res.Commit, err } diff --git a/lake/commits/store.go b/lake/commits/store.go index f14a2949e5..33e757cc15 100644 --- a/lake/commits/store.go +++ b/lake/commits/store.go @@ -82,7 +82,7 @@ func (s *Store) Get(ctx context.Context, commit ksuid.KSUID) (*Object, error) { } func (s *Store) pathOf(commit ksuid.KSUID) *storage.URI { - return s.path.JoinPath(commit.String() + ".zng") + return s.path.JoinPath(commit.String() + ".bsup") } func (s *Store) Put(ctx context.Context, o *Object) error { @@ -178,7 +178,7 @@ func (s *Store) putSnapshot(ctx context.Context, commit ksuid.KSUID, snap *Snaps } func (s *Store) snapshotPathOf(commit ksuid.KSUID) *storage.URI { - return s.path.JoinPath(commit.String() + ".snap.zng") + return s.path.JoinPath(commit.String() + ".snap.bsup") } // Path return the entire path from the commit object to the root diff --git a/lake/data/object.go b/lake/data/object.go index 42df6c0f4d..4b04eb2d7b 100644 --- a/lake/data/object.go +++ b/lake/data/object.go @@ -48,7 +48,7 @@ func (k FileKind) Description() string { // eliminate round-trips, especially when you are ready sub-ranges of // cached data files! -var fileRegex = regexp.MustCompile(`([0-9A-Za-z]{27}-(data|meta)).zng$`) +var fileRegex = regexp.MustCompile(`([0-9A-Za-z]{27}-(data|meta)).bsup$`) // XXX this won't work right until we integrate segID func FileMatch(s string) (kind FileKind, id ksuid.KSUID, ok bool) { @@ -122,7 +122,7 @@ func (o Object) SequenceURI(path *storage.URI) *storage.URI { } func SequenceURI(path *storage.URI, id ksuid.KSUID) *storage.URI { - return path.JoinPath(fmt.Sprintf("%s.zng", id)) + return path.JoinPath(fmt.Sprintf("%s.bsup", id)) } func (o Object) SeekIndexURI(path *storage.URI) *storage.URI { @@ -130,7 +130,7 @@ func (o Object) SeekIndexURI(path *storage.URI) *storage.URI { } func SeekIndexURI(path *storage.URI, id ksuid.KSUID) *storage.URI { - return path.JoinPath(fmt.Sprintf("%s-seek.zng", id)) + return path.JoinPath(fmt.Sprintf("%s-seek.bsup", id)) } func (o Object) VectorURI(path *storage.URI) *storage.URI { @@ -138,7 +138,7 @@ func (o Object) VectorURI(path *storage.URI) *storage.URI { } func VectorURI(path *storage.URI, id ksuid.KSUID) *storage.URI { - return path.JoinPath(fmt.Sprintf("%s.vng", id)) + return path.JoinPath(fmt.Sprintf("%s.csup", id)) } // Remove deletes the row object and its seek index. diff --git a/lake/journal/queue.go b/lake/journal/queue.go index 1c38a591dc..8d82a99611 100644 --- a/lake/journal/queue.go +++ b/lake/journal/queue.go @@ -16,7 +16,7 @@ import ( "github.com/brimdata/super/zio/zngio" ) -const ext = "zng" +const ext = "bsup" var ( ErrEmpty = errors.New("empty log") diff --git a/lake/root.go b/lake/root.go index 8cb6de53db..b2583e2939 100644 --- a/lake/root.go +++ b/lake/root.go @@ -26,9 +26,9 @@ import ( ) const ( - Version = 3 + Version = 4 PoolsTag = "pools" - LakeMagicFile = "lake.zng" + LakeMagicFile = "lake.bsup" LakeMagicString = "ZED LAKE" ) diff --git a/lake/testdata/babble-mergelargestchunk1.zson b/lake/testdata/babble-mergelargestchunk1.jsup similarity index 100% rename from lake/testdata/babble-mergelargestchunk1.zson rename to lake/testdata/babble-mergelargestchunk1.jsup diff --git a/lake/testdata/babble-mergelargestchunk2.zson b/lake/testdata/babble-mergelargestchunk2.jsup similarity index 100% rename from lake/testdata/babble-mergelargestchunk2.zson rename to lake/testdata/babble-mergelargestchunk2.jsup diff --git a/lake/testdata/babble-norm-shuf-1.zson b/lake/testdata/babble-norm-shuf-1.jsup similarity index 100% rename from lake/testdata/babble-norm-shuf-1.zson rename to lake/testdata/babble-norm-shuf-1.jsup diff --git a/lake/testdata/babble-norm-shuf-2.zson b/lake/testdata/babble-norm-shuf-2.jsup similarity index 100% rename from lake/testdata/babble-norm-shuf-2.zson rename to lake/testdata/babble-norm-shuf-2.jsup diff --git a/lake/testdata/babble-norm-shuf-3.zson b/lake/testdata/babble-norm-shuf-3.jsup similarity index 100% rename from lake/testdata/babble-norm-shuf-3.zson rename to lake/testdata/babble-norm-shuf-3.jsup diff --git a/lake/testdata/babble-norm-shuf-4.zson b/lake/testdata/babble-norm-shuf-4.jsup similarity index 100% rename from lake/testdata/babble-norm-shuf-4.zson rename to lake/testdata/babble-norm-shuf-4.jsup diff --git a/lake/testdata/babble-norm-shuf-5.zson b/lake/testdata/babble-norm-shuf-5.jsup similarity index 100% rename from lake/testdata/babble-norm-shuf-5.zson rename to lake/testdata/babble-norm-shuf-5.jsup diff --git a/lake/testdata/babble-norm.zson b/lake/testdata/babble-norm.jsup similarity index 100% rename from lake/testdata/babble-norm.zson rename to lake/testdata/babble-norm.jsup diff --git a/lake/testdata/group-by-ts.zson b/lake/testdata/group-by-ts.jsup similarity index 100% rename from lake/testdata/group-by-ts.zson rename to lake/testdata/group-by-ts.jsup diff --git a/lake/ztests/appmeta.yaml b/lake/ztests/appmeta.yaml index 78eb0eccc2..56c1d347e4 100644 --- a/lake/ztests/appmeta.yaml +++ b/lake/ztests/appmeta.yaml @@ -2,14 +2,14 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q logs - super db load -q -use logs -meta '"original"' babble.zson - super db load -q -use logs -meta '"normalized-v1"' babble.zson - super db load -q -use logs -meta '"normalized-v2"' babble.zson + super db load -q -use logs -meta '"original"' babble.jsup + super db load -q -use logs -meta '"normalized-v1"' babble.jsup + super db load -q -use logs -meta '"normalized-v2"' babble.jsup super db query "from logs@main:log | grep(normalized*, meta)| sort date | cut meta" | super -z - inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stdout diff --git a/lake/ztests/checkout-dash-p.yaml b/lake/ztests/checkout-dash-p.yaml index 2eda41f116..4acddd4844 100644 --- a/lake/ztests/checkout-dash-p.yaml +++ b/lake/ztests/checkout-dash-p.yaml @@ -3,18 +3,18 @@ script: | super db init -q super db create -q POOL super db use -q POOL - super db load -q a.zson + super db load -q a.jsup super db branch -q child super db use -q @child - super db load -q b.zson + super db load -q b.jsup super db use -q POOL super db query -z "*" inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:1} diff --git a/lake/ztests/commit.yaml b/lake/ztests/commit.yaml index 9415b4fce8..5339e70897 100644 --- a/lake/ztests/commit.yaml +++ b/lake/ztests/commit.yaml @@ -2,10 +2,10 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q test - super db load -use test in.zson + super db load -use test in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {x:1} diff --git a/lake/ztests/consecutive-ts.yaml b/lake/ztests/consecutive-ts.yaml index 587fc669a8..91db2591f0 100644 --- a/lake/ztests/consecutive-ts.yaml +++ b/lake/ztests/consecutive-ts.yaml @@ -2,11 +2,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q -seekstride 11B -orderby ts:desc logs - super db load -use logs -q in.zson - super -z test/*/data/*-seek.zng + super db load -use logs -q in.jsup + super -z test/*/data/*-seek.bsup inputs: - - name: in.zson + - name: in.jsup data: | {ts:1970-01-01T00:00:00Z} {ts:1970-01-01T00:00:02Z} diff --git a/lake/ztests/cross-pool-join.yaml b/lake/ztests/cross-pool-join.yaml index 6bc3755ca3..d3e4cac8ac 100644 --- a/lake/ztests/cross-pool-join.yaml +++ b/lake/ztests/cross-pool-join.yaml @@ -3,12 +3,12 @@ script: | super db init -q super db create -q fruit super db create -q person - super db load -q -use fruit fruit.zson - super db load -q -use person person.zson + super db load -q -use fruit fruit.jsup + super db load -q -use person person.jsup super db query -z -I join.zed inputs: - - name: fruit.zson + - name: fruit.jsup data: | {name:"apple",color:"red",flavor:"tart"}(=fruit) {name:"banana",color:"yellow",flavor:"sweet"}(=fruit) @@ -16,7 +16,7 @@ inputs: {name:"dates",color:"brown",flavor:"sweet"}(=fruit) {name:"figs",color:"brown",flavor:"plain"}(=fruit) {name:"pomegranate",color:"red",flavor:"tart"}(=fruit) - - name: person.zson + - name: person.jsup data: | {name:"bob",likes:"tart",age:61}(=person) {name:"joe",likes:"sweet",age:14}(=person) diff --git a/lake/ztests/debug.yaml b/lake/ztests/debug.yaml index cc023a17b0..628d5c5594 100644 --- a/lake/ztests/debug.yaml +++ b/lake/ztests/debug.yaml @@ -1,4 +1,5 @@ script: | + export SUPER_DB_LAKE=test super db init -q super db create -use -q test echo '{x: "foo"}' | super db load -q - diff --git a/lake/ztests/delete-where-missing.yaml b/lake/ztests/delete-where-missing.yaml index cf1b72a66f..b0d2802af3 100644 --- a/lake/ztests/delete-where-missing.yaml +++ b/lake/ztests/delete-where-missing.yaml @@ -2,14 +2,14 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q test - super db load -q in.zson + super db load -q in.jsup ! super db delete -q -where 'uid==C3UeSqaSOFRReHD68' super db query -z 'count:=count()' super db delete -q -where 'uid=="C3UeSqaSOFRReHD68"' super db query -z 'count:=count()' inputs: - - name: in.zson + - name: in.jsup data: | {ts:0,uid:"C3UeSqaSOFRReHD68"} {ts:1,uid:null(string)} diff --git a/lake/ztests/delete.yaml b/lake/ztests/delete.yaml index 53a7c52dce..722ea78a33 100644 --- a/lake/ztests/delete.yaml +++ b/lake/ztests/delete.yaml @@ -2,9 +2,9 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q -orderby x:desc test - super db load -q 1.zson + super db load -q 1.jsup id=$(super db query -f text "from test@main:objects | cut id:=ksuid(id) | tail 1") - super db load -q 2.zson + super db load -q 2.jsup super db query -z "*" echo === | tee /dev/stderr super db delete -q $id @@ -13,9 +13,9 @@ script: | ! super db delete -q 27aaaaaaaaaaaaaaaaaaaaaaaaa inputs: - - name: 1.zson + - name: 1.jsup data: "{x:1}" - - name: 2.zson + - name: 2.jsup data: "{x:2}" outputs: diff --git a/lake/ztests/deterministic-merge.yaml b/lake/ztests/deterministic-merge.yaml index 7f1b953c19..88f5bdb74f 100644 --- a/lake/ztests/deterministic-merge.yaml +++ b/lake/ztests/deterministic-merge.yaml @@ -2,12 +2,12 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q -S 32B -orderby ts:asc logs - super db load -q -use logs in.zson - super db query -z "from logs | *" > 1.zson - super db query -z "from logs | *" > 2.zson + super db load -q -use logs in.jsup + super db query -z "from logs | *" > 1.jsup + super db query -z "from logs | *" > 2.jsup inputs: - - name: in.zson + - name: in.jsup data: | {ts:1970-01-01T00:00:01Z,s:"Potamogalidae-precommissure",v:51} {ts:1970-01-01T00:00:02Z,s:"Galchic-unwheeled",v:51} @@ -24,8 +24,8 @@ inputs: {ts:1970-01-01T00:00:13Z,s:"crosshaul-capersome",v:109} outputs: - - name: 1.zson - data: &1_zson | + - name: 1.jsup + data: &1_jsup | {ts:1970-01-01T00:00:01Z,s:"Potamogalidae-precommissure",v:51} {ts:1970-01-01T00:00:02Z,s:"Galchic-unwheeled",v:51} {ts:1970-01-01T00:00:03Z,s:"protohydrogen-plesiomorphism",v:320} @@ -39,5 +39,5 @@ outputs: {ts:1970-01-01T00:00:11Z,s:"psalis-Guarnieri",v:456} {ts:1970-01-01T00:00:12Z,s:"subarea-preoffense",v:373} {ts:1970-01-01T00:00:13Z,s:"crosshaul-capersome",v:109} - - name: 2.zson - data: *1_zson + - name: 2.jsup + data: *1_jsup diff --git a/lake/ztests/dirs.yaml b/lake/ztests/dirs.yaml index b3493c3f26..5f1f03b874 100644 --- a/lake/ztests/dirs.yaml +++ b/lake/ztests/dirs.yaml @@ -2,14 +2,14 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q logs - super db load -q -use logs babble.zson + super db load -q -use logs babble.jsup super db query "from logs@main:objects" | super -z -c "{min,max}" - super db drop -q -f logs ! super db query "from logs@main:objects" inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stdout diff --git a/lake/ztests/drop.yaml b/lake/ztests/drop.yaml index 32d1814683..dc08da5553 100644 --- a/lake/ztests/drop.yaml +++ b/lake/ztests/drop.yaml @@ -6,8 +6,8 @@ script: | ! super db log -use logs inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stderr diff --git a/lake/ztests/group-by-func.yaml b/lake/ztests/group-by-func.yaml index f767d20640..9e1c9d9733 100644 --- a/lake/ztests/group-by-func.yaml +++ b/lake/ztests/group-by-func.yaml @@ -2,12 +2,12 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q -orderby s:asc data - head -2 in.zson | super db load -q -use data - - tail -3 in.zson | super db load -q -use data - + head -2 in.jsup | super db load -q -use data - + tail -3 in.jsup | super db load -q -use data - super db query -z 'from data | union(s) by len(s) | sort this' inputs: - - name: in.zson + - name: in.jsup data: | {s:"a"} {s:"ab"} diff --git a/lake/ztests/group-by-ts.yaml b/lake/ztests/group-by-ts.yaml index 6a07901804..4148182d61 100644 --- a/lake/ztests/group-by-ts.yaml +++ b/lake/ztests/group-by-ts.yaml @@ -1,11 +1,11 @@ script: | export SUPER_DB_LAKE=test super db init -q - # group-by-ts.zson contains records over two days, mapping to two partitions, and + # group-by-ts.jsup contains records over two days, mapping to two partitions, and # the small target size here causes each partition to have several segments. super db create -q -S 256B logs # causes parition to have several chunk files. - super db load -q -use logs group-by-ts.zson + super db load -q -use logs group-by-ts.jsup echo === super db query -z 'from logs | head 1' echo === @@ -18,8 +18,8 @@ script: | super db query -z 'from logs | count:=count() by every(3600s), g | sort ts, g' inputs: - - name: group-by-ts.zson - source: ../testdata/group-by-ts.zson + - name: group-by-ts.jsup + source: ../testdata/group-by-ts.jsup outputs: - name: stdout diff --git a/lake/ztests/import-check.yaml b/lake/ztests/import-check.yaml index 9c7b9c4aff..a95d55d0e5 100644 --- a/lake/ztests/import-check.yaml +++ b/lake/ztests/import-check.yaml @@ -2,10 +2,10 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q logs - ! super db load -q -use logs missingfield.zson + ! super db load -q -use logs missingfield.jsup inputs: - - name: missingfield.zson + - name: missingfield.jsup data: | {a:"a",b:"b"} (=foo) {a:"a"} (foo) diff --git a/lake/ztests/issue-2784.yaml b/lake/ztests/issue-2784.yaml index 21132f4067..6e2795bb3b 100644 --- a/lake/ztests/issue-2784.yaml +++ b/lake/ztests/issue-2784.yaml @@ -2,15 +2,15 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q test - super db load -q -use test a.zson - super db load -q -use test b.zson + super db load -q -use test a.jsup + super db load -q -use test b.jsup super db query -z "from test@main:objects | sort min | {min,max}" inputs: - - name: a.zson + - name: a.jsup data: | {ts:1} - - name: b.zson + - name: b.jsup data: | {ts:2} diff --git a/lake/ztests/lake-version.yaml b/lake/ztests/lake-version.yaml index b79590c9e8..48be7ee0f9 100644 --- a/lake/ztests/lake-version.yaml +++ b/lake/ztests/lake-version.yaml @@ -2,11 +2,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q test - mv test/lake.zng lake-orig.zng - super -o test/lake.zng -c 'version:=1' lake-orig.zng + mv test/lake.bsup lake-orig.bsup + super -o test/lake.bsup -c 'version:=1' lake-orig.bsup ! super db serve outputs: - name: stderr data: | - unsupported lake version: found version 1 while expecting 3 + unsupported lake version: found version 1 while expecting 4 diff --git a/lake/ztests/log.yaml b/lake/ztests/log.yaml index ff3ac95f35..bf3175c41a 100644 --- a/lake/ztests/log.yaml +++ b/lake/ztests/log.yaml @@ -2,15 +2,15 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q test - super db load -q -user testuser 1.zson - super db load -q -user testuser 2.zson + super db load -q -user testuser 1.jsup + super db load -q -user testuser 2.jsup super db log inputs: - - name: 1.zson + - name: 1.jsup data: | {x:1} - - name: 2.zson + - name: 2.jsup data: | {x:2} diff --git a/lake/ztests/ls-segments.yaml b/lake/ztests/ls-segments.yaml index e75dadff91..e47399647d 100644 --- a/lake/ztests/ls-segments.yaml +++ b/lake/ztests/ls-segments.yaml @@ -2,15 +2,15 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q test - super db load -q -use test 1.zson - super db load -q -use test 2.zson + super db load -q -use test 1.jsup + super db load -q -use test 2.jsup super db query -f lake "from test@main:objects" inputs: - - name: 1.zson + - name: 1.jsup data: | {x:1} - - name: 2.zson + - name: 2.jsup data: | {x:2} diff --git a/lake/ztests/ls.yaml b/lake/ztests/ls.yaml index a90cc18039..4398098e4d 100644 --- a/lake/ztests/ls.yaml +++ b/lake/ztests/ls.yaml @@ -2,14 +2,14 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q logs - super db load -q -use logs babble.zson - super db ls -f zng | super -Z -c "drop id,ts" - + super db load -q -use logs babble.jsup + super db ls -f bsup | super -Z -c "drop id,ts" - echo === super db query -Z "from logs@main:objects | drop id" inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup #XXX this is fixed # The keys field should be labeled with (field.)Path. diff --git a/lake/ztests/match-missing-pool-key.yaml b/lake/ztests/match-missing-pool-key.yaml index a36046742e..7a04bdcf1c 100644 --- a/lake/ztests/match-missing-pool-key.yaml +++ b/lake/ztests/match-missing-pool-key.yaml @@ -4,11 +4,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q -orderby k tmp - super db load -q -use tmp in.zson + super db load -q -use tmp in.jsup super db query -z "from tmp | !has(k)" inputs: - - name: in.zson + - name: in.jsup data: | {k:0,v:"zero"} {v:"this one missing"} diff --git a/lake/ztests/merge-branch.yaml b/lake/ztests/merge-branch.yaml index 9fbae16a6f..1571474baa 100644 --- a/lake/ztests/merge-branch.yaml +++ b/lake/ztests/merge-branch.yaml @@ -2,10 +2,10 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q -orderby k POOL - super db load -q -message "initial load of a.zson into main" a.zson + super db load -q -message "initial load of a.jsup into main" a.jsup super db branch -q child super db use -q @child - super db load -q -message "initial load of b.zson into child" b.zson + super db load -q -message "initial load of b.jsup into child" b.jsup echo === main === super db query -z "from POOL" echo === child === @@ -16,23 +16,23 @@ script: | echo === main after merge === super db query -z "from POOL" echo === main after load c === - super db load -q -use POOL c.zson + super db load -q -use POOL c.jsup super db query -z "from POOL" echo === child after main load c === super db query -z "from POOL@child" echo === main after child load a and merge === - super db load -q a.zson + super db load -q a.jsup super db merge -q main super db query -z "from POOL" inputs: - - name: a.zson + - name: a.jsup data: | {k:0,a:1} - - name: b.zson + - name: b.jsup data: | {k:1,b:1} - - name: c.zson + - name: c.jsup data: | {k:2,c:1} diff --git a/lake/ztests/merge-by-addr.yaml b/lake/ztests/merge-by-addr.yaml index 343c835a04..9341ca3617 100644 --- a/lake/ztests/merge-by-addr.yaml +++ b/lake/ztests/merge-by-addr.yaml @@ -2,11 +2,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q -S 75B -orderby addr:asc logs - super db load -q -use logs in.zson + super db load -q -use logs in.jsup super db query -z 'from logs | cut addr' inputs: - - name: in.zson + - name: in.jsup data: | {ts:2018-03-24T17:16:15.624089Z,addr:10.128.0.241,uid:"CzJyWf4UbQbYGKPUKl"} {ts:2018-03-24T17:15:32.124366Z,addr:10.128.0.248,uid:"CzMQei2GoNVRxPPeGa"} diff --git a/lake/ztests/meta.yaml b/lake/ztests/meta.yaml index 08507af567..3e6a0f1166 100644 --- a/lake/ztests/meta.yaml +++ b/lake/ztests/meta.yaml @@ -3,19 +3,19 @@ script: | super db init -q super db create -q -orderby a:asc poolA super db create -q -orderby b:desc poolB - super db load -q -use poolA a.zson - super db load -q -use poolB b.zson + super db load -q -use poolA a.jsup + super db load -q -use poolB b.jsup super db query -Z 'from :pools | drop id | sort name | drop ts' echo === super db query -Z 'from poolA@main:objects | {nameof:nameof(this),...this} | drop id' super db query -Z 'from poolA:log | cut nameof(this) | drop ts' inputs: - - name: a.zson + - name: a.jsup data: | {a:1} {a:2} - - name: b.zson + - name: b.jsup data: | {b:3} {b:2} diff --git a/lake/ztests/null-pool-key.yaml b/lake/ztests/null-pool-key.yaml index c21abee595..61767e2f1c 100644 --- a/lake/ztests/null-pool-key.yaml +++ b/lake/ztests/null-pool-key.yaml @@ -4,12 +4,12 @@ script: | for o in asc desc; do echo // $o super db create -q -orderby k:$o $o - super db load -q -use $o in.zson + super db load -q -use $o in.jsup super db query -z "from $o | k >= 1 k <= 3" done inputs: - - name: in.zson + - name: in.jsup data: | {k:null(int64),v:"null"} {k:0,v:"zero"} diff --git a/lake/ztests/overlap.yaml b/lake/ztests/overlap.yaml index a0a234a7a5..93a9847d1d 100644 --- a/lake/ztests/overlap.yaml +++ b/lake/ztests/overlap.yaml @@ -2,17 +2,17 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q logs - super db load -q babble-split1.zson - super db load -q babble-split2.zson + super db load -q babble-split1.jsup + super db load -q babble-split2.jsup super db query -Z "from logs@main:objects | sort -r size | drop id" inputs: - - name: babble.zson - source: ../../testdata/babble.zson - - name: babble-split1.zson - source: ../../testdata/babble-split1.zson - - name: babble-split2.zson - source: ../../testdata/babble-split2.zson + - name: babble.jsup + source: ../../testdata/babble.jsup + - name: babble-split1.jsup + source: ../../testdata/babble-split1.jsup + - name: babble-split2.jsup + source: ../../testdata/babble-split2.jsup outputs: - name: stdout diff --git a/lake/ztests/quiet-cut.yaml b/lake/ztests/quiet-cut.yaml index 6cd193df03..6f3c587da1 100644 --- a/lake/ztests/quiet-cut.yaml +++ b/lake/ztests/quiet-cut.yaml @@ -2,11 +2,11 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q logs - super db load -q -use logs in.zson + super db load -q -use logs in.jsup super db query "from logs | cut notafield" inputs: - - name: in.zson + - name: in.jsup data: | {x:1} {x:2} diff --git a/lake/ztests/revert.yaml b/lake/ztests/revert.yaml index b626f61ad6..bdf20e7f4a 100644 --- a/lake/ztests/revert.yaml +++ b/lake/ztests/revert.yaml @@ -2,8 +2,8 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q test - a=$(super db load a.zson | head -1 | awk '{print $1}') - b=$(super db load b.zson | head -1 | awk '{print $1}') + a=$(super db load a.jsup | head -1 | awk '{print $1}') + b=$(super db load b.jsup | head -1 | awk '{print $1}') super db query -z "sort this" super db revert -q $a echo === @@ -13,10 +13,10 @@ script: | super db query -z "sort this" inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:1} diff --git a/lake/ztests/s3/rm.yaml b/lake/ztests/s3/rm.yaml index 42de4f7f1a..f054e8f49a 100644 --- a/lake/ztests/s3/rm.yaml +++ b/lake/ztests/s3/rm.yaml @@ -3,18 +3,18 @@ skip: issue 2540... need to delete by key range script: | mkdir logs source minio.sh - zed import -R logs -data s3://bucket/lake_test babble.zson - zed map -R logs -o count.zng "count()" + zed import -R logs -data s3://bucket/lake_test babble.jsup + zed map -R logs -o count.bsup "count()" echo === zed ls -R logs -ranges -l echo === - zed rm -R logs -ranges count.zng + zed rm -R logs -ranges count.bsup echo === - zed rm -R logs -ranges count.zng + zed rm -R logs -ranges count.bsup inputs: - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup - name: minio.sh source: ../../../testdata/minio.sh @@ -22,11 +22,11 @@ outputs: - name: stdout data: | === - [1587518620062237300-1587513611063914690]/count.zng - [1587513592062544400-1587508830068523240]/count.zng + [1587518620062237300-1587513611063914690]/count.bsup + [1587513592062544400-1587508830068523240]/count.bsup === - [1587518620062237300-1587513611063914690]/count.zng: removed - [1587513592062544400-1587508830068523240]/count.zng: removed + [1587518620062237300-1587513611063914690]/count.bsup: removed + [1587513592062544400-1587508830068523240]/count.bsup: removed === - [1587518620062237300-1587513611063914690]/count.zng: not found - [1587513592062544400-1587508830068523240]/count.zng: not found + [1587518620062237300-1587513611063914690]/count.bsup: not found + [1587513592062544400-1587508830068523240]/count.bsup: not found diff --git a/lake/ztests/s3/stat.yaml b/lake/ztests/s3/stat.yaml index 3021d8657d..d7ccce1eac 100644 --- a/lake/ztests/s3/stat.yaml +++ b/lake/ztests/s3/stat.yaml @@ -3,12 +3,12 @@ script: | export SUPER_DB_LAKE=s3://bucket/lake_test super db init -q super db create -q logs - super db load -q -use logs babble.zson + super db load -q -use logs babble.jsup super db query -Z "from logs@main:objects | drop id" inputs: - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup - name: minio.sh source: ../../../testdata/minio.sh diff --git a/lake/ztests/s3/zq.yaml b/lake/ztests/s3/zq.yaml index e6d1512006..3d444a5acf 100644 --- a/lake/ztests/s3/zq.yaml +++ b/lake/ztests/s3/zq.yaml @@ -3,12 +3,12 @@ script: | export SUPER_DB_LAKE=s3://bucket/lake_test super db init -q super db create -q logs - super db load -q -use logs babble.zson + super db load -q -use logs babble.jsup super db query -z "from logs | count()" inputs: - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup - name: minio.sh source: ../../../testdata/minio.sh diff --git a/lake/ztests/seek-index-null.yaml b/lake/ztests/seek-index-null.yaml index a1ebcd0289..9b8fafaa57 100644 --- a/lake/ztests/seek-index-null.yaml +++ b/lake/ztests/seek-index-null.yaml @@ -4,14 +4,14 @@ script: | for o in asc desc; do echo // $o | tee /dev/stderr super db create -q -seekstride 2KB -orderby ts:$o $o - super db load -q -use $o babble.zson null.zson + super db load -q -use $o babble.jsup null.jsup super db query -z -s -use $o "ts >= 2020-04-21T23:59:26.063Z and ts <= 2020-04-21T23:59:38.069Z" done inputs: - - name: babble.zson - source: ../../testdata/babble.zson - - name: null.zson + - name: babble.jsup + source: ../../testdata/babble.jsup + - name: null.jsup data: | {ts:null(time),s:"foo-bar",v:1} diff --git a/lake/ztests/seek-index-overlap.yaml b/lake/ztests/seek-index-overlap.yaml index 613463f34a..6c52c2b32f 100644 --- a/lake/ztests/seek-index-overlap.yaml +++ b/lake/ztests/seek-index-overlap.yaml @@ -4,18 +4,18 @@ script: | super db create -seekstride 2KB -orderby ts:asc -q asc super db create -seekstride 2KB -orderby ts:desc -q desc super db use -q asc - super -c "tail 900" babble.zson | super db load -q - - super -c "head 250" babble.zson | super db load -q - + super -c "tail 900" babble.jsup | super db load -q - + super -c "head 250" babble.jsup | super db load -q - super db query -z -s "from asc | count:=count()" echo === | tee /dev/stderr super db use -q desc - super -c "tail 900" babble.zson | super db load -q - - super -c "head 250" babble.zson | super db load -q - + super -c "tail 900" babble.jsup | super db load -q - + super -c "head 250" babble.jsup | super db load -q - super db query -z -s "from desc | count:=count()" inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stdout diff --git a/lake/ztests/seek-index-ts.yaml b/lake/ztests/seek-index-ts.yaml index 3f5cb7a7d2..4ed5706bf9 100644 --- a/lake/ztests/seek-index-ts.yaml +++ b/lake/ztests/seek-index-ts.yaml @@ -4,7 +4,7 @@ script: | for o in asc desc; do echo // $o | tee /dev/stderr super db create -use -seekstride 2KB -orderby ts:$o -q $o - super db load -q babble.zson + super db load -q babble.jsup source query.sh "ts >= 2020-04-21T23:59:26.063Z and ts <= 2020-04-21T23:59:38.069Z" source query.sh "ts == 2020-04-21T23:59:26.06326664Z" source query.sh "ts == 2020-04-21T23:59:26.06326664Z or foo == 'bar'" @@ -12,8 +12,8 @@ script: | done inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup - name: query.sh data: | echo // $1 | tee /dev/stderr diff --git a/lake/ztests/time-travel.yaml b/lake/ztests/time-travel.yaml index 010a1eb154..60a7fe42ea 100644 --- a/lake/ztests/time-travel.yaml +++ b/lake/ztests/time-travel.yaml @@ -2,8 +2,8 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q POOL - a=$(super db load a.zson | head -1 | awk '{print $1}') - b=$(super db load b.zson | head -1 | awk '{print $1}') + a=$(super db load a.jsup | head -1 | awk '{print $1}') + b=$(super db load b.jsup | head -1 | awk '{print $1}') super db query -z "from POOL | sort this" echo === AT a super db query -z "from POOL@$a | sort this" @@ -16,10 +16,10 @@ script: | super db query -z "from POOL@$b | sort this" inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:1} diff --git a/lake/ztests/vector.yaml b/lake/ztests/vector.yaml index 5f7ae09476..39746a065f 100644 --- a/lake/ztests/vector.yaml +++ b/lake/ztests/vector.yaml @@ -2,7 +2,7 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -use -q POOL - super db load -q in.zson + super db load -q in.jsup id=$(super db query -f text 'from POOL@main:objects | yield ksuid(id)') super db vector add -q $id super db query -Z 'from POOL@main:vectors | drop id' @@ -12,7 +12,7 @@ script: | echo === inputs: - - name: in.zson + - name: in.jsup data: | {x:1} {s:"hello",a:[1,2,3]} diff --git a/lake/ztests/zq.yaml b/lake/ztests/zq.yaml index 992b73ff80..e2477c3091 100644 --- a/lake/ztests/zq.yaml +++ b/lake/ztests/zq.yaml @@ -2,12 +2,12 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -q logs - super db load -q -use logs babble.zson + super db load -q -use logs babble.jsup super db query "from logs | count()" | super -z - inputs: - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stdout diff --git a/runtime/sam/expr/agg/ztests/args.yaml b/runtime/sam/expr/agg/ztests/args.yaml index ef56ca0d1b..47c4548ce6 100644 --- a/runtime/sam/expr/agg/ztests/args.yaml +++ b/runtime/sam/expr/agg/ztests/args.yaml @@ -1,11 +1,11 @@ script: | - super -z -c 'count()' in.zson + super -z -c 'count()' in.jsup for agg in and any collect dcount fuse min max or sum union; do - ! super -z -c "$agg()" in.zson + ! super -z -c "$agg()" in.jsup done inputs: - - name: in.zson + - name: in.jsup data: "{}" outputs: diff --git a/runtime/sam/expr/agg/ztests/container-partials.yaml b/runtime/sam/expr/agg/ztests/container-partials.yaml index 9644939613..78478e0d95 100644 --- a/runtime/sam/expr/agg/ztests/container-partials.yaml +++ b/runtime/sam/expr/agg/ztests/container-partials.yaml @@ -2,11 +2,11 @@ # with a single-row limit. We also make sure the partials consumer can handle # an empty input by including a record for key "a" with no value field. script: | - super -z -c "union(x) by key with -limit 1" in.zson > union.zson - super -z -c "collect(x) by key with -limit 1" in.zson > collect.zson + super -z -c "union(x) by key with -limit 1" in.jsup > union.jsup + super -z -c "collect(x) by key with -limit 1" in.jsup > collect.jsup inputs: - - name: in.zson + - name: in.jsup data: | {key:"a",x:1(int32)} {key:"a",x:-1(int32)} @@ -19,11 +19,11 @@ inputs: {key:"a"} outputs: - - name: union.zson + - name: union.jsup data: | {key:"a",union:|[1(int32),-1(int32),8(int32)]|} {key:"b",union:|[1(int32),2(int32)]|} - - name: collect.zson + - name: collect.jsup data: | {key:"a",collect:[1(int32),-1(int32),8(int32)]} {key:"b",collect:[2(int32),1(int32),1(int32)]} diff --git a/runtime/sam/expr/agg/ztests/container.yaml b/runtime/sam/expr/agg/ztests/container.yaml index 325b0107f2..ea6ff35d0f 100644 --- a/runtime/sam/expr/agg/ztests/container.yaml +++ b/runtime/sam/expr/agg/ztests/container.yaml @@ -1,9 +1,9 @@ script: | - super -z -c "union(x)" in.zson > union.zson - super -z -c "collect(x)" in.zson > collect.zson + super -z -c "union(x)" in.jsup > union.jsup + super -z -c "collect(x)" in.jsup > collect.jsup inputs: - - name: in.zson + - name: in.jsup data: | {x:1(int32)} {x:-1(int32)} @@ -13,9 +13,9 @@ inputs: {x:1(int32)} outputs: - - name: union.zson + - name: union.jsup data: | |[1(int32),-1(int32),2(int32),8(int32)]| - - name: collect.zson + - name: collect.jsup data: | [1(int32),-1(int32),2(int32),1(int32),8(int32),1(int32)] diff --git a/runtime/sam/expr/agg/ztests/math-partials.yaml b/runtime/sam/expr/agg/ztests/math-partials.yaml index 30459e0c46..08e93d2ea0 100644 --- a/runtime/sam/expr/agg/ztests/math-partials.yaml +++ b/runtime/sam/expr/agg/ztests/math-partials.yaml @@ -2,13 +2,13 @@ # with a single-row limit. We also make sure the partials consumer can handle # an empty input by inncluding a record for key "a" with no value field. script: | - super -z -c "avg(n) by key with -limit 1" in.zson > avg.zson - super -z -c "count() by key with -limit 1" in.zson > count.zson - super -z -c "min(n) by key with -limit 1" in.zson > min.zson - super -z -c "max(n) by key with -limit 1" in.zson > max.zson + super -z -c "avg(n) by key with -limit 1" in.jsup > avg.jsup + super -z -c "count() by key with -limit 1" in.jsup > count.jsup + super -z -c "min(n) by key with -limit 1" in.jsup > min.jsup + super -z -c "max(n) by key with -limit 1" in.jsup > max.jsup inputs: - - name: in.zson + - name: in.jsup data: | {key:"a",n:0(int32)} {key:"a",n:5(int32)} @@ -16,19 +16,19 @@ inputs: {key:"a"} outputs: - - name: avg.zson + - name: avg.jsup data: | {key:"a",avg:2.5} {key:"b",avg:10.} - - name: count.zson + - name: count.jsup data: | {key:"a",count:3(uint64)} {key:"b",count:1(uint64)} - - name: min.zson + - name: min.jsup data: | {key:"a",min:0} {key:"b",min:10} - - name: max.zson + - name: max.jsup data: | {key:"a",max:5} {key:"b",max:10} diff --git a/runtime/sam/expr/agg/ztests/math.yaml b/runtime/sam/expr/agg/ztests/math.yaml index 8a9183b22d..f204efc34c 100644 --- a/runtime/sam/expr/agg/ztests/math.yaml +++ b/runtime/sam/expr/agg/ztests/math.yaml @@ -1,40 +1,40 @@ script: | - super -z -c "avg(n)" in.zson > avg.zson - super -z -c "count()" in.zson > count.zson - super -z -c "dcount(n)" in.zson in.zson > dcount.zson + super -z -c "avg(n)" in.jsup > avg.jsup + super -z -c "count()" in.jsup > count.jsup + super -z -c "dcount(n)" in.jsup in.jsup > dcount.jsup # "with -limit 1" exercises the partials paths. - super -z -c "dcount(n) with -limit 1" in.zson in.zson > dcount-partials.zson - super -z -c "any(n)" in.zson > any.zson - super -z -c "min(n)" in.zson > min.zson - super -z -c "max(n)" in.zson > max.zson + super -z -c "dcount(n) with -limit 1" in.jsup in.jsup > dcount-partials.jsup + super -z -c "any(n)" in.jsup > any.jsup + super -z -c "min(n)" in.jsup > min.jsup + super -z -c "max(n)" in.jsup > max.jsup inputs: - - name: in.zson + - name: in.jsup data: | {n:0(int32)} {n:5(int32)} {n:10(int32)} outputs: - - name: avg.zson + - name: avg.jsup data: | 5. - - name: count.zson + - name: count.jsup data: | 3(uint64) - - name: dcount.zson + - name: dcount.jsup data: | 3(uint64) - - name: dcount-partials.zson + - name: dcount-partials.jsup data: | 3(uint64) # Note: min/max shouldn't be int64 (especially for uint) Issue #1506. - - name: any.zson + - name: any.jsup data: | 0(int32) - - name: min.zson + - name: min.jsup data: | 0 - - name: max.zson + - name: max.jsup data: | 10 diff --git a/runtime/sam/expr/function/ztests/grok.yaml b/runtime/sam/expr/function/ztests/grok.yaml index 899b4e527a..e0219e0f3f 100644 --- a/runtime/sam/expr/function/ztests/grok.yaml +++ b/runtime/sam/expr/function/ztests/grok.yaml @@ -1,5 +1,5 @@ script: | - super -z -c 'grok(pattern, field)' simple.zson + super -z -c 'grok(pattern, field)' simple.jsup echo "// ===" echo '"0-1-2"' | super -z -I patterns.zed - echo "// ===" @@ -13,7 +13,7 @@ script: | echo '"string value"' | super -z -c 'grok("%{INT:int}", this)' - inputs: - - name: simple.zson + - name: simple.jsup data: | { field: "2020-09-16T04:20:42.45+01:00 DEBUG This is a sample debug log message", diff --git a/runtime/sam/expr/function/ztests/parse-zson.yaml b/runtime/sam/expr/function/ztests/parse-zson.yaml index cc8e9a0c82..9f48df5346 100644 --- a/runtime/sam/expr/function/ztests/parse-zson.yaml +++ b/runtime/sam/expr/function/ztests/parse-zson.yaml @@ -11,4 +11,4 @@ output: | {a:1} null error({message:"parse_zson: string arg required",on:{}}) - error({message:"parse_zson: ZSON syntax error",on:"!"}) + error({message:"parse_zson: Super JSON syntax error",on:"!"}) diff --git a/runtime/sam/expr/ztests/cut-dup-fields.yaml b/runtime/sam/expr/ztests/cut-dup-fields.yaml index 41a6fa2a5e..7c280d13ba 100644 --- a/runtime/sam/expr/ztests/cut-dup-fields.yaml +++ b/runtime/sam/expr/ztests/cut-dup-fields.yaml @@ -1,11 +1,11 @@ script: | - ! super -z -c "cut rec,other,rec" in.zson - ! super -z -c "cut rec.sub1,rec.sub1" in.zson - ! super -z -c "cut rec.sub,rec.sub.sub" in.zson - ! super -z -c "cut rec.sub.sub,rec.sub" in.zson + ! super -z -c "cut rec,other,rec" in.jsup + ! super -z -c "cut rec.sub1,rec.sub1" in.jsup + ! super -z -c "cut rec.sub,rec.sub.sub" in.jsup + ! super -z -c "cut rec.sub.sub,rec.sub" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {} diff --git a/runtime/sam/expr/ztests/cut-nested.yaml b/runtime/sam/expr/ztests/cut-nested.yaml index 0c28719c4c..61b3851efa 100644 --- a/runtime/sam/expr/ztests/cut-nested.yaml +++ b/runtime/sam/expr/ztests/cut-nested.yaml @@ -1,16 +1,16 @@ script: | - super -z -c "cut rec.foo" nested1.zson + super -z -c "cut rec.foo" nested1.jsup echo === - super -z -c "cut rec.foo,rec['bar']" nested1.zson + super -z -c "cut rec.foo,rec['bar']" nested1.jsup echo === - super -z -c "cut rec1.sub1.foo,rec1['sub2']['bar'],rec2.foo,foo" nested2.zson + super -z -c "cut rec1.sub1.foo,rec1['sub2']['bar'],rec2.foo,foo" nested2.jsup inputs: - - name: nested1.zson + - name: nested1.jsup data: | {rec:{foo:"foo1",bar:"bar1"}} {rec:{foo:"foo2",bar:"bar2"}} - - name: nested2.zson + - name: nested2.jsup data: | {foo:"outer1",rec1:{sub1:{foo:"foo1.1",bar:"bar1.1"},sub2:{foo:"foo2.1",bar:"bar2.1"}},rec2:{foo:"foo3.1"}} {foo:"outer2",rec1:{sub1:{foo:"foo1.2",bar:"bar1.2"},sub2:{foo:"foo2.2",bar:"bar2.2"}},rec2:{foo:"foo3.2"}} diff --git a/runtime/sam/expr/ztests/cut-not-adjacent.yaml b/runtime/sam/expr/ztests/cut-not-adjacent.yaml index b6a6b9bbe5..7bcf610c02 100644 --- a/runtime/sam/expr/ztests/cut-not-adjacent.yaml +++ b/runtime/sam/expr/ztests/cut-not-adjacent.yaml @@ -1,11 +1,11 @@ script: | - ! super -z -c "cut rec.sub1,other,rec.sub2" in.zson - ! super -z -c "cut rec1.rec2.sub1,other,rec1.sub2" in.zson - ! super -z -c "cut rec1.rec2.sub1,other,rec1.rec2.sub2" in.zson - ! super -z -c "cut t.rec.sub1,t.other,t.rec.sub2" in.zson + ! super -z -c "cut rec.sub1,other,rec.sub2" in.jsup + ! super -z -c "cut rec1.rec2.sub1,other,rec1.sub2" in.jsup + ! super -z -c "cut rec1.rec2.sub1,other,rec1.rec2.sub2" in.jsup + ! super -z -c "cut t.rec.sub1,t.other,t.rec.sub2" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {} diff --git a/runtime/sam/expr/ztests/logical.yaml b/runtime/sam/expr/ztests/logical.yaml index eab5707435..bddc73d6be 100644 --- a/runtime/sam/expr/ztests/logical.yaml +++ b/runtime/sam/expr/ztests/logical.yaml @@ -1,53 +1,53 @@ script: | echo === TRUE AND === - super -z -c "yield t AND t" in.zson - super -z -c "yield t AND f" in.zson - super -z -c "yield t AND n" in.zson - super -z -c "yield missing(t AND m)" in.zson + super -z -c "yield t AND t" in.jsup + super -z -c "yield t AND f" in.jsup + super -z -c "yield t AND n" in.jsup + super -z -c "yield missing(t AND m)" in.jsup echo === FALSE AND === - super -z -c "yield f AND t" in.zson - super -z -c "yield f AND f" in.zson - super -z -c "yield f AND n" in.zson - super -z -c "yield f AND m" in.zson + super -z -c "yield f AND t" in.jsup + super -z -c "yield f AND f" in.jsup + super -z -c "yield f AND n" in.jsup + super -z -c "yield f AND m" in.jsup echo === NULL AND === - super -z -c "yield n AND t" in.zson - super -z -c "yield n AND f" in.zson - super -z -c "yield n AND n" in.zson - super -z -c "yield n AND m" in.zson + super -z -c "yield n AND t" in.jsup + super -z -c "yield n AND f" in.jsup + super -z -c "yield n AND n" in.jsup + super -z -c "yield n AND m" in.jsup echo === MISSING AND === - super -z -c "yield missing(m AND t)" in.zson - super -z -c "yield missing(m AND f)" in.zson - super -z -c "yield missing(m AND n)" in.zson - super -z -c "yield missing(m AND m)" in.zson + super -z -c "yield missing(m AND t)" in.jsup + super -z -c "yield missing(m AND f)" in.jsup + super -z -c "yield missing(m AND n)" in.jsup + super -z -c "yield missing(m AND m)" in.jsup echo === TRUE OR === - super -z -c "yield t OR t" in.zson - super -z -c "yield t OR f" in.zson - super -z -c "yield t OR n" in.zson - super -z -c "yield t OR m" in.zson + super -z -c "yield t OR t" in.jsup + super -z -c "yield t OR f" in.jsup + super -z -c "yield t OR n" in.jsup + super -z -c "yield t OR m" in.jsup echo === FALSE OR === - super -z -c "yield f OR t" in.zson - super -z -c "yield f OR f" in.zson - super -z -c "yield f OR n" in.zson - super -z -c "yield missing(f OR m)" in.zson + super -z -c "yield f OR t" in.jsup + super -z -c "yield f OR f" in.jsup + super -z -c "yield f OR n" in.jsup + super -z -c "yield missing(f OR m)" in.jsup echo === NULL OR === - super -z -c "yield n OR t" in.zson - super -z -c "yield n OR f" in.zson - super -z -c "yield n OR n" in.zson - super -z -c "yield missing(n OR m)" in.zson + super -z -c "yield n OR t" in.jsup + super -z -c "yield n OR f" in.jsup + super -z -c "yield n OR n" in.jsup + super -z -c "yield missing(n OR m)" in.jsup echo === MISSING OR === - super -z -c "yield m OR t" in.zson - super -z -c "yield m OR f" in.zson - super -z -c "yield m OR n" in.zson - super -z -c "yield missing(m OR m)" in.zson + super -z -c "yield m OR t" in.jsup + super -z -c "yield m OR f" in.jsup + super -z -c "yield m OR n" in.jsup + super -z -c "yield missing(m OR m)" in.jsup echo === NOT - super -z -c "yield !t" in.zson - super -z -c "yield !f" in.zson - super -z -c "yield missing(!m)" in.zson - super -z -c "yield !n" in.zson - super -z -c "yield !!f" in.zson + super -z -c "yield !t" in.jsup + super -z -c "yield !f" in.jsup + super -z -c "yield missing(!m)" in.jsup + super -z -c "yield !n" in.jsup + super -z -c "yield !!f" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {t:true,f:false,m:error("missing"),n:null(bool)} diff --git a/runtime/sam/expr/ztests/port-math.yaml b/runtime/sam/expr/ztests/port-math.yaml index 92e21b4093..557920b0ce 100644 --- a/runtime/sam/expr/ztests/port-math.yaml +++ b/runtime/sam/expr/ztests/port-math.yaml @@ -1,12 +1,12 @@ script: | - super -z -c "put x:=p1+1" in.zson + super -z -c "put x:=p1+1" in.jsup echo === - super -z -c "put x:=p1>p2" in.zson + super -z -c "put x:=p1>p2" in.jsup echo === - super -z -c "put x:=a+p1+p2" in.zson + super -z -c "put x:=a+p1+p2" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:1(int32),p1:100(port=uint16),p2:200(port)} diff --git a/runtime/sam/op/fuse/ztests/spill.yaml b/runtime/sam/op/fuse/ztests/spill.yaml index 582e79ea8f..31c7367844 100644 --- a/runtime/sam/op/fuse/ztests/spill.yaml +++ b/runtime/sam/op/fuse/ztests/spill.yaml @@ -1,9 +1,9 @@ # 13B is enough to buffer the first record in memory but not the second. script: | - super -z -fusemem 13B -c fuse in.zson + super -z -fusemem 13B -c fuse in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:"hello",b:"world"} {b:"goodnight",c:"gracie"} diff --git a/runtime/sam/op/groupby/ztests/groupby.yaml b/runtime/sam/op/groupby/ztests/groupby.yaml index 3d256279c6..0e14d9c4f8 100644 --- a/runtime/sam/op/groupby/ztests/groupby.yaml +++ b/runtime/sam/op/groupby/ztests/groupby.yaml @@ -1,49 +1,49 @@ script: | echo === forward-sorted === - super -z -c "count() by ts | sort this" in.zson + super -z -c "count() by ts | sort this" in.jsup echo === forward-sorted-with-null === - super -z -c "count() by ts | sort this" in-with-null.zson + super -z -c "count() by ts | sort this" in-with-null.jsup echo === forward-sorted-every === - super -z -c "count() by every(1s)| sort this" in.zson + super -z -c "count() by every(1s)| sort this" in.jsup echo === forward-sorted-every-null === - super -z -c "count() by every(1s) | sort this" in-with-null.zson + super -z -c "count() by every(1s) | sort this" in-with-null.jsup echo === forward-sorted-record-key === - super -z -c "count() by foo | sort this" in-record-key.zson + super -z -c "count() by foo | sort this" in-record-key.jsup echo === forward-sorted-nested-key === - super -z -c "count() by foo.a | sort this" in-record-key.zson + super -z -c "count() by foo.a | sort this" in-record-key.jsup echo === forward-sorted-record-key-null === - super -z -c "count() by foo | sort this" in-record-key-null.zson + super -z -c "count() by foo | sort this" in-record-key-null.jsup echo === forward-sorted-nested-key-null === - super -z -c "count() by foo | sort this" in-record-key-null.zson + super -z -c "count() by foo | sort this" in-record-key-null.jsup echo === reverse-sorted === - super -z -c "count() by ts | sort this" in-rev.zson + super -z -c "count() by ts | sort this" in-rev.jsup echo === reverse-sorted-null === - super -z -c "count() by every(1s) | sort this" in-rev.zson + super -z -c "count() by every(1s) | sort this" in-rev.jsup inputs: - - name: in.zson + - name: in.jsup data: | {ts:1970-01-01T00:00:01Z} {ts:1970-01-01T00:00:01Z} {ts:1970-01-01T00:00:02Z} {ts:1970-01-01T00:00:03Z} - - name: in-with-null.zson + - name: in-with-null.jsup data: | {ts:1970-01-01T00:00:01Z} {ts:1970-01-01T00:00:01Z} {ts:1970-01-01T00:00:02Z} {ts:1970-01-01T00:00:03Z} {ts:null(time)} - - name: in-record-key.zson + - name: in-record-key.jsup data: | {foo:{a:"aaa"}} {foo:{a:"baa"}} - - name: in-record-key-null.zson + - name: in-record-key-null.jsup data: | {foo:{a:"aaa"}} {foo:{a:"baa"}} {foo:{a:null(string)}} - - name: in-rev.zson + - name: in-rev.jsup data: | {ts:1970-01-01T00:00:10Z} {ts:1970-01-01T00:00:08Z} diff --git a/runtime/sam/op/join/ztests/auto-sort.yaml b/runtime/sam/op/join/ztests/auto-sort.yaml index 8d14ace104..a3e5f75ed3 100644 --- a/runtime/sam/op/join/ztests/auto-sort.yaml +++ b/runtime/sam/op/join/ztests/auto-sort.yaml @@ -1,23 +1,23 @@ script: | - super -z -c 'file a.zson | join (file b.zson) on a=b' + super -z -c 'file a.jsup | join (file b.jsup) on a=b' echo '// ===' - super -z -c 'file a.zson | join (file b.zson | sort -r b) on a=b' + super -z -c 'file a.jsup | join (file b.jsup | sort -r b) on a=b' echo '// ===' - super -z -c 'file a.zson | join (file b.zson | sort b) on a=b' + super -z -c 'file a.jsup | join (file b.jsup | sort b) on a=b' echo '// ===' - super -z -c 'file a.zson | sort a | join (file b.zson | sort -r b) on a=b' + super -z -c 'file a.jsup | sort a | join (file b.jsup | sort -r b) on a=b' echo '// ===' - super -z -c 'file a.zson | sort -r a | join (file b.zson) on a=b' + super -z -c 'file a.jsup | sort -r a | join (file b.jsup) on a=b' echo '// ===' - super -z -c 'file a.zson | sort -r a | join (file b.zson | sort b) on a=b' + super -z -c 'file a.jsup | sort -r a | join (file b.jsup | sort b) on a=b' inputs: - - name: a.zson + - name: a.jsup data: | {a:null(int64)} {a:1} {a:2} - - name: b.zson + - name: b.jsup data: | {b:2} {b:1} diff --git a/runtime/sam/op/join/ztests/empty-inner.yaml b/runtime/sam/op/join/ztests/empty-inner.yaml index a63b275c54..a466351f1c 100644 --- a/runtime/sam/op/join/ztests/empty-inner.yaml +++ b/runtime/sam/op/join/ztests/empty-inner.yaml @@ -1,14 +1,14 @@ script: | - super -z -c 'left join (file C.zson) on a=b hit:=sc' A.zson + super -z -c 'left join (file C.jsup) on a=b hit:=sc' A.jsup inputs: - - name: A.zson + - name: A.jsup data: | {a:10(int32),sa:"a0"} {a:20(int32),sa:"a1"} {a:30(int32),sa:"a2"} {a:40(int32),sa:"a3"} - - name: C.zson + - name: C.jsup data: | {c:20(int32),sc:"b20"} {c:20(int32),sc:"b20v2"} diff --git a/runtime/sam/op/join/ztests/expr.yaml b/runtime/sam/op/join/ztests/expr.yaml index 706ce3d403..59ad8a586b 100644 --- a/runtime/sam/op/join/ztests/expr.yaml +++ b/runtime/sam/op/join/ztests/expr.yaml @@ -1,19 +1,19 @@ script: | - super -z -c 'left join (file B.zson) on s b' A.zson + super -z -c 'left join (file B.jsup) on s b' A.jsup echo === - super -z -c 'left join (file B.zson) on s=(lower(s)) b' A.zson + super -z -c 'left join (file B.jsup) on s=(lower(s)) b' A.jsup echo === - super -z -c 'left join (file B.zson) on (lower(s))=(lower(s)) b' A.zson + super -z -c 'left join (file B.jsup) on (lower(s))=(lower(s)) b' A.jsup echo === - super -z -c 'left join (file B.zson) on s' A.zson + super -z -c 'left join (file B.jsup) on s' A.jsup inputs: - - name: A.zson + - name: A.jsup data: | {a:1(int32),s:"a"} {a:2(int32),s:"B"} {a:3(int32),s:"c"} - - name: B.zson + - name: B.jsup data: | {b:4(int32),s:"A"} {b:5(int32),s:"b"} diff --git a/runtime/sam/op/join/ztests/join-union.yaml b/runtime/sam/op/join/ztests/join-union.yaml index abffa29b49..66b5e39909 100644 --- a/runtime/sam/op/join/ztests/join-union.yaml +++ b/runtime/sam/op/join/ztests/join-union.yaml @@ -1,12 +1,12 @@ script: | - super -z -c 'inner join (file b.zson) on a=b' a.zson + super -z -c 'inner join (file b.jsup) on a=b' a.jsup inputs: - - name: a.zson + - name: a.jsup data: | {a:1}(({a:int64},{a:string})) {a:2}(({a:int64},{a:string})) {a:"bar"}(({a:int64},{a:string})) - - name: b.zson + - name: b.jsup data: | {b:1} {b:3} diff --git a/runtime/sam/op/join/ztests/kinds.yaml b/runtime/sam/op/join/ztests/kinds.yaml index f4ea7c14c6..ba5a83d79c 100644 --- a/runtime/sam/op/join/ztests/kinds.yaml +++ b/runtime/sam/op/join/ztests/kinds.yaml @@ -1,15 +1,15 @@ script: | echo === ANTI === - super -z -c 'anti join (file B.zson) on a=b | sort a' A.zson + super -z -c 'anti join (file B.jsup) on a=b | sort a' A.jsup echo === LEFT === - super -z -c 'left join (file B.zson) on a=b hit:=sb | sort a' A.zson + super -z -c 'left join (file B.jsup) on a=b hit:=sb | sort a' A.jsup echo === INNER === - super -z -c 'inner join (file B.zson) on a=b hit:=sb | sort a' A.zson + super -z -c 'inner join (file B.jsup) on a=b hit:=sb | sort a' A.jsup echo === RIGHT === - super -z -c 'right join (file C.zson) on b=c hit:=sb | sort c' B.zson + super -z -c 'right join (file C.jsup) on b=c hit:=sb | sort c' B.jsup inputs: - - name: A.zson + - name: A.jsup data: | {a:10,sa:"a0"} {a:15,sa:"a8"} @@ -21,14 +21,14 @@ inputs: {a:45,sa:"a5"} {a:50,sa:"a4"} {anti_a:"Anti join output must not contain this record."} - - name: B.zson + - name: B.jsup data: | {b:20,sb:"b20.1"} {b:20,sb:"b20.2"} {b:40,sb:"b40"} {b:40,sb:"b40.2"} {b:60,sb:"b60"} - - name: C.zson + - name: C.jsup data: | {c:15,sc:"c8"} {c:20,sc:"c1"} diff --git a/runtime/sam/op/join/ztests/subquery.yaml b/runtime/sam/op/join/ztests/subquery.yaml index 232c584187..3045efb63a 100644 --- a/runtime/sam/op/join/ztests/subquery.yaml +++ b/runtime/sam/op/join/ztests/subquery.yaml @@ -1,13 +1,13 @@ script: | - super -z -c 'file a.zson | inner join (file b.zson) on a=b' + super -z -c 'file a.jsup | inner join (file b.jsup) on a=b' inputs: - - name: a.zson + - name: a.jsup data: | {a:1} {a:2} {a:3} - - name: b.zson + - name: b.jsup data: | {b:1} {b:3} diff --git a/runtime/sam/op/ztests/put-nested.yaml b/runtime/sam/op/ztests/put-nested.yaml index 267fe3d579..c95a76a65a 100644 --- a/runtime/sam/op/ztests/put-nested.yaml +++ b/runtime/sam/op/ztests/put-nested.yaml @@ -1,4 +1,4 @@ -script: super -i zson -f zson -pretty=0 -c 'put pre:="pre", a.a:=1, a.b:=2, a.c.a:=3, a.d:=4, b:=5, post:="post"' - +script: super -f jsup -pretty=0 -c 'put pre:="pre", a.a:=1, a.b:=2, a.c.a:=3, a.d:=4, b:=5, post:="post"' - inputs: - name: stdin diff --git a/runtime/sam/op/ztests/user-from.yaml b/runtime/sam/op/ztests/user-from.yaml index e049649043..85ffcb7a19 100644 --- a/runtime/sam/op/ztests/user-from.yaml +++ b/runtime/sam/op/ztests/user-from.yaml @@ -4,12 +4,12 @@ script: | inputs: - name: test.zed data: | - const FILE = "A.zson" + const FILE = "A.jsup" op test(path): ( file [path] | sort a ) test(FILE) - - name: A.zson + - name: A.jsup data: | {a:5} {a:1} diff --git a/runtime/sam/op/ztests/user-join.yaml b/runtime/sam/op/ztests/user-join.yaml index fb5aae0767..4c71bc690f 100644 --- a/runtime/sam/op/ztests/user-join.yaml +++ b/runtime/sam/op/ztests/user-join.yaml @@ -3,8 +3,8 @@ script: | super db init -q super db create -q -orderby flavor:asc fruit super db create -q -orderby likes:asc people - super db load -q -use fruit fruit.zson - super db load -q -use people people.zson + super db load -q -use fruit fruit.jsup + super db load -q -use people people.jsup super db query -z -I test.spq inputs: @@ -15,7 +15,7 @@ inputs: | inner join ( from [rpool] ) on lkey = rkey ldest := rsrc ) test("fruit", "people", flavor, likes, eater, name) - - name: fruit.zson + - name: fruit.jsup data: | {name:"apple",color:"red",flavor:"tart"} {name:"banana",color:"yellow",flavor:"sweet"} @@ -23,7 +23,7 @@ inputs: {name:"strawberry",color:"red",flavor:"sweet"} {name:"dates",color:"brown",flavor:"sweet",note:"in season"} {name:"figs",color:"brown",flavor:"plain"} - - name: people.zson + - name: people.jsup data: | {name:"morgan",age:61,likes:"tart"} {name:"quinn",age:14,likes:"sweet",note:"many kids enjoy sweets"} diff --git a/runtime/vam/op/ztests/agg-count-by-string.yaml b/runtime/vam/op/ztests/agg-count-by-string.yaml index c1562e6d25..0cd41e5617 100644 --- a/runtime/vam/op/ztests/agg-count-by-string.yaml +++ b/runtime/vam/op/ztests/agg-count-by-string.yaml @@ -6,10 +6,10 @@ script: | { seq -f '{x: "0", y: "1", z: "%.0f"}' 257 seq -f '{x: "0", y: "2", z: "%.0f"}' 257 - } | super -o t.vng -f vng - - super dev vector query -z 'count() by x' t.vng - super dev vector query -z 'count() by y' t.vng | super -z -c 'sort y' - - super dev vector query -z 'count() by z' t.vng | super -z -c 'z=="257"' - + } | super -o t.csup -f csup - + super dev vector query -z 'count() by x' t.csup + super dev vector query -z 'count() by y' t.csup | super -z -c 'sort y' - + super dev vector query -z 'count() by z' t.csup | super -z -c 'z=="257"' - outputs: - name: stdout diff --git a/runtime/vam/op/ztests/agg-sum.yaml b/runtime/vam/op/ztests/agg-sum.yaml index e991ca231a..3d51972b13 100644 --- a/runtime/vam/op/ztests/agg-sum.yaml +++ b/runtime/vam/op/ztests/agg-sum.yaml @@ -6,9 +6,9 @@ script: | { seq -f '{x: 0, y: %.0f}' 257 seq -f '{x: 1, y: %.0f}' 257 - } | super -o t.vng -f vng - - super dev vector query -z 'sum(x)' t.vng - super dev vector query -z 'sum(y)' t.vng + } | super -o t.csup -f csup - + super dev vector query -z 'sum(x)' t.csup + super dev vector query -z 'sum(y)' t.csup outputs: - name: stdout diff --git a/runtime/vam/op/ztests/arith.yaml b/runtime/vam/op/ztests/arith.yaml index 24503e9d06..81a0a4c616 100644 --- a/runtime/vam/op/ztests/arith.yaml +++ b/runtime/vam/op/ztests/arith.yaml @@ -1,8 +1,8 @@ # Test that arithmetic works on union and dynamic vectors. script: | - super -o t.vng -f vng - - super dev vector query -z "yield this,a+a,a+b,b+a,b+b" t.vng + super -o t.csup -f csup - + super dev vector query -z "yield this,a+a,a+b,b+a,b+b" t.csup inputs: - name: stdin diff --git a/runtime/vam/op/ztests/compare.yaml b/runtime/vam/op/ztests/compare.yaml index 8882998fc0..cb7071b5ab 100644 --- a/runtime/vam/op/ztests/compare.yaml +++ b/runtime/vam/op/ztests/compare.yaml @@ -1,8 +1,8 @@ # Test that comparison works on union and dynamic vectors. script: | - super -o t.vng -f vng - - super dev vector query -z "yield this,a1)" t.vng + super -o t.csup -f csup - + super dev vector query -z "yield not (a>1)" t.csup inputs: - name: stdin diff --git a/runtime/vam/op/ztests/where.yaml b/runtime/vam/op/ztests/where.yaml index dd7e178106..4aef5695bf 100644 --- a/runtime/vam/op/ztests/where.yaml +++ b/runtime/vam/op/ztests/where.yaml @@ -1,10 +1,10 @@ script: | - super -o t.vng -f vng - - super dev vector query -z "where true" t.vng + super -o t.csup -f csup - + super dev vector query -z "where true" t.csup echo // - super dev vector query -z "where this != 2" t.vng + super dev vector query -z "where this != 2" t.csup echo // - super dev vector query -z "where this" t.vng + super dev vector query -z "where this" t.csup inputs: - name: stdin diff --git a/runtime/vam/op/ztests/yield.yaml b/runtime/vam/op/ztests/yield.yaml index 982f6ea5c8..8f6d2f41ea 100644 --- a/runtime/vam/op/ztests/yield.yaml +++ b/runtime/vam/op/ztests/yield.yaml @@ -1,6 +1,6 @@ script: | - super -o t.vng -f vng - - super dev vector query -z "yield a >= 1, a >= b, a >= 1 or a >= b" t.vng + super -o t.csup -f csup - + super dev vector query -z "yield a >= 1, a >= b, a >= 1 or a >= b" t.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/array-copy.yaml b/runtime/vcache/ztests/array-copy.yaml index 9e78906786..a7703bfad9 100644 --- a/runtime/vcache/ztests/array-copy.yaml +++ b/runtime/vcache/ztests/array-copy.yaml @@ -2,8 +2,8 @@ # the vector cache to exercise the logic that builds values from # cached vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/array-null.yaml b/runtime/vcache/ztests/array-null.yaml index 22c6ce7d0b..a45817f630 100644 --- a/runtime/vcache/ztests/array-null.yaml +++ b/runtime/vcache/ztests/array-null.yaml @@ -1,9 +1,9 @@ script: | - super -f vng -o test.vng in.zson - super dev vector copy -z test.vng + super -f csup -o test.csup in.jsup + super dev vector copy -z test.csup inputs: - - name: in.zson + - name: in.jsup data: &input | {a:[1,2]} null({a:[int64]}) diff --git a/runtime/vcache/ztests/empty.yaml b/runtime/vcache/ztests/empty.yaml index 846ce88098..b0c57fcecf 100644 --- a/runtime/vcache/ztests/empty.yaml +++ b/runtime/vcache/ztests/empty.yaml @@ -1,9 +1,9 @@ script: | - super -f vng -o test.vng in.zson - super dev vector copy -z test.vng + super -f csup -o test.csup in.jsup + super dev vector copy -z test.csup inputs: - - name: in.zson + - name: in.jsup data: &input | {} [] diff --git a/runtime/vcache/ztests/error-copy.yaml b/runtime/vcache/ztests/error-copy.yaml index fc4352ca71..9c0e6d6ff1 100644 --- a/runtime/vcache/ztests/error-copy.yaml +++ b/runtime/vcache/ztests/error-copy.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/map-copy.yaml b/runtime/vcache/ztests/map-copy.yaml index 38827bf6d7..6a45e41cf3 100644 --- a/runtime/vcache/ztests/map-copy.yaml +++ b/runtime/vcache/ztests/map-copy.yaml @@ -2,8 +2,8 @@ # the vector cache to exercise the logic that builds values from # cached vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/named-copy.yaml b/runtime/vcache/ztests/named-copy.yaml index a044365d45..e3f1814834 100644 --- a/runtime/vcache/ztests/named-copy.yaml +++ b/runtime/vcache/ztests/named-copy.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/primitive-const-copy.yaml b/runtime/vcache/ztests/primitive-const-copy.yaml index 57adffa040..987f8cc58d 100644 --- a/runtime/vcache/ztests/primitive-const-copy.yaml +++ b/runtime/vcache/ztests/primitive-const-copy.yaml @@ -1,7 +1,7 @@ # Exercise the logic that builds values from cached constant vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/primitive-copy.yaml b/runtime/vcache/ztests/primitive-copy.yaml index 9529124677..c099b8db25 100644 --- a/runtime/vcache/ztests/primitive-copy.yaml +++ b/runtime/vcache/ztests/primitive-copy.yaml @@ -1,7 +1,7 @@ # Exercise the logic that builds values from cached non-constant vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/projection.yaml b/runtime/vcache/ztests/projection.yaml index fbf4ce000c..b132fcfa52 100644 --- a/runtime/vcache/ztests/projection.yaml +++ b/runtime/vcache/ztests/projection.yaml @@ -1,14 +1,14 @@ script: | - super -f vng -o test.vng - - super dev vector project -z test.vng x y z + super -f csup -o test.csup - + super dev vector project -z test.csup x y z echo === - super dev vector project -z test.vng s + super dev vector project -z test.csup s echo === - super dev vector project -z test.vng x s + super dev vector project -z test.csup x s echo === - super dev vector project -z test.vng s x + super dev vector project -z test.csup s x echo === - super dev vector project -z test.vng y w.y + super dev vector project -z test.csup y w.y inputs: - name: stdin data: | diff --git a/runtime/vcache/ztests/record-copy.yaml b/runtime/vcache/ztests/record-copy.yaml index fb829741d3..ee1f3754b0 100644 --- a/runtime/vcache/ztests/record-copy.yaml +++ b/runtime/vcache/ztests/record-copy.yaml @@ -2,8 +2,8 @@ # the vector cache to exercise the logic that builds values from # cached vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/set-copy.yaml b/runtime/vcache/ztests/set-copy.yaml index f15c868542..90416de446 100644 --- a/runtime/vcache/ztests/set-copy.yaml +++ b/runtime/vcache/ztests/set-copy.yaml @@ -2,8 +2,8 @@ # the vector cache to exercise the logic that builds values from # cached vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/vcache/ztests/union-copy.yaml b/runtime/vcache/ztests/union-copy.yaml index 81cae73acf..fe0fe06325 100644 --- a/runtime/vcache/ztests/union-copy.yaml +++ b/runtime/vcache/ztests/union-copy.yaml @@ -2,8 +2,8 @@ # the vector cache to exercise the logic that builds values from # cached vectors. script: | - super -f vng -o test.vng - - super dev vector copy -z test.vng + super -f csup -o test.csup - + super dev vector copy -z test.csup inputs: - name: stdin diff --git a/runtime/ztests/parallel-err.yaml b/runtime/ztests/parallel-err.yaml index 25b7a48406..f38d6f92fc 100644 --- a/runtime/ztests/parallel-err.yaml +++ b/runtime/ztests/parallel-err.yaml @@ -1,8 +1,8 @@ script: | - ! super -z -c 'join on a=b' A.zson + ! super -z -c 'join on a=b' A.jsup inputs: - - name: A.zson + - name: A.jsup data: | {a:1(int32)} {a:2(int32)} diff --git a/runtime/ztests/parallel-stdin.yaml b/runtime/ztests/parallel-stdin.yaml index 74a327fbe8..d085f89dae 100644 --- a/runtime/ztests/parallel-stdin.yaml +++ b/runtime/ztests/parallel-stdin.yaml @@ -1,5 +1,5 @@ script: | - super -z -c 'join (file B.zson) on a=b b:=b' - + super -z -c 'join (file B.jsup) on a=b b:=b' - inputs: - name: stdin @@ -7,7 +7,7 @@ inputs: {a:1(int32)} {a:2(int32)} {a:3(int32)} - - name: B.zson + - name: B.jsup data: | {b:1(int32)} {b:2(int32)} diff --git a/runtime/ztests/parallel.yaml b/runtime/ztests/parallel.yaml index 6a964330d2..200facc18f 100644 --- a/runtime/ztests/parallel.yaml +++ b/runtime/ztests/parallel.yaml @@ -1,13 +1,13 @@ script: | - super -z -c 'join (file B.zson) on a=b b:=b' A.zson + super -z -c 'join (file B.jsup) on a=b b:=b' A.jsup inputs: - - name: A.zson + - name: A.jsup data: | {a:1(int32)} {a:2(int32)} {a:3(int32)} - - name: B.zson + - name: B.jsup data: | {b:1(int32)} {b:2(int32)} diff --git a/scripts/output-check.sh b/scripts/output-check.sh index 5b52b9210e..1ad33cc11b 100755 --- a/scripts/output-check.sh +++ b/scripts/output-check.sh @@ -17,13 +17,13 @@ # explicitly returning the intended error code. cd zed-sample-data -scripts/check_md5sums.sh zng +scripts/check_md5sums.sh bsup ZNG_SUCCESS="$?" echo -scripts/check_md5sums.sh zng-uncompressed +scripts/check_md5sums.sh bsup-uncompressed ZNG_UNCOMPRESSED_SUCCESS="$?" echo -scripts/check_md5sums.sh zson +scripts/check_md5sums.sh jsup ZSON_SUCCESS="$?" echo diff --git a/scripts/perf-compare.sh b/scripts/perf-compare.sh index cecd37dbde..02e9eb40a4 100755 --- a/scripts/perf-compare.sh +++ b/scripts/perf-compare.sh @@ -82,18 +82,18 @@ do echo -e "### $DESC\n" | tee "$MD" echo "|**
Tool**|**
Arguments**|**Input
Format**|**Output
Format**|**
Real**|**
User**|**
Sys**|" | tee -a "$MD" echo "|:----------:|:---------------:|:-----------------:|:------------------:|-----------:|-----------:|----------:|" | tee -a "$MD" - for INPUT in zeek zng zng-uncompressed zson json ; do - for OUTPUT in zeek zng zng-uncompressed zson json ; do + for INPUT in zeek bsup bsup-uncompressed jsup json ; do + for OUTPUT in zeek bsup bsup-uncompressed jsup json ; do superpipe_query=${SUPERPIPE_QUERIES[$n]} echo -n "|\`super\`|\`$superpipe_query\`|$INPUT|$OUTPUT|" | tee -a "$MD" case $INPUT in json ) super_flags="-i json -I $shaper" superpipe_query="| $superpipe_query" ;; - zng-uncompressed ) super_flags="-i zng" ;; + bsup-uncompressed ) super_flags="-i bsup" ;; * ) super_flags="-i $INPUT" ;; esac case $OUTPUT in json ) super_flags="$super_flags -f json" ;; - zng-uncompressed ) super_flags="$super_flags -f zng -zng.compress=false" ;; + bsup-uncompressed ) super_flags="$super_flags -f bsup -bsup.compress=false" ;; * ) super_flags="$super_flags -f $OUTPUT" ;; esac ALL_TIMES=$(time -p (super $super_flags -c "$superpipe_query" $DATA/$INPUT/* > /dev/null) 2>&1) diff --git a/service/core.go b/service/core.go index b9fafaf75d..25060b321f 100644 --- a/service/core.go +++ b/service/core.go @@ -25,10 +25,10 @@ import ( "go.uber.org/zap" ) -// DefaultZedFormat is the default Zed format that the server will assume if the +// DefaultFormat is the default Zed format that the server will assume if the // value for a request's "Accept" or "Content-Type" headers are not set or set // to "*/*". -const DefaultZedFormat = "zson" +const DefaultFormat = "jsup" const indexPage = ` @@ -70,7 +70,7 @@ type Core struct { func NewCore(ctx context.Context, conf Config) (*Core, error) { if conf.DefaultResponseFormat == "" { - conf.DefaultResponseFormat = DefaultZedFormat + conf.DefaultResponseFormat = DefaultFormat } if _, err := api.FormatToMediaType(conf.DefaultResponseFormat); err != nil { return nil, fmt.Errorf("invalid default response format: %w", err) diff --git a/service/handlers.go b/service/handlers.go index b0e9846395..6c7610b3f9 100644 --- a/service/handlers.go +++ b/service/handlers.go @@ -431,7 +431,7 @@ func handleBranchLoad(c *Core, w *ResponseWriter, r *Request) { w.Error(err) return } - if format == "parquet" || format == "vng" { + if format == "parquet" || format == "csup" { // These formats require a reader that implements io.ReaderAt and // io.Seeker. Copy the reader to a temporary file and use that. // @@ -694,7 +694,7 @@ func handleAuthMethodGet(c *Core, w *ResponseWriter, r *Request) { } func handleEvents(c *Core, w *ResponseWriter, r *Request) { - format, err := api.MediaTypeToFormat(r.Header.Get("Accept"), "zson") + format, err := api.MediaTypeToFormat(r.Header.Get("Accept"), "jsup") if err != nil { w.Error(srverr.ErrInvalid(err)) } diff --git a/service/request.go b/service/request.go index c5dfb783cf..f3a0dc8398 100644 --- a/service/request.go +++ b/service/request.go @@ -170,7 +170,7 @@ func (r *Request) BoolFromQuery(w *ResponseWriter, param string) (bool, bool) { } func (r *Request) Unmarshal(w *ResponseWriter, body interface{}, templates ...interface{}) bool { - format, ok := r.format(w, DefaultZedFormat) + format, ok := r.format(w, DefaultFormat) if !ok { return false } diff --git a/service/ztests/curl-load-arrows.yaml b/service/ztests/curl-load-arrows.yaml index a5236bd80a..76402f166d 100644 --- a/service/ztests/curl-load-arrows.yaml +++ b/service/ztests/curl-load-arrows.yaml @@ -1,14 +1,14 @@ script: | source service.sh super db create -q test - super -f arrows in.zson | + super -f arrows in.jsup | curl -H Content-Type:application/vnd.apache.arrow.stream --data-binary @- \ --fail $SUPER_DB_LAKE/pool/test/branch/main | super -z -c commit:=0 - echo // super db query -z 'from test' inputs: - - name: in.zson + - name: in.jsup data: | {x:1} - name: service.sh diff --git a/service/ztests/curl-load-vng.yaml b/service/ztests/curl-load-csup.yaml similarity index 75% rename from service/ztests/curl-load-vng.yaml rename to service/ztests/curl-load-csup.yaml index 91fe1334ed..792c86dd85 100644 --- a/service/ztests/curl-load-vng.yaml +++ b/service/ztests/curl-load-csup.yaml @@ -1,14 +1,14 @@ script: | source service.sh super db create -q test - super -f vng in.zson | - curl -H Content-Type:application/x-vng --data-binary @- \ + super -f csup in.jsup | + curl -H Content-Type:application/x-csup --data-binary @- \ --fail $SUPER_DB_LAKE/pool/test/branch/main | super -z -c commit:=0 - echo // super db query -z 'from test' inputs: - - name: in.zson + - name: in.jsup data: | {x:1} - name: service.sh diff --git a/service/ztests/curl-load-error.yaml b/service/ztests/curl-load-error.yaml index 29ef37bade..80c4b4a9e8 100644 --- a/service/ztests/curl-load-error.yaml +++ b/service/ztests/curl-load-error.yaml @@ -16,7 +16,7 @@ inputs: outputs: - name: stdout data: | - {"type":"Error","kind":"invalid operation","error":"format detection error\n\tarrows: schema message length exceeds 1 MiB\n\tcsv: line 1: EOF\n\tjson: invalid character 'T' looking for beginning of value\n\tline: auto-detection not supported\n\tparquet: auto-detection requires seekable input\n\ttsv: line 1: EOF\n\tvng: auto-detection requires seekable input\n\tzeek: line 1: bad types/fields definition in zeek header\n\tzjson: line 1: malformed ZJSON: bad type object: \"This is not a detectable format.\": unpacker error parsing JSON: invalid character 'T' looking for beginning of value\n\tzng: malformed zng record\n\tzson: ZSON syntax error"} + {"type":"Error","kind":"invalid operation","error":"format detection error\n\tarrows: schema message length exceeds 1 MiB\n\tcsv: line 1: EOF\n\tjson: invalid character 'T' looking for beginning of value\n\tline: auto-detection not supported\n\tparquet: auto-detection requires seekable input\n\ttsv: line 1: EOF\n\tcsup: auto-detection requires seekable input\n\tzeek: line 1: bad types/fields definition in zeek header\n\tzjson: line 1: malformed ZJSON: bad type object: \"This is not a detectable format.\": unpacker error parsing JSON: invalid character 'T' looking for beginning of value\n\tbsup: malformed bsup record\n\tjsup: Super JSON syntax error"} code 400 {"type":"Error","kind":"invalid operation","error":"unsupported MIME type: unsupported"} code 400 diff --git a/service/ztests/curl-load-parquet.yaml b/service/ztests/curl-load-parquet.yaml index 227773812c..9b125d9f25 100644 --- a/service/ztests/curl-load-parquet.yaml +++ b/service/ztests/curl-load-parquet.yaml @@ -1,14 +1,14 @@ script: | source service.sh super db create -q test - super -f parquet in.zson | + super -f parquet in.jsup | curl -H Content-Type:application/x-parquet --data-binary @- \ --fail $SUPER_DB_LAKE/pool/test/branch/main | super -z -c commit:=0 - echo // super db query -z 'from test' inputs: - - name: in.zson + - name: in.jsup data: | {x:1} - name: service.sh diff --git a/service/ztests/curl-query.yaml b/service/ztests/curl-query.yaml index 9e4d6f6e4f..fcec8daf97 100644 --- a/service/ztests/curl-query.yaml +++ b/service/ztests/curl-query.yaml @@ -2,7 +2,7 @@ script: | source service.sh super db create -q test super db load -q -use test - - for accept in text/csv application/{json,x-ndjson,x-zeek,x-zjson,x-zson} ""; do + for accept in text/csv application/{json,x-ndjson,x-zeek,x-zjson,x-jsup} ""; do echo === $accept === curl -H "Accept: $accept" -d '{"query":"from test"}' $SUPER_DB_LAKE/query\?ctrl=true | sed -E '/QueryStats/s/[0-9]{3,}/xxx/g' # for ZJSON @@ -10,7 +10,7 @@ script: | echo === application/vnd.apache.arrow.stream === curl -H 'Accept: application/vnd.apache.arrow.stream' -d '{"query":"from test"}' $SUPER_DB_LAKE/query | super -z -i arrows - - for format in parquet vng; do + for format in parquet csup; do echo === application/x-$format === curl -H "Accept: application/x-$format" -d '{"query":"from test"}' -o out.$format $SUPER_DB_LAKE/query super -z out.$format @@ -50,7 +50,7 @@ outputs: {"type":{"kind":"ref","id":31},"value":["one",["two","three"]]} {"type":"QueryChannelEnd","value":{"channel":"main"}} {"type":"QueryStats","value":{"start_time":{"sec":xxx,"ns":xxx},"update_time":{"sec":xxx,"ns":xxx},"bytes_read":36,"bytes_matched":36,"records_read":2,"records_matched":2}} - === application/x-zson === + === application/x-jsup === {a:"hello",b:{c:"world",d:"goodbye"}} {a:"one",b:{c:"two",d:"three"}} === === @@ -62,6 +62,6 @@ outputs: === application/x-parquet === {a:"hello",b:{c:"world",d:"goodbye"}} {a:"one",b:{c:"two",d:"three"}} - === application/x-vng === + === application/x-csup === {a:"hello",b:{c:"world",d:"goodbye"}} {a:"one",b:{c:"two",d:"three"}} diff --git a/service/ztests/curl-stats.yaml b/service/ztests/curl-stats.yaml index d23fa1aaf2..efab62b30b 100644 --- a/service/ztests/curl-stats.yaml +++ b/service/ztests/curl-stats.yaml @@ -7,7 +7,7 @@ script: | inputs: - name: stdin - source: ../../testdata/babble.zson + source: ../../testdata/babble.jsup - name: service.sh outputs: diff --git a/service/ztests/delete.yaml b/service/ztests/delete.yaml index a499cbb952..f254c6144d 100644 --- a/service/ztests/delete.yaml +++ b/service/ztests/delete.yaml @@ -1,9 +1,9 @@ script: | source service.sh super db create -use -q -orderby x:desc test - super db load -q 1.zson + super db load -q 1.jsup id=$(super db query -f text "from test@main:objects | cut id:=ksuid(id) | tail 1") - super db load -q 2.zson + super db load -q 2.jsup super db query -z "*" echo === | tee /dev/stderr super db delete -q $id @@ -13,9 +13,9 @@ script: | inputs: - name: service.sh - - name: 1.zson + - name: 1.jsup data: "{x:1}" - - name: 2.zson + - name: 2.jsup data: "{x:2}" outputs: diff --git a/service/ztests/drop.yaml b/service/ztests/drop.yaml index fc5fb9e4a3..6f6c8902db 100644 --- a/service/ztests/drop.yaml +++ b/service/ztests/drop.yaml @@ -5,7 +5,7 @@ script: | super db create -q p3 super db drop -f p3 echo === | tee /dev/stderr - super db ls -f zng | super -z -c "cut name | sort name" - + super db ls -f bsup | super -z -c "cut name | sort name" - echo === | tee /dev/stderr ! super db drop p3 ! super db drop -lake http://127.0.0.1:1 p3 diff --git a/service/ztests/issue-2784.yaml b/service/ztests/issue-2784.yaml index e76fda1109..6622aeb8cf 100644 --- a/service/ztests/issue-2784.yaml +++ b/service/ztests/issue-2784.yaml @@ -1,17 +1,17 @@ script: | source service.sh super db create -q test - super db load -q -use test a.zson - super db load -q -use test b.zson + super db load -q -use test a.jsup + super db load -q -use test b.jsup super db query -z "from test@main:objects | sort min | {min,max}" inputs: - name: service.sh source: service.sh - - name: a.zson + - name: a.jsup data: | {ts:1} - - name: b.zson + - name: b.jsup data: | {ts:2} diff --git a/service/ztests/load-garbage.yaml b/service/ztests/load-garbage.yaml index 926b0f3056..44b082b32b 100644 --- a/service/ztests/load-garbage.yaml +++ b/service/ztests/load-garbage.yaml @@ -19,10 +19,10 @@ outputs: line: auto-detection not supported parquet: auto-detection requires seekable input tsv: line 1: delimiter '\t' not found - vng: auto-detection requires seekable input + csup: auto-detection requires seekable input zeek: line 1: bad types/fields definition in zeek header zjson: line 1: malformed ZJSON: bad type object: "This file contains no records.": unpacker error parsing JSON: invalid character 'T' looking for beginning of value - zng: malformed zng record - zson: ZSON syntax error + bsup: malformed bsup record + jsup: Super JSON syntax error status code 400: no records in request diff --git a/service/ztests/load.yaml b/service/ztests/load.yaml index 073a41af10..b413dfd42a 100644 --- a/service/ztests/load.yaml +++ b/service/ztests/load.yaml @@ -1,10 +1,10 @@ script: | source service.sh super db create -q test - super db load -use test in.zson + super db load -use test in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {x:1} - name: service.sh diff --git a/service/ztests/log.yaml b/service/ztests/log.yaml index 50efdec6f8..f1b0bc0c8d 100644 --- a/service/ztests/log.yaml +++ b/service/ztests/log.yaml @@ -1,17 +1,17 @@ script: | source service.sh super db create -use -q test - super db load -user testuser -q 1.zson - super db load -user testuser -q 2.zson + super db load -user testuser -q 1.jsup + super db load -user testuser -q 2.jsup super db log inputs: - name: service.sh source: service.sh - - name: 1.zson + - name: 1.jsup data: | {x:1} - - name: 2.zson + - name: 2.jsup data: | {x:2} diff --git a/service/ztests/ls-pools.yaml b/service/ztests/ls-pools.yaml index 2c4ddfb17d..c835f70b34 100644 --- a/service/ztests/ls-pools.yaml +++ b/service/ztests/ls-pools.yaml @@ -9,9 +9,9 @@ script: | echo === # Verify that output flags are honored. - super db ls -f zson | super -i zson -f zson -c "cut name | sort name" - + super db ls -f jsup | super -i jsup -f jsup -c "cut name | sort name" - echo === - super db ls -f zng | super -i zng -f table -c "cut name | sort name" - + super db ls -f bsup | super -i bsup -f table -c "cut name | sort name" - echo === inputs: diff --git a/service/ztests/ls-segments.yaml b/service/ztests/ls-segments.yaml index ff200d5900..f826b8e172 100644 --- a/service/ztests/ls-segments.yaml +++ b/service/ztests/ls-segments.yaml @@ -1,17 +1,17 @@ script: | source service.sh super db create -q test - super db load -q -use test 1.zson - super db load -q -use test 2.zson + super db load -q -use test 1.jsup + super db load -q -use test 2.jsup super db query -f lake "from test@main:objects" inputs: - name: service.sh source: service.sh - - name: 1.zson + - name: 1.jsup data: | {x:1} - - name: 2.zson + - name: 2.jsup data: | {x:2} diff --git a/service/ztests/merge.yaml b/service/ztests/merge.yaml index 97f5705e77..9a6a91132c 100644 --- a/service/ztests/merge.yaml +++ b/service/ztests/merge.yaml @@ -1,19 +1,19 @@ script: | source service.sh super db create -q POOL - super db load -q -use POOL a.zson + super db load -q -use POOL a.jsup super db branch -q -use POOL child - super db load -q -use POOL@child b.zson + super db load -q -use POOL@child b.jsup super db query -z "from POOL | sort this" echo === super db merge -q -use POOL@child main super db query -z "from POOL | sort this" inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:1} - name: service.sh diff --git a/service/ztests/python.yaml b/service/ztests/python.yaml index c5e6d77cf5..5920f137d1 100644 --- a/service/ztests/python.yaml +++ b/service/ztests/python.yaml @@ -13,7 +13,7 @@ script: | import superdb c = superdb.Client('$SUPER_DB_LAKE') c.create_pool('test') - with open('in.zson') as f: + with open('in.jsup') as f: c.load('test', f) for rec in c.query('from test'): print(rec) @@ -36,7 +36,7 @@ script: | EOF inputs: - - name: in.zson + - name: in.jsup data: | { u8: 0 (myuint8=uint8), diff --git a/service/ztests/query-csv-error.yaml b/service/ztests/query-csv-error.yaml index dfdbd309b6..9c22b9b52d 100644 --- a/service/ztests/query-csv-error.yaml +++ b/service/ztests/query-csv-error.yaml @@ -1,13 +1,13 @@ script: | source service.sh super db create -q test - super db load -q -use test in.zson + super db load -q -use test in.jsup ! super db query -f csv "from test" inputs: - name: service.sh source: service.sh - - name: in.zson + - name: in.jsup data: | {a:"hello"} {b:123} diff --git a/service/ztests/query-csv.yaml b/service/ztests/query-csv.yaml index 7e5a843770..019e4267be 100644 --- a/service/ztests/query-csv.yaml +++ b/service/ztests/query-csv.yaml @@ -1,13 +1,13 @@ script: | source service.sh super db create -q test - super db load -q -use test in.zson + super db load -q -use test in.jsup super db query -f csv "from test" inputs: - name: service.sh source: service.sh - - name: in.zson + - name: in.jsup data: | {a:"hello",b:{c:"world",d:"goodbye"}} diff --git a/service/ztests/query-stats.yaml b/service/ztests/query-stats.yaml index a21ed63a33..5e3a4e60dc 100644 --- a/service/ztests/query-stats.yaml +++ b/service/ztests/query-stats.yaml @@ -1,14 +1,14 @@ script: | source service.sh super db create -q test - super db load -q -use test babble.zson + super db load -q -use test babble.jsup super db query -s -z "from test | count()" inputs: - name: service.sh source: service.sh - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stdout diff --git a/service/ztests/revert.yaml b/service/ztests/revert.yaml index 4189e366c3..5ea492d71e 100644 --- a/service/ztests/revert.yaml +++ b/service/ztests/revert.yaml @@ -1,8 +1,8 @@ script: | source service.sh super db create -q test - a=$(super db load -use test a.zson | head -1 | awk '{print $1}') - b=$(super db load -use test b.zson | head -1 | awk '{print $1}') + a=$(super db load -use test a.jsup | head -1 | awk '{print $1}') + b=$(super db load -use test b.jsup | head -1 | awk '{print $1}') super db query -z "from test | sort this" super db revert -q -use test $a echo === @@ -12,10 +12,10 @@ script: | super db query -z "from test | sort this" inputs: - - name: a.zson + - name: a.jsup data: | {a:1} - - name: b.zson + - name: b.jsup data: | {b:1} - name: service.sh diff --git a/service/ztests/s3/s3root.yaml b/service/ztests/s3/s3root.yaml index 074d3cc369..46a54235b7 100644 --- a/service/ztests/s3/s3root.yaml +++ b/service/ztests/s3/s3root.yaml @@ -4,15 +4,15 @@ script: | source services.sh s3://bucket/lake super db new -S 20KiB test super db use -q test - super db post babble.zson >/dev/null + super db post babble.jsup >/dev/null echo === super db info | egrep -v 'id' echo === super db get -z 's=="harefoot-raucous"' inputs: - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup - name: services.sh source: ../services.sh diff --git a/service/ztests/s3/search.yaml b/service/ztests/s3/search.yaml index 0d3227f7a1..78c864bc52 100644 --- a/service/ztests/s3/search.yaml +++ b/service/ztests/s3/search.yaml @@ -4,13 +4,13 @@ script: | source services.sh s3://bucket/lake super db new -S 20KiB test super db use test -q - super db post babble.zson >/dev/null + super db post babble.jsup >/dev/null echo === super db get -z 's=="harefoot-raucous"' inputs: - - name: babble.zson - source: ../../../testdata/babble.zson + - name: babble.jsup + source: ../../../testdata/babble.jsup - name: services.sh source: ../services.sh diff --git a/service/ztests/seek-index-null.yaml b/service/ztests/seek-index-null.yaml index ddab5c4c3e..f4230a4a72 100644 --- a/service/ztests/seek-index-null.yaml +++ b/service/ztests/seek-index-null.yaml @@ -3,15 +3,15 @@ script: | for o in asc desc; do echo // $o | tee /dev/stderr super db create -q -seekstride=2KB -orderby ts:$o $o - super db load -q -use $o babble.zson null.zson + super db load -q -use $o babble.jsup null.jsup super db query -z -s -use $o "ts >= 2020-04-21T23:59:26.063Z and ts <= 2020-04-21T23:59:38.069Z" done inputs: - name: service.sh - - name: babble.zson - source: ../../testdata/babble.zson - - name: null.zson + - name: babble.jsup + source: ../../testdata/babble.jsup + - name: null.jsup data: | {ts:null(time),s:"foo-bar",v:1} diff --git a/service/ztests/seek-index-overlap.yaml b/service/ztests/seek-index-overlap.yaml index 5be0c42e00..15f139d8e5 100644 --- a/service/ztests/seek-index-overlap.yaml +++ b/service/ztests/seek-index-overlap.yaml @@ -3,19 +3,19 @@ script: | super db create -seekstride 2KB -orderby ts:asc -q asc super db create -seekstride 2KB -orderby ts:desc -q desc super db use -q asc - super -c "tail 900" babble.zson | super db load -q - - super -c "head 250" babble.zson | super db load -q - + super -c "tail 900" babble.jsup | super db load -q - + super -c "head 250" babble.jsup | super db load -q - super db query -z -s "from asc | count()" echo === | tee /dev/stderr super db use -q desc - super -c "tail 900" babble.zson | super db load -q - - super -c "head 250" babble.zson | super db load -q - + super -c "tail 900" babble.jsup | super db load -q - + super -c "head 250" babble.jsup | super db load -q - super db query -z -s "from desc | count()" inputs: - name: service.sh - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup outputs: - name: stdout diff --git a/service/ztests/seek-index.yaml b/service/ztests/seek-index.yaml index b047938f16..557a1bbdd5 100644 --- a/service/ztests/seek-index.yaml +++ b/service/ztests/seek-index.yaml @@ -3,7 +3,7 @@ script: | for o in asc desc; do echo // $o | tee /dev/stderr super db create -use -seekstride 2KB -orderby ts:$o -q $o - super db load -q babble.zson + super db load -q babble.jsup source query.sh "ts >= 2020-04-21T23:59:26.063Z and ts <= 2020-04-21T23:59:38.069Z" source query.sh "ts == 2020-04-21T23:59:26.06326664Z" source query.sh "ts == 2020-04-21T23:59:26.06326664Z or foo == 'bar'" @@ -11,8 +11,8 @@ script: | inputs: - name: service.sh - - name: babble.zson - source: ../../testdata/babble.zson + - name: babble.jsup + source: ../../testdata/babble.jsup - name: query.sh data: | echo // $1 | tee /dev/stderr diff --git a/service/ztests/vector.yaml b/service/ztests/vector.yaml index 4f953c5d9d..d292ee496f 100644 --- a/service/ztests/vector.yaml +++ b/service/ztests/vector.yaml @@ -1,7 +1,7 @@ script: | source service.sh super db create -use -q POOL - super db load -q in.zson + super db load -q in.jsup id=$(super db query -f text 'from POOL@main:objects | yield ksuid(id)') super db vector add -q $id super db query -Z 'from POOL@main:vectors | drop id' @@ -12,7 +12,7 @@ script: | inputs: - name: service.sh - - name: in.zson + - name: in.jsup data: | {x:1} {s:"hello",a:[1,2,3]} diff --git a/testdata/babble-sorted.zson b/testdata/babble-sorted.jsup similarity index 100% rename from testdata/babble-sorted.zson rename to testdata/babble-sorted.jsup diff --git a/testdata/babble-split1.zson b/testdata/babble-split1.jsup similarity index 100% rename from testdata/babble-split1.zson rename to testdata/babble-split1.jsup diff --git a/testdata/babble-split2.zson b/testdata/babble-split2.jsup similarity index 100% rename from testdata/babble-split2.zson rename to testdata/babble-split2.jsup diff --git a/testdata/babble.zson b/testdata/babble.jsup similarity index 100% rename from testdata/babble.zson rename to testdata/babble.jsup diff --git a/vng/ztests/array.yaml b/vng/ztests/array.yaml index e628af3353..589399c85a 100644 --- a/vng/ztests/array.yaml +++ b/vng/ztests/array.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/const.yaml b/vng/ztests/const.yaml index a3b999974e..fcf7f7e9ea 100644 --- a/vng/ztests/const.yaml +++ b/vng/ztests/const.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super dev vng -z out.vng + super -f csup -o out.csup - + super dev csup -z out.csup inputs: - name: stdin diff --git a/vng/ztests/create.yaml b/vng/ztests/create.yaml index 7386a11056..9079a69d98 100644 --- a/vng/ztests/create.yaml +++ b/vng/ztests/create.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/dict.yaml b/vng/ztests/dict.yaml index 5d79e2921c..859e758bfe 100644 --- a/vng/ztests/dict.yaml +++ b/vng/ztests/dict.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super dev vng out.vng | super -Z -c "over Fields | yield Values.Dict" - + super -f csup -o out.csup - + super dev csup out.csup | super -Z -c "over Fields | yield Values.Dict" - inputs: - name: stdin diff --git a/vng/ztests/empty-file.yaml b/vng/ztests/empty-file.yaml index dd7cc30f7a..d8bc174c21 100644 --- a/vng/ztests/empty-file.yaml +++ b/vng/ztests/empty-file.yaml @@ -1,5 +1,5 @@ script: | - ! super -i vng /dev/null + ! super -i csup /dev/null outputs: - name: stderr diff --git a/vng/ztests/issue-4074.yaml b/vng/ztests/issue-4074.yaml index 4026bd908f..9c9594b59e 100644 --- a/vng/ztests/issue-4074.yaml +++ b/vng/ztests/issue-4074.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/map.yaml b/vng/ztests/map.yaml index ad5f0e3274..34c7555eaf 100644 --- a/vng/ztests/map.yaml +++ b/vng/ztests/map.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/no-dict.yaml b/vng/ztests/no-dict.yaml index 851560345f..c79308baf2 100644 --- a/vng/ztests/no-dict.yaml +++ b/vng/ztests/no-dict.yaml @@ -1,6 +1,6 @@ script: | - seq 1000 | super -f vng -o out.vng -c "{x:this}" - - super dev vng out.vng | super -Z -c "over Fields | yield Values.Dict" - + seq 1000 | super -f csup -o out.csup -c "{x:this}" - + super dev csup out.csup | super -Z -c "over Fields | yield Values.Dict" - outputs: - name: stdout diff --git a/vng/ztests/presence.yaml b/vng/ztests/presence.yaml index c731f42e08..36ac592e34 100644 --- a/vng/ztests/presence.yaml +++ b/vng/ztests/presence.yaml @@ -1,18 +1,18 @@ script: | - super -f vng -o o1.vng p1.zson - super -z -o o1.zson o1.vng - super -f vng -o o2.vng p2.zson - super -z -o o2.zson o2.vng - super -f vng -o o3.vng p3.zson - super -z -o o3.zson o3.vng - super -f vng -o o4.vng p4.zson - super -z -o o4.zson o4.vng + super -f csup -o o1.csup p1.jsup + super -z -o o1.jsup o1.csup + super -f csup -o o2.csup p2.jsup + super -z -o o2.jsup o2.csup + super -f csup -o o3.csup p3.jsup + super -z -o o3.jsup o3.csup + super -f csup -o o4.csup p4.jsup + super -z -o o4.jsup o4.csup inputs: - - name: p1.zson + - name: p1.jsup data: | {s:null(string)} - - name: p2.zson + - name: p2.jsup data: | {s:null(string)} {s:null(string)} @@ -25,7 +25,7 @@ inputs: {s:null(string)} {s:null(string)} {s:null(string)} - - name: p3.zson + - name: p3.jsup data: | {s:null(string)} {s:null(string)} @@ -38,7 +38,7 @@ inputs: {s:null(string)} {s:null(string)} {s:"x"} - - name: p4.zson + - name: p4.jsup data: | {s:"x"} {s:"x"} @@ -53,10 +53,10 @@ inputs: {s:null(string)} outputs: - - name: o1.zson + - name: o1.jsup data: | {s:null(string)} - - name: o2.zson + - name: o2.jsup data: | {s:null(string)} {s:null(string)} @@ -69,7 +69,7 @@ outputs: {s:null(string)} {s:null(string)} {s:null(string)} - - name: o3.zson + - name: o3.jsup data: | {s:null(string)} {s:null(string)} @@ -82,7 +82,7 @@ outputs: {s:null(string)} {s:null(string)} {s:"x"} - - name: o4.zson + - name: o4.jsup data: | {s:"x"} {s:"x"} diff --git a/vng/ztests/type-change.yaml b/vng/ztests/type-change.yaml index 42343cacee..2db24a8a06 100644 --- a/vng/ztests/type-change.yaml +++ b/vng/ztests/type-change.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/typedef.yaml b/vng/ztests/typedef.yaml index 48f56dd2f3..d840ffa286 100644 --- a/vng/ztests/typedef.yaml +++ b/vng/ztests/typedef.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/union.yaml b/vng/ztests/union.yaml index 6f48c4c314..6325f2a31c 100644 --- a/vng/ztests/union.yaml +++ b/vng/ztests/union.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/vng/ztests/vals.yaml b/vng/ztests/vals.yaml index 0c1fd0cc15..65547def8c 100644 --- a/vng/ztests/vals.yaml +++ b/vng/ztests/vals.yaml @@ -1,6 +1,6 @@ script: | - super -f vng -o out.vng - - super -z out.vng + super -f csup -o out.csup - + super -z out.csup inputs: - name: stdin diff --git a/zed_test.go b/zed_test.go index 0f9b13dc80..4b3519b1e5 100644 --- a/zed_test.go +++ b/zed_test.go @@ -35,10 +35,10 @@ func TestZed(t *testing.T) { data, err := loadZTestInputsAndOutputs(dirs) require.NoError(t, err) runAllBoomerangs(t, "arrows", data) + runAllBoomerangs(t, "csup", data) + runAllBoomerangs(t, "jsup", data) runAllBoomerangs(t, "parquet", data) - runAllBoomerangs(t, "vng", data) runAllBoomerangs(t, "zjson", data) - runAllBoomerangs(t, "zson", data) }) for d := range dirs { diff --git a/zio/anyio/lookup.go b/zio/anyio/lookup.go index 235997c7cd..c6c0de53c2 100644 --- a/zio/anyio/lookup.go +++ b/zio/anyio/lookup.go @@ -23,8 +23,18 @@ func lookupReader(zctx *super.Context, r io.Reader, demandOut demand.Demand, opt switch opts.Format { case "arrows": return arrowio.NewReader(zctx, r) + case "bsup": + return zngio.NewReaderWithOpts(zctx, r, opts.ZNG), nil + case "csup": + zr, err := vngio.NewReader(zctx, r, demandOut) + if err != nil { + return nil, err + } + return zio.NopReadCloser(zr), nil case "csv": return zio.NopReadCloser(csvio.NewReader(zctx, r, opts.CSV)), nil + case "jsup": + return zio.NopReadCloser(zsonio.NewReader(zctx, r)), nil case "line": return zio.NopReadCloser(lineio.NewReader(r)), nil case "json": @@ -38,20 +48,10 @@ func lookupReader(zctx *super.Context, r io.Reader, demandOut demand.Demand, opt case "tsv": opts.CSV.Delim = '\t' return zio.NopReadCloser(csvio.NewReader(zctx, r, opts.CSV)), nil - case "vng": - zr, err := vngio.NewReader(zctx, r, demandOut) - if err != nil { - return nil, err - } - return zio.NopReadCloser(zr), nil case "zeek": return zio.NopReadCloser(zeekio.NewReader(zctx, r)), nil case "zjson": return zio.NopReadCloser(zjsonio.NewReader(zctx, r)), nil - case "zng": - return zngio.NewReaderWithOpts(zctx, r, opts.ZNG), nil - case "zson": - return zio.NopReadCloser(zsonio.NewReader(zctx, r)), nil } return nil, fmt.Errorf("no such format: \"%s\"", opts.Format) } diff --git a/zio/anyio/reader.go b/zio/anyio/reader.go index edf4932f04..aa36d9c93d 100644 --- a/zio/anyio/reader.go +++ b/zio/anyio/reader.go @@ -60,10 +60,10 @@ func NewReaderWithOpts(zctx *super.Context, r io.Reader, demandOut demand.Demand vngErr = err } parquetErr = fmt.Errorf("parquet: %w", parquetErr) - vngErr = fmt.Errorf("vng: %w", vngErr) + vngErr = fmt.Errorf("csup: %w", vngErr) } else { parquetErr = errors.New("parquet: auto-detection requires seekable input") - vngErr = errors.New("vng: auto-detection requires seekable input") + vngErr = errors.New("csup: auto-detection requires seekable input") } track := NewTrack(r) @@ -97,7 +97,7 @@ func NewReaderWithOpts(zctx *super.Context, r io.Reader, demandOut demand.Demand } track.Reset() - zsonErr := match(zsonio.NewReader(super.NewContext(), track), "zson", 1) + zsonErr := match(zsonio.NewReader(super.NewContext(), track), "jsup", 1) if zsonErr == nil { return zio.NopReadCloser(zsonio.NewReader(zctx, track.Reader())), nil } @@ -109,7 +109,7 @@ func NewReaderWithOpts(zctx *super.Context, r io.Reader, demandOut demand.Demand zngOpts := opts.ZNG zngOpts.Validate = true zngReader := zngio.NewReaderWithOpts(super.NewContext(), track, zngOpts) - zngErr := match(zngReader, "zng", 1) + zngErr := match(zngReader, "bsup", 1) // Close zngReader to ensure that it does not continue to call track.Read. zngReader.Close() if zngErr == nil { diff --git a/zio/anyio/writer.go b/zio/anyio/writer.go index 0230931497..df01732ef1 100644 --- a/zio/anyio/writer.go +++ b/zio/anyio/writer.go @@ -33,8 +33,17 @@ func NewWriter(w io.WriteCloser, opts WriterOpts) (zio.WriteCloser, error) { switch opts.Format { case "arrows": return arrowio.NewWriter(w), nil + case "bsup": + if opts.ZNG == nil { + return zngio.NewWriter(w), nil + } + return zngio.NewWriterWithOpts(w, *opts.ZNG), nil + case "csup": + return vngio.NewWriter(w), nil case "csv": return csvio.NewWriter(w, opts.CSV), nil + case "jsup", "": + return zsonio.NewWriter(w, opts.ZSON), nil case "json": return jsonio.NewWriter(w, opts.JSON), nil case "lake": @@ -50,19 +59,10 @@ func NewWriter(w io.WriteCloser, opts WriterOpts) (zio.WriteCloser, error) { case "tsv": opts.CSV.Delim = '\t' return csvio.NewWriter(w, opts.CSV), nil - case "vng": - return vngio.NewWriter(w), nil case "zeek": return zeekio.NewWriter(w), nil case "zjson": return zjsonio.NewWriter(w), nil - case "zng": - if opts.ZNG == nil { - return zngio.NewWriter(w), nil - } - return zngio.NewWriterWithOpts(w, *opts.ZNG), nil - case "zson", "": - return zsonio.NewWriter(w, opts.ZSON), nil default: return nil, fmt.Errorf("unknown format: %s", opts.Format) } diff --git a/zio/anyio/ztests/zng-gz.yaml b/zio/anyio/ztests/bsup-gz.yaml similarity index 100% rename from zio/anyio/ztests/zng-gz.yaml rename to zio/anyio/ztests/bsup-gz.yaml diff --git a/zio/anyio/ztests/zng-rdwr-comp.yaml b/zio/anyio/ztests/bsup-rdwr-comp.yaml similarity index 92% rename from zio/anyio/ztests/zng-rdwr-comp.yaml rename to zio/anyio/ztests/bsup-rdwr-comp.yaml index 08d7961ff5..5e13039a39 100644 --- a/zio/anyio/ztests/zng-rdwr-comp.yaml +++ b/zio/anyio/ztests/bsup-rdwr-comp.yaml @@ -1,12 +1,12 @@ script: | - super -zng.compress=false -o uncomp.zng in.zson - super -o comp.zng in.zson - super -z uncomp.zng + super -bsup.compress=false -o uncomp.bsup in.jsup + super -o comp.bsup in.jsup + super -z uncomp.bsup echo === - super -z comp.zng + super -z comp.bsup inputs: - - name: in.zson + - name: in.jsup data: | {_path:"ssl",ts:2017-03-24T19:59:23.053424Z,uid:"CfEBop2hbfJYpjG5Hd",id:{orig_h:10.10.7.90,orig_p:51913(port=uint16),resp_h:54.230.87.24,resp_p:443(port)},version:"TLSv12",cipher:"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",curve:null(string),server_name:"choices.truste.com",resumed:true,last_alert:null(string),next_protocol:"http/1.1",established:true,cert_chain_fuids:null([string]),client_cert_chain_fuids:null([string]),subject:null(string),issuer:null(string),client_subject:null(string),client_issuer:null(string),validation_status:null(string)} diff --git a/zio/anyio/ztests/vng.yaml b/zio/anyio/ztests/csup.yaml similarity index 84% rename from zio/anyio/ztests/vng.yaml rename to zio/anyio/ztests/csup.yaml index 6b418256a0..f01654f3fb 100644 --- a/zio/anyio/ztests/vng.yaml +++ b/zio/anyio/ztests/csup.yaml @@ -1,5 +1,5 @@ script: | - super -f vng -o f - + super -f csup -o f - super -z f inputs: diff --git a/zio/anyio/ztests/detector-errors.yaml b/zio/anyio/ztests/detector-errors.yaml index ed66bfa40b..95f26f3c6b 100644 --- a/zio/anyio/ztests/detector-errors.yaml +++ b/zio/anyio/ztests/detector-errors.yaml @@ -8,4 +8,4 @@ inputs: outputs: - name: stderr - regexp: 'csv:(.|\s)+json:(.|\s)+parquet:(.|\s)+vng:' + regexp: 'csv:(.|\s)+json:(.|\s)+parquet:(.|\s)+csup:' diff --git a/zio/anyio/ztests/fake-zng.yaml b/zio/anyio/ztests/fake-zng.yaml index 54303ed8c6..fb027f5299 100644 --- a/zio/anyio/ztests/fake-zng.yaml +++ b/zio/anyio/ztests/fake-zng.yaml @@ -1,5 +1,5 @@ script: | - ! super -i zng -z - + ! super -i bsup -z - inputs: - name: stdin @@ -9,4 +9,4 @@ inputs: outputs: - name: stderr data: | - stdio:stdin: malformed zng record + stdio:stdin: malformed bsup record diff --git a/zio/anyio/ztests/huge.yaml b/zio/anyio/ztests/huge.yaml index 6a78fae803..907d37819e 100644 --- a/zio/anyio/ztests/huge.yaml +++ b/zio/anyio/ztests/huge.yaml @@ -1,8 +1,8 @@ script: | - ! yes ' ' | head -c $((11 * 1024 * 1024)) > huge.zson - echo 0 >> huge.zson - super -z huge.zson - ! cat huge.zson | super -z - + ! yes ' ' | head -c $((11 * 1024 * 1024)) > huge.jsup + echo 0 >> huge.jsup + super -z huge.jsup + ! cat huge.jsup | super -z - outputs: - name: stdout @@ -17,8 +17,8 @@ outputs: line: auto-detection not supported parquet: auto-detection requires seekable input tsv: line 1: delimiter '\t' not found - vng: auto-detection requires seekable input + csup: auto-detection requires seekable input zeek: line 1: bad types/fields definition in zeek header zjson: line 1: malformed ZJSON: bad type object: "": unpacker error parsing JSON: unexpected end of JSON input - zng: buffer exceeded max size trying to infer input format - zson: buffer exceeded max size trying to infer input format + bsup: buffer exceeded max size trying to infer input format + jsup: buffer exceeded max size trying to infer input format diff --git a/zio/anyio/ztests/zson.yaml b/zio/anyio/ztests/jsup.yaml similarity index 100% rename from zio/anyio/ztests/zson.yaml rename to zio/anyio/ztests/jsup.yaml diff --git a/zio/emitter/split_test.go b/zio/emitter/split_test.go index 6ef76a3b96..5b3d202b6c 100644 --- a/zio/emitter/split_test.go +++ b/zio/emitter/split_test.go @@ -28,14 +28,14 @@ func TestDirS3Source(t *testing.T) { defer ctrl.Finish() engine := storagemock.NewMockEngine(ctrl) - engine.EXPECT().Put(context.Background(), uri.JoinPath("conn.zson")). + engine.EXPECT().Put(context.Background(), uri.JoinPath("conn.jsup")). Return(zio.NopCloser(bytes.NewBuffer(nil)), nil) - engine.EXPECT().Put(context.Background(), uri.JoinPath("http.zson")). + engine.EXPECT().Put(context.Background(), uri.JoinPath("http.jsup")). Return(zio.NopCloser(bytes.NewBuffer(nil)), nil) r := zsonio.NewReader(super.NewContext(), strings.NewReader(input)) require.NoError(t, err) - w, err := NewSplit(context.Background(), engine, uri, "", false, anyio.WriterOpts{Format: "zson"}) + w, err := NewSplit(context.Background(), engine, uri, "", false, anyio.WriterOpts{Format: "jsup"}) require.NoError(t, err) require.NoError(t, zio.Copy(w, r)) } diff --git a/zio/emitter/ztests/trunc.yaml b/zio/emitter/ztests/trunc.yaml index a87eea25bc..e1f751a3c4 100644 --- a/zio/emitter/ztests/trunc.yaml +++ b/zio/emitter/ztests/trunc.yaml @@ -1,13 +1,13 @@ script: | - super - | super -z -o out.zson long.zson - super - | super -z -o out.zson short.zson - super -z out.zson + super - | super -z -o out.jsup long.jsup + super - | super -z -o out.jsup short.jsup + super -z out.jsup inputs: - - name: short.zson + - name: short.jsup data: | {a:"hello"} - - name: long.zson + - name: long.jsup data: | {a:"hello"} {a:"there"} diff --git a/zio/jsonio/ztests/test.yaml b/zio/jsonio/ztests/test.yaml index 7b6d8dd8a2..74f65ed7d5 100644 --- a/zio/jsonio/ztests/test.yaml +++ b/zio/jsonio/ztests/test.yaml @@ -1,4 +1,4 @@ -script: super -i json -f zng - | super -f json - +script: super -i json -f bsup - | super -f json - inputs: - name: stdin diff --git a/zio/lakeio/ztests/keyrange.yaml b/zio/lakeio/ztests/keyrange.yaml index 71709a0268..79e11323b0 100644 --- a/zio/lakeio/ztests/keyrange.yaml +++ b/zio/lakeio/ztests/keyrange.yaml @@ -2,12 +2,12 @@ script: | export SUPER_DB_LAKE=test super db init -q super db create -orderby a POOL - super db load -q -use POOL in.zson + super db load -q -use POOL in.jsup super db query -z "from POOL@main:rawlog" super db log -use POOL inputs: - - name: in.zson + - name: in.jsup data: | {a:1} {a:2} diff --git a/zio/vngio/reader.go b/zio/vngio/reader.go index ce1bb38bf3..e0667ff8dc 100644 --- a/zio/vngio/reader.go +++ b/zio/vngio/reader.go @@ -13,7 +13,7 @@ import ( func NewReader(zctx *super.Context, r io.Reader, demandOut demand.Demand) (zio.Reader, error) { ra, ok := r.(io.ReaderAt) if !ok { - return nil, errors.New("VNG requires a seekable input") + return nil, errors.New("Super Columnar requires a seekable input") } o, err := vng.NewObject(ra) if err != nil { diff --git a/zio/vngio/ztests/stdin-error.yaml b/zio/vngio/ztests/stdin-error.yaml index c740d46440..ff41cbd1f0 100644 --- a/zio/vngio/ztests/stdin-error.yaml +++ b/zio/vngio/ztests/stdin-error.yaml @@ -1,9 +1,9 @@ script: | - super -f vng -o t.vng in.zson - ! cat t.vng | super -i vng - + super -f csup -o t.csup in.jsup + ! cat t.csup | super -i csup - inputs: - - name: in.zson + - name: in.jsup data: | ["hello"(=bar),"world"(bar)] {a:["hello"(=bar),"world"(bar)]} @@ -11,4 +11,4 @@ inputs: outputs: - name: stderr data: | - stdio:stdin: VNG requires a seekable input + stdio:stdin: Super Columnar requires a seekable input diff --git a/zio/zio.go b/zio/zio.go index 4ff09bbf80..490898256f 100644 --- a/zio/zio.go +++ b/zio/zio.go @@ -10,26 +10,26 @@ import ( func Extension(format string) string { switch format { - case "zeek": - return ".log" - case "json": - return ".json" - case "zjson": - return ".ndjson" - case "text": - return ".txt" - case "table": - return ".tbl" - case "zng": - return ".zng" - case "zson": - return ".zson" + case "bsup": + return ".bsup" + case "csup": + return ".csup" case "csv": return ".csv" - case "vng": - return ".vng" + case "json": + return ".json" + case "jsup": + return ".jsup" case "parquet": return ".parquet" + case "table": + return ".tbl" + case "text": + return ".txt" + case "zeek": + return ".log" + case "zjson": + return ".ndjson" default: return "" } diff --git a/zio/zjsonio/ztests/enum.yaml b/zio/zjsonio/ztests/enum.yaml index 3b92e293fd..64d521e4cf 100644 --- a/zio/zjsonio/ztests/enum.yaml +++ b/zio/zjsonio/ztests/enum.yaml @@ -1,8 +1,8 @@ script: | - super -f zjson in.zson | super -z -i zjson - + super -f zjson in.jsup | super -z -i zjson - inputs: - - name: in.zson + - name: in.jsup data: | {e:%foo(enum(foo,bar,baz))} {e:%bar(enum(foo,bar,baz))} diff --git a/zio/zjsonio/ztests/map.yaml b/zio/zjsonio/ztests/map.yaml index ea463e18ea..4228041b56 100644 --- a/zio/zjsonio/ztests/map.yaml +++ b/zio/zjsonio/ztests/map.yaml @@ -1,8 +1,8 @@ script: | - super -f zjson in.zson | super -z - + super -f zjson in.jsup | super -z - inputs: - - name: in.zson + - name: in.jsup data: &in | {m:|{"a":{a:1(int32),b:2(int32)},"b":{a:2(int32),b:3(int32)},"c":{a:3(int32),b:4(int32)}}|} diff --git a/zio/zngio/parser.go b/zio/zngio/parser.go index 00beb88e84..e47fcb6e13 100644 --- a/zio/zngio/parser.go +++ b/zio/zngio/parser.go @@ -11,7 +11,7 @@ import ( "github.com/brimdata/super/zcode" ) -var errBadFormat = errors.New("malformed zng record") +var errBadFormat = errors.New("malformed bsup record") // parser decodes the framing protocol for ZNG updating and resetting its // Zed type context in conformance with ZNG frames. diff --git a/zio/zngio/ztests/big-value.yaml b/zio/zngio/ztests/big-value.yaml index f632701a70..688276f984 100644 --- a/zio/zngio/ztests/big-value.yaml +++ b/zio/zngio/ztests/big-value.yaml @@ -1,14 +1,14 @@ script: | - super -o out.zng in.zson + super -o out.bsup in.jsup for i in {1..7}; do - cat out.zng out.zng out.zng out.zng > out2.zng - mv out2.zng out.zng + cat out.bsup out.bsup out.bsup out.bsup > out2.bsup + mv out2.bsup out.bsup done - super -zng.compress=false -o bigrow.zng -c "collect:=collect(s)" out.zng - ! super -i zng -o /dev/null -zng.readmax 10KB -c "count:=count()" bigrow.zng + super -bsup.compress=false -o bigrow.bsup -c "collect:=collect(s)" out.bsup + ! super -i bsup -o /dev/null -bsup.readmax 10KB -c "count:=count()" bigrow.bsup inputs: - - name: in.zson + - name: in.jsup data: | {s:"big data"} {s:"too big"} @@ -16,4 +16,4 @@ inputs: outputs: - name: stderr data: | - bigrow.zng: zngio: frame length (278535) exceeds maximum allowed (10000) + bigrow.bsup: zngio: frame length (278535) exceeds maximum allowed (10000) diff --git a/zio/zngio/ztests/esc-typeid.yaml b/zio/zngio/ztests/esc-typeid.yaml index 0c547e1d2d..8085a70c81 100644 --- a/zio/zngio/ztests/esc-typeid.yaml +++ b/zio/zngio/ztests/esc-typeid.yaml @@ -1,7 +1,7 @@ -script: super in.zson | super -z - +script: super in.jsup | super -z - inputs: - - name: in.zson + - name: in.jsup data: &input | {f0:0} {f1:1} diff --git a/zio/zngio/ztests/issue-4082.yaml b/zio/zngio/ztests/issue-4082.yaml index 124ea8c7d6..134e906083 100644 --- a/zio/zngio/ztests/issue-4082.yaml +++ b/zio/zngio/ztests/issue-4082.yaml @@ -1,9 +1,9 @@ script: | - ! super -i zng - + ! super -i bsup - inputs: - name: stdin - # Generated with `bash -c 'zq -f vng -o f.vng - <<<"[1,2]" && base64 -b 70 f.vng'`. + # Generated with `bash -c 'zq -f csup -o f.csup - <<<"[1,2]" && base64 -b 70 f.csup'`. data: !!binary | AgQCAgIEAQUFAAIGT2Zmc2V0CQZMZW5ndGgIBwdTZWdtZW50HgEfAAIEVHlwZRwGU2VnbW FwIAcJUHJpbWl0aXZlIQACB0xlbmd0aHMgBlZhbHVlcyIHBUFycmF5IxcBIAYFAgwCAiQP diff --git a/zio/zngio/ztests/primitive.yaml b/zio/zngio/ztests/primitive.yaml index 44c492bdfc..d717de4bc9 100644 --- a/zio/zngio/ztests/primitive.yaml +++ b/zio/zngio/ztests/primitive.yaml @@ -1,5 +1,5 @@ script: | - super -i zson - | super -i zng -z - + super -i jsup - | super -i bsup -z - inputs: - name: stdin diff --git a/zio/zngio/ztests/zctx-named-reset-2.yaml b/zio/zngio/ztests/zctx-named-reset-2.yaml index eabfaa5835..734a630c69 100644 --- a/zio/zngio/ztests/zctx-named-reset-2.yaml +++ b/zio/zngio/ztests/zctx-named-reset-2.yaml @@ -1,12 +1,12 @@ # Test that type names are properly reset and reusable after stream boundaries. script: | - super -c "head 1" in.zson > t1.zng - super -c "tail 2" in.zson > t2.zng - cat t1.zng t2.zng | super -z -c "count() by proto:=quiet(proto)" - + super -c "head 1" in.jsup > t1.bsup + super -c "tail 2" in.jsup > t2.bsup + cat t1.bsup t2.bsup | super -z -c "count() by proto:=quiet(proto)" - inputs: - - name: in.zson + - name: in.jsup data: | {ts:2015-03-05T14:25:12.963801Z} {ts:2015-03-05T14:25:14.419939Z,proto:"udp"(=zenum)} diff --git a/zio/zngio/ztests/zctx-named-reset.yaml b/zio/zngio/ztests/zctx-named-reset.yaml index 80201f050b..8dfa6e4030 100644 --- a/zio/zngio/ztests/zctx-named-reset.yaml +++ b/zio/zngio/ztests/zctx-named-reset.yaml @@ -1,12 +1,12 @@ # Test that type names are properly reset and reusable after stream boundaries. script: | - super -c "head 1" in.zson > t1.zng - super -c "tail 2" in.zson > t2.zng - cat t1.zng t2.zng |super - | super -z - + super -c "head 1" in.jsup > t1.bsup + super -c "tail 2" in.jsup > t2.bsup + cat t1.bsup t2.bsup |super - | super -z - inputs: - - name: in.zson + - name: in.jsup data: | {ts:2015-03-05T14:25:12.963801Z} {ts:2015-03-05T14:25:14.419939Z,proto:"udp"(=zenum)} diff --git a/zio/zngio/ztests/zctx-reset.yaml b/zio/zngio/ztests/zctx-reset.yaml index 002b37d796..b0fdb8f969 100644 --- a/zio/zngio/ztests/zctx-reset.yaml +++ b/zio/zngio/ztests/zctx-reset.yaml @@ -1,12 +1,12 @@ # Test that type contexts are properly reset and reusable after stream boundaries script: | - super in.zson > s.zng - super in.zson >> s.zng - super -z s.zng + super in.jsup > s.bsup + super in.jsup >> s.bsup + super -z s.bsup inputs: - - name: in.zson + - name: in.jsup data: | {a:"hello"} {b:10} diff --git a/zio/zsonio/ztests/enum.yaml b/zio/zsonio/ztests/enum.yaml index 757e682b3e..4f4afa6bfb 100644 --- a/zio/zsonio/ztests/enum.yaml +++ b/zio/zsonio/ztests/enum.yaml @@ -1,6 +1,6 @@ zed: "*" -output-flags: -f zson -pretty=4 +output-flags: -f jsup -pretty=4 input: | {flip:%HEADS(enum(HEADS,TAILS))} diff --git a/zio/zsonio/ztests/first-test.yaml b/zio/zsonio/ztests/first-test.yaml index b358c1f8c7..a170c7e388 100644 --- a/zio/zsonio/ztests/first-test.yaml +++ b/zio/zsonio/ztests/first-test.yaml @@ -1,6 +1,6 @@ zed: "*" -output-flags: -f zson -pretty=4 +output-flags: -f jsup -pretty=4 input: | {_path:"conn",ts:2018-03-24T17:15:20.600725Z,id:{orig_h:10.47.1.152,orig_p:49562(port=uint16),resp_h:23.217.103.245,resp_port:80(port)}(=flow),proto:"tcp"(=zenum)} diff --git a/zio/zsonio/ztests/zson-zng.yaml b/zio/zsonio/ztests/jsup-bsup.yaml similarity index 88% rename from zio/zsonio/ztests/zson-zng.yaml rename to zio/zsonio/ztests/jsup-bsup.yaml index 6fcb21afec..fe89e5c82c 100644 --- a/zio/zsonio/ztests/zson-zng.yaml +++ b/zio/zsonio/ztests/jsup-bsup.yaml @@ -1,10 +1,10 @@ -# Send zson into zng and back out to make sure binary encoding of typevals works. +# Send.jsup into zng and back out to make sure binary encoding of typevals works. script: | - super -Z -c "put t:=typeof(this)" in.zson + super -Z -c "put t:=typeof(this)" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:"hello",b:"world",n:123(int32),f:[1(foo=uint8),2(foo),3(foo)]} {a:"goodbye",b:"world",n:456(int32),f:[4(foo=uint8),5(foo),6(foo)]} diff --git a/zio/zsonio/ztests/tv.yaml b/zio/zsonio/ztests/tv.yaml index 8e690919fd..fb4f3e1ada 100644 --- a/zio/zsonio/ztests/tv.yaml +++ b/zio/zsonio/ztests/tv.yaml @@ -1,6 +1,6 @@ zed: "put t:=typeof(s) | put tt:=typeof(t)" -output-flags: -f zson -pretty=4 +output-flags: -f jsup -pretty=4 input: | {s:"hello",n:123(int32),a:[1(foo=uint8),2(foo),3(foo)]} diff --git a/zson/parser-values.go b/zson/parser-values.go index d0dedad6b0..3fa8f0ffff 100644 --- a/zson/parser-values.go +++ b/zson/parser-values.go @@ -22,7 +22,7 @@ func (p *Parser) ParseValue() (ast.Value, error) { } if v == nil && err == nil { if err := p.lexer.check(1); (err != nil && err != io.EOF) || len(p.lexer.cursor) > 0 { - return nil, errors.New("ZSON syntax error") + return nil, errors.New("Super JSON syntax error") } } return v, err diff --git a/zson/test.zson b/zson/test.jsup similarity index 100% rename from zson/test.zson rename to zson/test.jsup diff --git a/zson/zson_test.go b/zson/zson_test.go index 569a06ea08..2833bf1bc2 100644 --- a/zson/zson_test.go +++ b/zson/zson_test.go @@ -21,7 +21,7 @@ func parse(path string) (ast.Value, error) { return zson.NewParser(file).ParseValue() } -const testFile = "test.zson" +const testFile = "test.jsup" func TestZSONParser(t *testing.T) { val, err := parse(testFile) diff --git a/zson/ztests/cut-record.yaml b/zson/ztests/cut-record.yaml index b15188f8d4..c25dc9affb 100644 --- a/zson/ztests/cut-record.yaml +++ b/zson/ztests/cut-record.yaml @@ -1,10 +1,10 @@ # If you change the test below after a change to make it pass, make sure the # input/output are still in sync with what's at zng/docs/zeek-compat.md. -script: super -i zson -f zeek -c "cut my_record" zeek_types.zson +script: super -i jsup -f zeek -c "cut my_record" zeek_types.jsup inputs: - - name: zeek_types.zson + - name: zeek_types.jsup data: | { my_bool: true, diff --git a/zson/ztests/empty-array.yaml b/zson/ztests/empty-array.yaml index c0e2e4b700..775d44cd36 100644 --- a/zson/ztests/empty-array.yaml +++ b/zson/ztests/empty-array.yaml @@ -1,8 +1,8 @@ script: | - super -z in.zson + super -z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | [] [1] diff --git a/zson/ztests/implied-nulls-repeated.yaml b/zson/ztests/implied-nulls-repeated.yaml index 3c97bcdb16..06d24cb6c4 100644 --- a/zson/ztests/implied-nulls-repeated.yaml +++ b/zson/ztests/implied-nulls-repeated.yaml @@ -1,8 +1,8 @@ script: | - super -z in.zson + super -z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:"hello",b:[{a:"a",b:"b"},{a:"c",b:"d"},{a:"e",b:"f"}]} {a:"world",b:null([{a:string,b:string}])} diff --git a/zson/ztests/implied-nulls.yaml b/zson/ztests/implied-nulls.yaml index 94949b5632..f4bb18df0f 100644 --- a/zson/ztests/implied-nulls.yaml +++ b/zson/ztests/implied-nulls.yaml @@ -1,8 +1,8 @@ script: | - super -z in.zson + super -z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:"hello",b:[{a:"a",b:"b"},{a:"c",b:"d"},{a:"e",b:"f"}]} {a:"world",b:null([{a:string,b:string}])} diff --git a/zson/ztests/zson-to-zeek.yaml b/zson/ztests/jsup-to-zeek.yaml similarity index 95% rename from zson/ztests/zson-to-zeek.yaml rename to zson/ztests/jsup-to-zeek.yaml index 3732cc7f4e..627ecef3ba 100644 --- a/zson/ztests/zson-to-zeek.yaml +++ b/zson/ztests/jsup-to-zeek.yaml @@ -1,10 +1,10 @@ # If you change the test below after a change to make it pass, make sure the # input/output are still in sync with what's at zng/docs/zeek-compat.md. -script: super -i zson -f zeek zeek_types.zson +script: super -i jsup -f zeek zeek_types.jsup inputs: - - name: zeek_types.zson + - name: zeek_types.jsup data: | { my_bool: true, diff --git a/zson/ztests/mixed-null-array.yaml b/zson/ztests/mixed-null-array.yaml index 5434cf14dd..93ecd55af1 100644 --- a/zson/ztests/mixed-null-array.yaml +++ b/zson/ztests/mixed-null-array.yaml @@ -1,8 +1,8 @@ script: | - super -z in.zson + super -z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | [1,null(int64)] [null(int64),2] diff --git a/zson/ztests/no-trailing-newline.yaml b/zson/ztests/no-trailing-newline.yaml index 1ea44036f7..b5c84137f8 100644 --- a/zson/ztests/no-trailing-newline.yaml +++ b/zson/ztests/no-trailing-newline.yaml @@ -1,8 +1,8 @@ script: | - super -z -c "count()" in.zson + super -z -c "count()" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | # |- means no newline at end { c: 23 (int32) diff --git a/zson/ztests/outer-schema.yaml b/zson/ztests/outer-schema.yaml index a394cad381..a2b9865752 100644 --- a/zson/ztests/outer-schema.yaml +++ b/zson/ztests/outer-schema.yaml @@ -1,8 +1,8 @@ script: | - super -z in.zson + super -z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {city:"Berkeley",state:"CA",population:121643(uint32)}(=city_schema) {city:"Broad Cove",state:"ME",population:806(uint32)}(=city_schema) diff --git a/zson/ztests/persist.yaml b/zson/ztests/persist.yaml index f0c7ccf70a..b8fc36f665 100644 --- a/zson/ztests/persist.yaml +++ b/zson/ztests/persist.yaml @@ -1,10 +1,10 @@ script: | - super - | super -z -persist 'b.*' in.zson + super - | super -z -persist 'b.*' in.jsup echo === - super - | super -z -persist '(foo|^bar)' in.zson + super - | super -z -persist '(foo|^bar)' in.jsup inputs: - - name: in.zson + - name: in.jsup data: | {a:1(baz=int8)}(=foo) {a:1}(foo) diff --git a/zson/ztests/spec-example.yaml b/zson/ztests/spec-example.yaml index 5df8b5587a..5dfb22662d 100644 --- a/zson/ztests/spec-example.yaml +++ b/zson/ztests/spec-example.yaml @@ -1,8 +1,8 @@ script: | - super -z in.zson + super -z in.jsup inputs: - - name: in.zson + - name: in.jsup data: | { info: "Connection Example", diff --git a/zson/ztests/union-cast.yaml b/zson/ztests/union-cast.yaml index 072e513fef..c7b912ed39 100644 --- a/zson/ztests/union-cast.yaml +++ b/zson/ztests/union-cast.yaml @@ -1,8 +1,8 @@ script: | - super -z -c "by typeof(this) | sort this" in.zson + super -z -c "by typeof(this) | sort this" in.jsup inputs: - - name: in.zson + - name: in.jsup data: | { r: { diff --git a/zson/ztests/zeek-to-zson.yaml b/zson/ztests/zeek-to-jsup.yaml similarity index 97% rename from zson/ztests/zeek-to-zson.yaml rename to zson/ztests/zeek-to-jsup.yaml index ed189b273e..bb065a8e71 100644 --- a/zson/ztests/zeek-to-zson.yaml +++ b/zson/ztests/zeek-to-jsup.yaml @@ -1,7 +1,7 @@ # If you change the test below after a change to make it pass, make sure the # input/output are still in sync with what's at zng/docs/zeek-compat.md. -script: super -f zson zeek_types.log +script: super -f jsup zeek_types.log inputs: - name: zeek_types.log diff --git a/ztest/ztest.go b/ztest/ztest.go index 4a6aebfc66..f376e6451f 100644 --- a/ztest/ztest.go +++ b/ztest/ztest.go @@ -353,7 +353,7 @@ func (z *ZTest) RunInternal(path string) error { if err := z.check(); err != nil { return fmt.Errorf("bad yaml format: %w", err) } - outputFlags := append([]string{"-f", "zson", "-pretty=0"}, strings.Fields(z.OutputFlags)...) + outputFlags := append([]string{"-f", "jsup", "-pretty=0"}, strings.Fields(z.OutputFlags)...) inputFlags := strings.Fields(z.InputFlags) if z.Vector { if z.InputFlags != "" { diff --git a/ztests/enum-err.yaml b/ztests/enum-err.yaml index 348dd85cc3..dd3bb838fd 100644 --- a/ztests/enum-err.yaml +++ b/ztests/enum-err.yaml @@ -1,5 +1,5 @@ script: | - ! super -i zson - + ! super -i jsup - inputs: - name: stdin diff --git a/ztests/mixed-primitive-alias.yaml b/ztests/mixed-primitive-alias.yaml index 8f7bd5d05f..53258cad36 100644 --- a/ztests/mixed-primitive-alias.yaml +++ b/ztests/mixed-primitive-alias.yaml @@ -1,5 +1,5 @@ script: | - super -z a.log b.zng + super -z a.log b.bsup inputs: - name: a.log @@ -13,7 +13,7 @@ inputs: #types port 80 # {src_port:81(port=uint16)} - - name: b.zng + - name: b.bsup data: !!binary AwEHBHBvcnQBAAEIc3JjX3BvcnQeFAAfAwJR/w== outputs: