From 4fc76101b7851900b63a9cd2f7624dc52027bffb Mon Sep 17 00:00:00 2001 From: lidongsjtu Date: Tue, 1 Dec 2015 21:11:52 +0800 Subject: [PATCH] KYLIN-1064 Restore disabled queries in KylinQueryTest.testVerifyQuery --- .../org/apache/kylin/query/relnode/OLAPLimitRel.java | 7 +++++-- .../test/resources/query/sql_verifyCount/query04.sql | 19 +++++++++++++++++++ .../query/sql_verifyCount/query04.sql.disable | 19 ------------------- .../test/resources/query/sql_verifyCount/query05.sql | 19 +++++++++++++++++++ .../query/sql_verifyCount/query05.sql.disable | 19 ------------------- .../test/resources/query/sql_verifyCount/query06.sql | 19 +++++++++++++++++++ .../query/sql_verifyCount/query06.sql.disable | 19 ------------------- .../test/resources/query/sql_verifyCount/query07.sql | 19 +++++++++++++++++++ .../query/sql_verifyCount/query07.sql.disable | 19 ------------------- 9 files changed, 81 insertions(+), 78 deletions(-) create mode 100644 query/src/test/resources/query/sql_verifyCount/query04.sql delete mode 100644 query/src/test/resources/query/sql_verifyCount/query04.sql.disable create mode 100644 query/src/test/resources/query/sql_verifyCount/query05.sql delete mode 100644 query/src/test/resources/query/sql_verifyCount/query05.sql.disable create mode 100644 query/src/test/resources/query/sql_verifyCount/query06.sql delete mode 100644 query/src/test/resources/query/sql_verifyCount/query06.sql.disable create mode 100644 query/src/test/resources/query/sql_verifyCount/query07.sql delete mode 100644 query/src/test/resources/query/sql_verifyCount/query07.sql.disable diff --git a/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java b/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java index caf9e98..f6084ba 100644 --- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java +++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java @@ -101,8 +101,11 @@ public class OLAPLimitRel extends SingleRel implements OLAPRel { @Override public EnumerableRel implementEnumerable(List inputs) { - return new EnumerableLimit(getCluster(), getCluster().traitSetOf(EnumerableConvention.INSTANCE), // - sole(inputs), localOffset, localFetch); + EnumerableRel input = sole(inputs); + if (input instanceof OLAPRel) { + ((OLAPRel) input).replaceTraitSet(EnumerableConvention.INSTANCE); + } + return EnumerableLimit.create(input, localOffset, localFetch); } @Override diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql b/query/src/test/resources/query/sql_verifyCount/query04.sql new file mode 100644 index 0000000..9d3e409 --- /dev/null +++ b/query/src/test/resources/query/sql_verifyCount/query04.sql @@ -0,0 +1,19 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +select * from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql.disable b/query/src/test/resources/query/sql_verifyCount/query04.sql.disable deleted file mode 100644 index 9d3e409..0000000 --- a/query/src/test/resources/query/sql_verifyCount/query04.sql.disable +++ /dev/null @@ -1,19 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. --- - -select * from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query05.sql b/query/src/test/resources/query/sql_verifyCount/query05.sql new file mode 100644 index 0000000..753a85a --- /dev/null +++ b/query/src/test/resources/query/sql_verifyCount/query05.sql @@ -0,0 +1,19 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +select price from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query05.sql.disable b/query/src/test/resources/query/sql_verifyCount/query05.sql.disable deleted file mode 100644 index 753a85a..0000000 --- a/query/src/test/resources/query/sql_verifyCount/query05.sql.disable +++ /dev/null @@ -1,19 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. --- - -select price from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query06.sql b/query/src/test/resources/query/sql_verifyCount/query06.sql new file mode 100644 index 0000000..39578a4 --- /dev/null +++ b/query/src/test/resources/query/sql_verifyCount/query06.sql @@ -0,0 +1,19 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +select lstg_format_name from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query06.sql.disable b/query/src/test/resources/query/sql_verifyCount/query06.sql.disable deleted file mode 100644 index 39578a4..0000000 --- a/query/src/test/resources/query/sql_verifyCount/query06.sql.disable +++ /dev/null @@ -1,19 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. --- - -select lstg_format_name from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query07.sql b/query/src/test/resources/query/sql_verifyCount/query07.sql new file mode 100644 index 0000000..0afb493 --- /dev/null +++ b/query/src/test/resources/query/sql_verifyCount/query07.sql @@ -0,0 +1,19 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +select price,lstg_format_name from test_kylin_fact limit 100 diff --git a/query/src/test/resources/query/sql_verifyCount/query07.sql.disable b/query/src/test/resources/query/sql_verifyCount/query07.sql.disable deleted file mode 100644 index 0afb493..0000000 --- a/query/src/test/resources/query/sql_verifyCount/query07.sql.disable +++ /dev/null @@ -1,19 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. --- - -select price,lstg_format_name from test_kylin_fact limit 100 -- 2.3.8 (Apple Git-58)