問題文
A sensor table has a column of timestamps stored as strings. What must happen before range selections such as one calendar month can be expressed on it?
選択肢
- The column has to be split into separate year, month and day columns, so a month is selected by matching the year and month fields.
- The column has to be sorted lexicographically, which makes string comparison equivalent to chronological comparison and therefore lets range selections work correctly without changing the type of the column.
- The column has to be converted to a datetime type so comparisons are made on instants rather than on character sequences.
- The column has to be set as the index before any conversion, so the label lookup can already interpret the strings as instants.