[
https://issues.apache.org/jira/browse/IOTDB-447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17028837#comment-17028837
]
Xiangdong Huang commented on IOTDB-447:
---------------------------------------
Hi,
One more requirement.
It is good if we can support "IS NOT NULL" clause if our strategy is "query as
much as possible", it is because in some data analysis, users may just want to
get the data of measurement A B C only if measurement A having data.
For example, meteorologist collects pressure and windSpeed, wind direction
etc.. using meteorological balloons for meteorological data analysis.
However, sometimes the balloons do not return the pressure data (or return
incorrect data of pressure because of network problem). In this case, the
windSpeed and wind direction data have no effect for relation analysis between
pressure and wind. So, when they use mysql, the write the following SQL:
SELECT stationId,longitude,latitude,altitude,windDirection,windSpeed,pressure
FROM AIR_STATION WHERE observationTime = ... AND pressure IS NOT NULL ORDER BY
stationId ASC, pressure DESC
For IoTDB, we can also support "IS NOT NULL", e.g., where "pressure is not
null", which means for a device, if column measurementA at timestamp x has data
but the pressure has no data at timestamp x, do not return it.
Or, we can say the timestamp set in the pressure column is one of the
timeFilters.
> Support query on time series which are not created
> --------------------------------------------------
>
> Key: IOTDB-447
> URL: https://issues.apache.org/jira/browse/IOTDB-447
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Core/Engine
> Affects Versions: 0.9.1
> Reporter: Xiangdong Huang
> Priority: Major
> Attachments: image-2020-02-01-21-21-04-037.png, keepQuery.patch
>
>
> Hi,
> I occur a new case, which is also common I think.
> As we have supported auto-creating time series, users may give up creating
> time series manually (like me!). Then the following scenario occurs:
> 1. I know I have some meteorological stations that can collect the
> temperature, press etc..
> 2. But, they may be not sent to the server in one packet. Therefore, I have
> to write codes like:
>
> {code:java}
> // code placeholder
> if ( temperature != null ){
> schema.add("temperature");
> values.add(temperature + "");
> }
> if ( press != null ){
> schema.add("press");
> values.add(press + "");
> }
> if ( windSpeed10min != null ){//10分钟风速
> schema.add("windSpeed10min");
> values.add(windSpeed10min + "");
> }
> session.insert(devicePath, observationTimeLong, schema, values);
> {code}
> Remember that I do not know when these stations will send the measurements to
> the server. For example, maybe some stations have no anemoscopes, maybe the
> anemoscopes of some stations are broken before I deploy my application.
> However, I do not know about that when I develop my query applications.
> 3. So, when I query data, I will write statements like:
> SELECT temperature, press,windDirection2min,windSpeed10min,... FROM
> root.national.*.5.*.*.* WHERE time = '2020-01-19T04:00:00.000+08:00'
>
> Ok, now suppose there is one station that never sent "windSpeed10min" to the
> server because of mentioned reasons in 2, then the query will fail because:
> Msg: Statement format is not right: Path:
> "root.national.*.5.*.*.*.*.windSpeed10min" doesn't correspond to any known
> time series.
>
> What can I do? I can not query measurements and stations one by one...
>
> If we do not allow auto-creating time series, the above scenario does not
> happen because we will create ALL POSSIBLE time series at first. But, we know
> it is not good, and that is one of the reasons that we support the
> auto-creating time series.
>
> So, now that we support auto-creating time series, it is better to fill the
> result of not existed time series as NULL rather than return an error message
> to block all queries.
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)