mirror of
https://github.com/johnkerl/miller.git
synced 2026-08-02 04:22:59 +00:00
Regression-test cases for null-type
This commit is contained in:
parent
04168eb843
commit
a4586145ca
11 changed files with 38 additions and 25 deletions
1
go/regtest/cases/io-json-io/0033/cmd
Normal file
1
go/regtest/cases/io-json-io/0033/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --json --from regtest/input/nulls.json put '$z=$x+$y'
|
||||
0
go/regtest/cases/io-json-io/0033/experr
Normal file
0
go/regtest/cases/io-json-io/0033/experr
Normal file
6
go/regtest/cases/io-json-io/0033/expout
Normal file
6
go/regtest/cases/io-json-io/0033/expout
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"x": 1,
|
||||
"n": null,
|
||||
"y": 3,
|
||||
"z": 4
|
||||
}
|
||||
1
go/regtest/cases/io-json-io/0034/cmd
Normal file
1
go/regtest/cases/io-json-io/0034/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --json --from regtest/input/nulls.json put '$z=$n+$y'
|
||||
0
go/regtest/cases/io-json-io/0034/experr
Normal file
0
go/regtest/cases/io-json-io/0034/experr
Normal file
6
go/regtest/cases/io-json-io/0034/expout
Normal file
6
go/regtest/cases/io-json-io/0034/expout
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"x": 1,
|
||||
"n": null,
|
||||
"y": 3,
|
||||
"z": 3
|
||||
}
|
||||
1
go/regtest/cases/io-json-io/0035/cmd
Normal file
1
go/regtest/cases/io-json-io/0035/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --json --from regtest/input/nulls.json put '$z=$n+$n'
|
||||
0
go/regtest/cases/io-json-io/0035/experr
Normal file
0
go/regtest/cases/io-json-io/0035/experr
Normal file
6
go/regtest/cases/io-json-io/0035/expout
Normal file
6
go/regtest/cases/io-json-io/0035/expout
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"x": 1,
|
||||
"n": null,
|
||||
"y": 3,
|
||||
"z": null
|
||||
}
|
||||
5
go/regtest/input/nulls.json
Normal file
5
go/regtest/input/nulls.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"x": 1,
|
||||
"n": null,
|
||||
"y": 3
|
||||
}
|
||||
37
go/todo.txt
37
go/todo.txt
|
|
@ -1,34 +1,11 @@
|
|||
================================================================
|
||||
TOP OF LIST:
|
||||
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
JSON null:
|
||||
* null literal in bnf
|
||||
* scan-test for json input
|
||||
* write-test for json output
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
* tools/perf:
|
||||
o https://eng.uber.com/pprof-go-profiler/
|
||||
o profile mlr --j2x cat mappings.json
|
||||
o golang static-analysis tool -- ?
|
||||
|
||||
* 2121 case:
|
||||
o ../c/mlr --from s put '$z=1+""'
|
||||
o ../go/mlr --from s put '$z=1+""'
|
||||
o array auto-extend:
|
||||
- fill with absent is not ok
|
||||
> Miller internal coding error: absent-values should not have been assigned
|
||||
> cmt mlrval_new.go
|
||||
- fill with empty results in these situations :(
|
||||
> https://miller.readthedocs.io/en/latest/reference.html#null-data-empty-and-absent
|
||||
"Empty values are explicit in the data so they should explicitly affect
|
||||
accumulations: mlr put '@sum += $x' should accumulate numeric x values
|
||||
into the sum but an empty x, when encountered in the input data stream,
|
||||
should make the sum non-numeric."
|
||||
- fill with ... use JSON_NULL here?
|
||||
o needs doc-ent for JSON_NULL -- only for JSON user data only only ... except for this
|
||||
|
||||
* blockers:
|
||||
o repifs, for nidx & pprint both
|
||||
o --d2n commawrong
|
||||
|
|
@ -73,8 +50,6 @@ JSON null:
|
|||
* cases/dsl-min-max-types: cmp-matrices need to be fixed to follow the advertised rule for mixed types
|
||||
NUMERICS < BOOL < VOID < STRING
|
||||
|
||||
? blocker? json null
|
||||
|
||||
* blocker: smart fmtnum
|
||||
- poor-person's initial version: lld/llx -> d/x; lf/le/lg -> f/e/g ...
|
||||
- fmtnum
|
||||
|
|
@ -629,3 +604,15 @@ i https://en.wikipedia.org/wiki/Delimiter#Delimiter_collision
|
|||
* doc for DSL hostname/os/version functions
|
||||
? ENV as entire string-string map at RHS/LHS -- ?
|
||||
* mongo examples to doc :D
|
||||
* doc for array auto-extend:
|
||||
- fill with absent is not ok
|
||||
> Miller internal coding error: absent-values should not have been assigned
|
||||
> cmt mlrval_new.go
|
||||
- fill with empty results in these situations :(
|
||||
> https://miller.readthedocs.io/en/latest/reference.html#null-data-empty-and-absent
|
||||
"Empty values are explicit in the data so they should explicitly affect
|
||||
accumulations: mlr put '@sum += $x' should accumulate numeric x values
|
||||
into the sum but an empty x, when encountered in the input data stream,
|
||||
should make the sum non-numeric."
|
||||
- use JSON null here
|
||||
- needs doc-ent for JSON_NULL -- only for JSON user data only only ... except for this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue