Opened 11 years ago
Closed 3 years ago
#2268 closed enhancement (fixed)
t.list.rast where sensitivity
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | Temporal | Version: | svn-trunk |
Keywords: | t.list.rast | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
t.rast.list modis_m where="start_time < 2002-03-01"
gives no output, no warning - note missing quotes around date, ie.
t.rast.list modis_m where="start_time < '2002-03-01'"
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
comment:3 by , 8 years ago
Milestone: | 7.0.5 → 7.0.6 |
---|
comment:4 by , 7 years ago
Milestone: | 7.0.6 → 7.0.7 |
---|
comment:6 by , 6 years ago
Is r73440 enough to close this ticket?
Parsing the where condition it is not so simple and Python sqlite3 library has no function to check if a query is valid.
comment:7 by , 6 years ago
Milestone: | 7.0.7 → 7.6.2 |
---|---|
Type: | defect → enhancement |
I tested recently two commands in 7.6.1:
t.rast.list cr2017 where="start_time < '2017-03-01'" name|mapset|start_time|end_time MOD11A2.A2017001_mosaic_LST_Day_1km|PERMANENT|2017-01-01 00:00:00|2017-01-09 00:00:00 ... t.rast.list cr2017 where="start_time < 2017-03-01" [no output, no warning/error message]
r73440 seems to have no effect
comment:8 by , 3 years ago
The current behavior after PR:2258 (for v8.2) is:
- r73440 continues to work and has the intended behavior, i.e., there is an error message with the default plain text format.
- The other formats (JSON, YAML, CSV) return a result without an error because there is a perfectly fine way of representing an empty result in all three formats.
- There is generally no error message to be issued in the above case, the provided SQL is valid
2002-03-01
is1998
(trySELECT 2002-03-01;
), so there is nothing to complain about from SQL syntax perspective. No results generally mean that nothing was matched, not that the user mistyped the query, so the JSON, YAML, and CSV formats give an empty result without any error message.
> t.rast.list viewshed_walk where="start_time < 2002-03-01" ERROR: Nothing found in the database for space time dataset <viewshed_walk@viewsheds> (type: strds): Dataset is empty or where clause is too constrained or incorrect
> t.rast.list viewshed_walk where="start_time < 2002-03-01" format=json {"data": [], "metadata": {"column_names": ["name", "mapset", "start_time", "end_time"]}}
> t.rast.list viewshed_walk where="start_time < 2002-03-01" format=yaml data: [] metadata: column_names: - name - mapset - start_time - end_time
> t.rast.list viewshed_walk where="start_time < 2002-03-01" format=csv "name","mapset","start_time","end_time"
comment:9 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Replying to martinl:
I think it is correct, the query is wrong. It need the quotes
This is working for me