Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Iotdb
提交
5a752b0d
I
Iotdb
项目概览
apache
/
Iotdb
大约 1 年 前同步成功
通知
25
Star
3344
Fork
916
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
Iotdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5a752b0d
编写于
4月 01, 2021
作者:
W
wangchao316
提交者:
GitHub
4月 01, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[IOTDB-1267] optimize ServerTimeGenerator IExpression parameter (#2955)
上级
453d95dc
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
31 addition
and
46 deletion
+31
-46
cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterDataQueryExecutor.java
.../apache/iotdb/cluster/query/ClusterDataQueryExecutor.java
+3
-7
cluster/src/main/java/org/apache/iotdb/cluster/query/aggregate/ClusterAggregateExecutor.java
...tdb/cluster/query/aggregate/ClusterAggregateExecutor.java
+1
-1
cluster/src/main/java/org/apache/iotdb/cluster/query/groupby/ClusterGroupByVFilterDataSet.java
...b/cluster/query/groupby/ClusterGroupByVFilterDataSet.java
+2
-4
cluster/src/main/java/org/apache/iotdb/cluster/query/reader/ClusterTimeGenerator.java
...ache/iotdb/cluster/query/reader/ClusterTimeGenerator.java
+3
-3
cluster/src/test/java/org/apache/iotdb/cluster/query/reader/ClusterTimeGeneratorTest.java
.../iotdb/cluster/query/reader/ClusterTimeGeneratorTest.java
+1
-1
server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
.../query/dataset/groupby/GroupByWithValueFilterDataSet.java
+3
-6
server/src/main/java/org/apache/iotdb/db/query/executor/AggregationExecutor.java
...g/apache/iotdb/db/query/executor/AggregationExecutor.java
+1
-1
server/src/main/java/org/apache/iotdb/db/query/executor/RawDataQueryExecutor.java
.../apache/iotdb/db/query/executor/RawDataQueryExecutor.java
+3
-6
server/src/main/java/org/apache/iotdb/db/query/executor/UDTFQueryExecutor.java
...org/apache/iotdb/db/query/executor/UDTFQueryExecutor.java
+2
-4
server/src/main/java/org/apache/iotdb/db/query/timegenerator/ServerTimeGenerator.java
...che/iotdb/db/query/timegenerator/ServerTimeGenerator.java
+2
-3
server/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
...ache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
+10
-10
未找到文件。
cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterDataQueryExecutor.java
浏览文件 @
5a752b0d
...
@@ -38,7 +38,6 @@ import org.apache.iotdb.db.query.executor.RawDataQueryExecutor;
...
@@ -38,7 +38,6 @@ import org.apache.iotdb.db.query.executor.RawDataQueryExecutor;
import
org.apache.iotdb.db.query.reader.series.IReaderByTimestamp
;
import
org.apache.iotdb.db.query.reader.series.IReaderByTimestamp
;
import
org.apache.iotdb.db.query.reader.series.ManagedSeriesReader
;
import
org.apache.iotdb.db.query.reader.series.ManagedSeriesReader
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.read.expression.IExpression
;
import
org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression
;
import
org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression
;
import
org.apache.iotdb.tsfile.read.filter.basic.Filter
;
import
org.apache.iotdb.tsfile.read.filter.basic.Filter
;
import
org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet
;
import
org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet
;
...
@@ -200,11 +199,9 @@ public class ClusterDataQueryExecutor extends RawDataQueryExecutor {
...
@@ -200,11 +199,9 @@ public class ClusterDataQueryExecutor extends RawDataQueryExecutor {
}
}
@Override
@Override
protected
TimeGenerator
getTimeGenerator
(
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
rawDataQueryPlan
)
IExpression
queryExpression
,
QueryContext
context
,
RawDataQueryPlan
rawDataQueryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
return
new
ClusterTimeGenerator
(
return
new
ClusterTimeGenerator
(
context
,
metaGroupMember
,
rawDataQueryPlan
,
false
);
queryExpression
,
context
,
metaGroupMember
,
rawDataQueryPlan
,
false
);
}
}
@Override
@Override
...
@@ -214,8 +211,7 @@ public class ClusterDataQueryExecutor extends RawDataQueryExecutor {
...
@@ -214,8 +211,7 @@ public class ClusterDataQueryExecutor extends RawDataQueryExecutor {
if
(
hasValueFilter
)
{
if
(
hasValueFilter
)
{
// 1. check time Generator has local data
// 1. check time Generator has local data
ClusterTimeGenerator
clusterTimeGenerator
=
ClusterTimeGenerator
clusterTimeGenerator
=
new
ClusterTimeGenerator
(
new
ClusterTimeGenerator
(
context
,
metaGroupMember
,
queryPlan
,
true
);
queryPlan
.
getExpression
(),
context
,
metaGroupMember
,
queryPlan
,
true
);
if
(
clusterTimeGenerator
.
isHasLocalReader
())
{
if
(
clusterTimeGenerator
.
isHasLocalReader
())
{
this
.
hasLocalReader
=
true
;
this
.
hasLocalReader
=
true
;
this
.
endPoint
=
null
;
this
.
endPoint
=
null
;
...
...
cluster/src/main/java/org/apache/iotdb/cluster/query/aggregate/ClusterAggregateExecutor.java
浏览文件 @
5a752b0d
...
@@ -85,7 +85,7 @@ public class ClusterAggregateExecutor extends AggregationExecutor {
...
@@ -85,7 +85,7 @@ public class ClusterAggregateExecutor extends AggregationExecutor {
@Override
@Override
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
rawDataQueryPlan
)
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
rawDataQueryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
return
new
ClusterTimeGenerator
(
expression
,
context
,
metaMember
,
rawDataQueryPlan
,
false
);
return
new
ClusterTimeGenerator
(
context
,
metaMember
,
rawDataQueryPlan
,
false
);
}
}
@Override
@Override
...
...
cluster/src/main/java/org/apache/iotdb/cluster/query/groupby/ClusterGroupByVFilterDataSet.java
浏览文件 @
5a752b0d
...
@@ -33,7 +33,6 @@ import org.apache.iotdb.db.query.dataset.groupby.GroupByWithValueFilterDataSet;
...
@@ -33,7 +33,6 @@ import org.apache.iotdb.db.query.dataset.groupby.GroupByWithValueFilterDataSet;
import
org.apache.iotdb.db.query.filter.TsFileFilter
;
import
org.apache.iotdb.db.query.filter.TsFileFilter
;
import
org.apache.iotdb.db.query.reader.series.IReaderByTimestamp
;
import
org.apache.iotdb.db.query.reader.series.IReaderByTimestamp
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.read.expression.IExpression
;
import
org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator
;
import
org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -60,10 +59,9 @@ public class ClusterGroupByVFilterDataSet extends GroupByWithValueFilterDataSet
...
@@ -60,10 +59,9 @@ public class ClusterGroupByVFilterDataSet extends GroupByWithValueFilterDataSet
}
}
@Override
@Override
protected
TimeGenerator
getTimeGenerator
(
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
rawDataQueryPlan
)
IExpression
expression
,
QueryContext
context
,
RawDataQueryPlan
rawDataQueryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
return
new
ClusterTimeGenerator
(
expression
,
context
,
metaGroupMember
,
rawDataQueryPlan
,
false
);
return
new
ClusterTimeGenerator
(
context
,
metaGroupMember
,
rawDataQueryPlan
,
false
);
}
}
@Override
@Override
...
...
cluster/src/main/java/org/apache/iotdb/cluster/query/reader/ClusterTimeGenerator.java
浏览文件 @
5a752b0d
...
@@ -58,7 +58,6 @@ public class ClusterTimeGenerator extends ServerTimeGenerator {
...
@@ -58,7 +58,6 @@ public class ClusterTimeGenerator extends ServerTimeGenerator {
/** Constructor of EngineTimeGenerator. */
/** Constructor of EngineTimeGenerator. */
public
ClusterTimeGenerator
(
public
ClusterTimeGenerator
(
IExpression
expression
,
QueryContext
context
,
QueryContext
context
,
MetaGroupMember
metaGroupMember
,
MetaGroupMember
metaGroupMember
,
RawDataQueryPlan
rawDataQueryPlan
,
RawDataQueryPlan
rawDataQueryPlan
,
...
@@ -70,9 +69,10 @@ public class ClusterTimeGenerator extends ServerTimeGenerator {
...
@@ -70,9 +69,10 @@ public class ClusterTimeGenerator extends ServerTimeGenerator {
try
{
try
{
readerFactory
.
syncMetaGroup
();
readerFactory
.
syncMetaGroup
();
if
(
onlyCheckLocalData
)
{
if
(
onlyCheckLocalData
)
{
whetherHasLocalDataGroup
(
expression
,
metaGroupMember
,
queryPlan
.
isAscending
());
whetherHasLocalDataGroup
(
queryPlan
.
getExpression
(),
metaGroupMember
,
queryPlan
.
isAscending
());
}
else
{
}
else
{
constructNode
(
expression
);
constructNode
(
queryPlan
.
getExpression
()
);
}
}
}
catch
(
IOException
|
CheckConsistencyException
e
)
{
}
catch
(
IOException
|
CheckConsistencyException
e
)
{
throw
new
StorageEngineException
(
e
);
throw
new
StorageEngineException
(
e
);
...
...
cluster/src/test/java/org/apache/iotdb/cluster/query/reader/ClusterTimeGeneratorTest.java
浏览文件 @
5a752b0d
...
@@ -62,7 +62,7 @@ public class ClusterTimeGeneratorTest extends BaseQueryTest {
...
@@ -62,7 +62,7 @@ public class ClusterTimeGeneratorTest extends BaseQueryTest {
dataQueryPlan
.
addDeduplicatedPaths
(
new
PartialPath
(
TestUtils
.
getTestSeries
(
1
,
1
)));
dataQueryPlan
.
addDeduplicatedPaths
(
new
PartialPath
(
TestUtils
.
getTestSeries
(
1
,
1
)));
ClusterTimeGenerator
timeGenerator
=
ClusterTimeGenerator
timeGenerator
=
new
ClusterTimeGenerator
(
expression
,
context
,
testMetaMember
,
dataQueryPlan
,
false
);
new
ClusterTimeGenerator
(
context
,
testMetaMember
,
dataQueryPlan
,
false
);
for
(
int
i
=
3
;
i
<=
8
;
i
++)
{
for
(
int
i
=
3
;
i
<=
8
;
i
++)
{
assertTrue
(
timeGenerator
.
hasNext
());
assertTrue
(
timeGenerator
.
hasNext
());
assertEquals
(
i
,
timeGenerator
.
next
());
assertEquals
(
i
,
timeGenerator
.
next
());
...
...
server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
浏览文件 @
5a752b0d
...
@@ -39,7 +39,6 @@ import org.apache.iotdb.db.utils.TestOnly;
...
@@ -39,7 +39,6 @@ import org.apache.iotdb.db.utils.TestOnly;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.read.common.Path
;
import
org.apache.iotdb.tsfile.read.common.Path
;
import
org.apache.iotdb.tsfile.read.common.RowRecord
;
import
org.apache.iotdb.tsfile.read.common.RowRecord
;
import
org.apache.iotdb.tsfile.read.expression.IExpression
;
import
org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator
;
import
org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator
;
import
org.apache.iotdb.tsfile.utils.Pair
;
import
org.apache.iotdb.tsfile.utils.Pair
;
...
@@ -81,8 +80,7 @@ public class GroupByWithValueFilterDataSet extends GroupByEngineDataSet {
...
@@ -81,8 +80,7 @@ public class GroupByWithValueFilterDataSet extends GroupByEngineDataSet {
/** init reader and aggregate function. */
/** init reader and aggregate function. */
protected
void
initGroupBy
(
QueryContext
context
,
GroupByTimePlan
groupByTimePlan
)
protected
void
initGroupBy
(
QueryContext
context
,
GroupByTimePlan
groupByTimePlan
)
throws
StorageEngineException
,
QueryProcessException
{
throws
StorageEngineException
,
QueryProcessException
{
this
.
timestampGenerator
=
this
.
timestampGenerator
=
getTimeGenerator
(
context
,
groupByTimePlan
);
getTimeGenerator
(
groupByTimePlan
.
getExpression
(),
context
,
groupByTimePlan
);
this
.
allDataReaderList
=
new
ArrayList
<>();
this
.
allDataReaderList
=
new
ArrayList
<>();
this
.
groupByTimePlan
=
groupByTimePlan
;
this
.
groupByTimePlan
=
groupByTimePlan
;
...
@@ -100,10 +98,9 @@ public class GroupByWithValueFilterDataSet extends GroupByEngineDataSet {
...
@@ -100,10 +98,9 @@ public class GroupByWithValueFilterDataSet extends GroupByEngineDataSet {
}
}
}
}
protected
TimeGenerator
getTimeGenerator
(
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
IExpression
expression
,
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
return
new
ServerTimeGenerator
(
expression
,
context
,
queryPlan
);
return
new
ServerTimeGenerator
(
context
,
queryPlan
);
}
}
protected
IReaderByTimestamp
getReaderByTime
(
protected
IReaderByTimestamp
getReaderByTime
(
...
...
server/src/main/java/org/apache/iotdb/db/query/executor/AggregationExecutor.java
浏览文件 @
5a752b0d
...
@@ -390,7 +390,7 @@ public class AggregationExecutor {
...
@@ -390,7 +390,7 @@ public class AggregationExecutor {
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
return
new
ServerTimeGenerator
(
expression
,
context
,
queryPlan
);
return
new
ServerTimeGenerator
(
context
,
queryPlan
);
}
}
protected
IReaderByTimestamp
getReaderByTime
(
protected
IReaderByTimestamp
getReaderByTime
(
...
...
server/src/main/java/org/apache/iotdb/db/query/executor/RawDataQueryExecutor.java
浏览文件 @
5a752b0d
...
@@ -36,7 +36,6 @@ import org.apache.iotdb.db.query.reader.series.SeriesRawDataBatchReader;
...
@@ -36,7 +36,6 @@ import org.apache.iotdb.db.query.reader.series.SeriesRawDataBatchReader;
import
org.apache.iotdb.db.query.reader.series.SeriesReaderByTimestamp
;
import
org.apache.iotdb.db.query.reader.series.SeriesReaderByTimestamp
;
import
org.apache.iotdb.db.query.timegenerator.ServerTimeGenerator
;
import
org.apache.iotdb.db.query.timegenerator.ServerTimeGenerator
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
;
import
org.apache.iotdb.tsfile.read.expression.IExpression
;
import
org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression
;
import
org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression
;
import
org.apache.iotdb.tsfile.read.filter.basic.Filter
;
import
org.apache.iotdb.tsfile.read.filter.basic.Filter
;
import
org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet
;
import
org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet
;
...
@@ -146,8 +145,7 @@ public class RawDataQueryExecutor {
...
@@ -146,8 +145,7 @@ public class RawDataQueryExecutor {
return
dataSet
;
return
dataSet
;
}
}
TimeGenerator
timestampGenerator
=
TimeGenerator
timestampGenerator
=
getTimeGenerator
(
context
,
queryPlan
);
getTimeGenerator
(
queryPlan
.
getExpression
(),
context
,
queryPlan
);
List
<
Boolean
>
cached
=
List
<
Boolean
>
cached
=
markFilterdPaths
(
markFilterdPaths
(
queryPlan
.
getExpression
(),
queryPlan
.
getExpression
(),
...
@@ -204,10 +202,9 @@ public class RawDataQueryExecutor {
...
@@ -204,10 +202,9 @@ public class RawDataQueryExecutor {
queryPlan
.
isAscending
());
queryPlan
.
isAscending
());
}
}
protected
TimeGenerator
getTimeGenerator
(
protected
TimeGenerator
getTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
IExpression
expression
,
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
return
new
ServerTimeGenerator
(
expression
,
context
,
queryPlan
);
return
new
ServerTimeGenerator
(
context
,
queryPlan
);
}
}
/**
/**
...
...
server/src/main/java/org/apache/iotdb/db/query/executor/UDTFQueryExecutor.java
浏览文件 @
5a752b0d
...
@@ -58,8 +58,7 @@ public class UDTFQueryExecutor extends RawDataQueryExecutor {
...
@@ -58,8 +58,7 @@ public class UDTFQueryExecutor extends RawDataQueryExecutor {
public
QueryDataSet
executeWithValueFilterAlignByTime
(
QueryContext
context
)
public
QueryDataSet
executeWithValueFilterAlignByTime
(
QueryContext
context
)
throws
StorageEngineException
,
QueryProcessException
,
IOException
{
throws
StorageEngineException
,
QueryProcessException
,
IOException
{
TimeGenerator
timestampGenerator
=
TimeGenerator
timestampGenerator
=
getTimeGenerator
(
context
,
udtfPlan
);
getTimeGenerator
(
udtfPlan
.
getExpression
(),
context
,
udtfPlan
);
List
<
Boolean
>
cached
=
List
<
Boolean
>
cached
=
markFilterdPaths
(
markFilterdPaths
(
udtfPlan
.
getExpression
(),
udtfPlan
.
getExpression
(),
...
@@ -90,8 +89,7 @@ public class UDTFQueryExecutor extends RawDataQueryExecutor {
...
@@ -90,8 +89,7 @@ public class UDTFQueryExecutor extends RawDataQueryExecutor {
public
QueryDataSet
executeWithValueFilterNonAlign
(
QueryContext
context
)
public
QueryDataSet
executeWithValueFilterNonAlign
(
QueryContext
context
)
throws
QueryProcessException
,
StorageEngineException
,
IOException
{
throws
QueryProcessException
,
StorageEngineException
,
IOException
{
TimeGenerator
timestampGenerator
=
TimeGenerator
timestampGenerator
=
getTimeGenerator
(
context
,
udtfPlan
);
getTimeGenerator
(
udtfPlan
.
getExpression
(),
context
,
udtfPlan
);
List
<
Boolean
>
cached
=
List
<
Boolean
>
cached
=
markFilterdPaths
(
markFilterdPaths
(
udtfPlan
.
getExpression
(),
udtfPlan
.
getExpression
(),
...
...
server/src/main/java/org/apache/iotdb/db/query/timegenerator/ServerTimeGenerator.java
浏览文件 @
5a752b0d
...
@@ -58,13 +58,12 @@ public class ServerTimeGenerator extends TimeGenerator {
...
@@ -58,13 +58,12 @@ public class ServerTimeGenerator extends TimeGenerator {
}
}
/** Constructor of EngineTimeGenerator. */
/** Constructor of EngineTimeGenerator. */
public
ServerTimeGenerator
(
public
ServerTimeGenerator
(
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
IExpression
expression
,
QueryContext
context
,
RawDataQueryPlan
queryPlan
)
throws
StorageEngineException
{
throws
StorageEngineException
{
this
.
context
=
context
;
this
.
context
=
context
;
this
.
queryPlan
=
queryPlan
;
this
.
queryPlan
=
queryPlan
;
try
{
try
{
serverConstructNode
(
expression
);
serverConstructNode
(
queryPlan
.
getExpression
()
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
StorageEngineException
(
e
);
throw
new
StorageEngineException
(
e
);
}
}
...
...
server/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
浏览文件 @
5a752b0d
...
@@ -22,6 +22,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
...
@@ -22,6 +22,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
import
org.apache.iotdb.db.constant.TestConstant
;
import
org.apache.iotdb.db.constant.TestConstant
;
import
org.apache.iotdb.db.exception.StorageEngineException
;
import
org.apache.iotdb.db.exception.StorageEngineException
;
import
org.apache.iotdb.db.exception.metadata.IllegalPathException
;
import
org.apache.iotdb.db.exception.metadata.IllegalPathException
;
import
org.apache.iotdb.db.exception.query.QueryProcessException
;
import
org.apache.iotdb.db.metadata.PartialPath
;
import
org.apache.iotdb.db.metadata.PartialPath
;
import
org.apache.iotdb.db.qp.physical.crud.RawDataQueryPlan
;
import
org.apache.iotdb.db.qp.physical.crud.RawDataQueryPlan
;
import
org.apache.iotdb.db.query.timegenerator.ServerTimeGenerator
;
import
org.apache.iotdb.db.query.timegenerator.ServerTimeGenerator
;
...
@@ -188,7 +189,7 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -188,7 +189,7 @@ public class IoTDBEngineTimeGeneratorIT {
/** value >= 14 && time > 500 */
/** value >= 14 && time > 500 */
@Test
@Test
public
void
testOneSeriesWithValueAndTimeFilter
()
public
void
testOneSeriesWithValueAndTimeFilter
()
throws
IOException
,
StorageEngineException
,
IllegalPathException
{
throws
IOException
,
StorageEngineException
,
IllegalPathException
,
QueryProcessException
{
// System.out.println("Test >>> root.vehicle.d0.s0 >= 14 && time > 500");
// System.out.println("Test >>> root.vehicle.d0.s0 >= 14 && time > 500");
PartialPath
pd0s0
=
PartialPath
pd0s0
=
...
@@ -202,8 +203,8 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -202,8 +203,8 @@ public class IoTDBEngineTimeGeneratorIT {
List
<
PartialPath
>
paths
=
new
ArrayList
<>();
List
<
PartialPath
>
paths
=
new
ArrayList
<>();
paths
.
add
(
pd0s0
);
paths
.
add
(
pd0s0
);
queryPlan
.
setDeduplicatedPaths
(
paths
);
queryPlan
.
setDeduplicatedPaths
(
paths
);
ServerTimeGenerator
timeGenerator
=
queryPlan
.
setExpression
(
singleSeriesExpression
);
new
ServerTimeGenerator
(
singleSeriesExpression
,
TEST_QUERY_CONTEXT
,
queryPlan
);
ServerTimeGenerator
timeGenerator
=
new
ServerTimeGenerator
(
TEST_QUERY_CONTEXT
,
queryPlan
);
int
cnt
=
0
;
int
cnt
=
0
;
while
(
timeGenerator
.
hasNext
())
{
while
(
timeGenerator
.
hasNext
())
{
...
@@ -218,7 +219,7 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -218,7 +219,7 @@ public class IoTDBEngineTimeGeneratorIT {
/** root.vehicle.d1.s0 >= 5, and d1.s0 has no data */
/** root.vehicle.d1.s0 >= 5, and d1.s0 has no data */
@Test
@Test
public
void
testEmptySeriesWithValueFilter
()
public
void
testEmptySeriesWithValueFilter
()
throws
IOException
,
StorageEngineException
,
IllegalPathException
{
throws
IOException
,
StorageEngineException
,
IllegalPathException
,
QueryProcessException
{
// System.out.println("Test >>> root.vehicle.d1.s0 >= 5");
// System.out.println("Test >>> root.vehicle.d1.s0 >= 5");
PartialPath
pd1s0
=
PartialPath
pd1s0
=
...
@@ -230,9 +231,8 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -230,9 +231,8 @@ public class IoTDBEngineTimeGeneratorIT {
List
<
PartialPath
>
paths
=
new
ArrayList
<>();
List
<
PartialPath
>
paths
=
new
ArrayList
<>();
paths
.
add
(
pd1s0
);
paths
.
add
(
pd1s0
);
queryPlan
.
setDeduplicatedPaths
(
paths
);
queryPlan
.
setDeduplicatedPaths
(
paths
);
queryPlan
.
setExpression
(
singleSeriesExpression
);
ServerTimeGenerator
timeGenerator
=
ServerTimeGenerator
timeGenerator
=
new
ServerTimeGenerator
(
TEST_QUERY_CONTEXT
,
queryPlan
);
new
ServerTimeGenerator
(
singleSeriesExpression
,
TEST_QUERY_CONTEXT
,
queryPlan
);
int
cnt
=
0
;
int
cnt
=
0
;
while
(
timeGenerator
.
hasNext
())
{
while
(
timeGenerator
.
hasNext
())
{
...
@@ -244,7 +244,7 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -244,7 +244,7 @@ public class IoTDBEngineTimeGeneratorIT {
/** root.vehicle.d0.s0 >= 5 && root.vehicle.d0.s2 >= 11.5 || time > 900 */
/** root.vehicle.d0.s0 >= 5 && root.vehicle.d0.s2 >= 11.5 || time > 900 */
@Test
@Test
public
void
testMultiSeriesWithValueFilterAndTimeFilter
()
public
void
testMultiSeriesWithValueFilterAndTimeFilter
()
throws
IOException
,
StorageEngineException
,
IllegalPathException
{
throws
IOException
,
StorageEngineException
,
IllegalPathException
,
QueryProcessException
{
System
.
out
.
println
(
System
.
out
.
println
(
"Test >>> root.vehicle.d0.s0 >= 5 && root.vehicle.d0.s2 >= 11.5 || time > 900"
);
"Test >>> root.vehicle.d0.s0 >= 5 && root.vehicle.d0.s2 >= 11.5 || time > 900"
);
...
@@ -269,8 +269,8 @@ public class IoTDBEngineTimeGeneratorIT {
...
@@ -269,8 +269,8 @@ public class IoTDBEngineTimeGeneratorIT {
paths
.
add
(
pd0s0
);
paths
.
add
(
pd0s0
);
paths
.
add
(
pd0s2
);
paths
.
add
(
pd0s2
);
queryPlan
.
setDeduplicatedPaths
(
paths
);
queryPlan
.
setDeduplicatedPaths
(
paths
);
ServerTimeGenerator
timeGenerator
=
queryPlan
.
setExpression
(
andExpression
);
new
ServerTimeGenerator
(
andExpression
,
TEST_QUERY_CONTEXT
,
queryPlan
);
ServerTimeGenerator
timeGenerator
=
new
ServerTimeGenerator
(
TEST_QUERY_CONTEXT
,
queryPlan
);
int
cnt
=
0
;
int
cnt
=
0
;
while
(
timeGenerator
.
hasNext
())
{
while
(
timeGenerator
.
hasNext
())
{
long
time
=
timeGenerator
.
next
();
long
time
=
timeGenerator
.
next
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录