Describe the bug and expected behavior
dsq failed to recognize nested field if its parent object absents in some records.
Reproduction steps
dsq failed to retrieve location.city, if location is absent in some records.
user_addresses.json
[
{"name": "Agarrah", "location": {"city": "Toronto", "address": { "number": 1002 }}},
{"name": "Minoara", "location": {"city": "Mexico City", "address": { "number": 19 }}},
{"name": "Fontoon"}
]
Result:
dsq user_addresses.json 'SELECT name, "location.city" FROM {}'
[{"name":"Agarrah","\"location.city\"":"location.city"},
{"name":"Minoara","\"location.city\"":"location.city"},
{"name":"Fontoon","\"location.city\"":"location.city"}]
Expected behavior:
dsq user_addresses.json 'SELECT name, "location.city" FROM {}'
[{"name":"Agarrah","location.city":"Toronto"},
{"name":"Minoara","location.city":"Mexico City"},
{"name":"Fontoon","location.city":null}]
Versions
- OS:
Linux DESKTOP-IID1F0E 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
- Shell: Bash
- dsq version: 0.23.0
Describe the bug and expected behavior
dsq failed to recognize nested field if its parent object absents in some records.
Reproduction steps
dsq failed to retrieve
location.city, iflocationis absent in some records.user_addresses.jsonResult:
Expected behavior:
Versions
Linux DESKTOP-IID1F0E 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux