-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ab45c2
commit 2f3f268
Showing
6 changed files
with
196 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...cution/src/test/java/com/facebook/presto/nativeworker/AbstractTestNativeCteExecution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Licensed 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. | ||
*/ | ||
package com.facebook.presto.nativeworker; | ||
|
||
import com.facebook.presto.hive.TestCteExecution; | ||
import com.facebook.presto.testing.QueryRunner; | ||
import org.testng.annotations.Test; | ||
|
||
public abstract class AbstractTestNativeCteExecution | ||
extends TestCteExecution | ||
{ | ||
@Override | ||
protected void createTables() | ||
{ | ||
QueryRunner queryRunner = (QueryRunner) getExpectedQueryRunner(); | ||
// This avoids casting date fields to VARCHAR (required for DWRF). The change | ||
// is needed because several CTE tests use EXTRACT functions from date columns. | ||
NativeQueryRunnerUtils.createAllTables(queryRunner, false); | ||
} | ||
|
||
@Override | ||
@Test(enabled = false) | ||
// Char type is not supported in Prestissimo. | ||
public void testPersistentCteWithChar() {} | ||
|
||
@Override | ||
// Unsupported nested encoding in Velox Parquet | ||
// Error : VeloxRuntimeError: vec.valueVector() == nullptr || vec.wrappedVector()->isFlatEncoding() | ||
// An unsupported nested encoding was found. Operator: TableWrite(1) | ||
@Test(enabled = false) | ||
public void testPersistentCteWithStructTypes() {} | ||
|
||
@Override | ||
// Unsupported nested encoding in Velox Parquet | ||
// Error : VeloxRuntimeError: vec.valueVector() == nullptr || vec.wrappedVector()->isFlatEncoding() | ||
// An unsupported nested encoding was found. Operator: TableWrite(1) | ||
@Test(enabled = false) | ||
public void testPersistentCteWithMap() {} | ||
|
||
@Override | ||
// Unsupported nested encoding in Velox Parquet | ||
// Error : VeloxRuntimeError: vec.valueVector() == nullptr || vec.wrappedVector()->isFlatEncoding() | ||
// An unsupported nested encoding was found. Operator: TableWrite(1) | ||
@Test(enabled = false) | ||
public void testPersistentCteWithArrayWhereInnerTypeIsNotSupported() {} | ||
|
||
@Override | ||
// Unsupported nested encoding in Velox Parquet | ||
// Error : VeloxRuntimeError: vec.valueVector() == nullptr || vec.wrappedVector()->isFlatEncoding() | ||
// An unsupported nested encoding was found. Operator: TableWrite(1) | ||
@Test(enabled = false) | ||
public void testPersistentCteWithArrayWhereInnerTypeSupported() {} | ||
|
||
// Native engine does not support PAGEFILE which is needed for serializing Hive non-native types. | ||
@Test(enabled = false) | ||
public void testPersistentCteWithTimeStampWithTimeZoneType() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...n/src/test/java/com/facebook/presto/nativeworker/TestPrestoNativeCteExecutionParquet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Licensed 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. | ||
*/ | ||
package com.facebook.presto.nativeworker; | ||
|
||
import com.facebook.presto.Session; | ||
import com.facebook.presto.testing.QueryRunner; | ||
import org.testng.annotations.Test; | ||
|
||
import static com.facebook.presto.SystemSessionProperties.PUSHDOWN_SUBFIELDS_ENABLED; | ||
import static com.facebook.presto.SystemSessionProperties.CTE_MATERIALIZATION_STRATEGY; | ||
import static com.facebook.presto.SystemSessionProperties.PARTITIONING_PROVIDER_CATALOG; | ||
import static com.facebook.presto.SystemSessionProperties.CTE_FILTER_AND_PROJECTION_PUSHDOWN_ENABLED; | ||
|
||
@Test(groups = {"parquet"}) | ||
public class TestPrestoNativeCteExecutionParquet | ||
extends AbstractTestNativeCteExecution | ||
{ | ||
@Override | ||
protected QueryRunner createQueryRunner() | ||
throws Exception | ||
{ | ||
return PrestoNativeQueryRunnerUtils.createNativeCteQueryRunner(true, "PARQUET"); | ||
} | ||
|
||
@Override | ||
protected QueryRunner createExpectedQueryRunner() | ||
throws Exception | ||
{ | ||
return PrestoNativeQueryRunnerUtils.createJavaQueryRunner("PARQUET"); | ||
} | ||
|
||
@Override | ||
protected Session getSession() | ||
{ | ||
return Session.builder(super.getSession()) | ||
.setSystemProperty(PUSHDOWN_SUBFIELDS_ENABLED, "true") | ||
.setSystemProperty(CTE_MATERIALIZATION_STRATEGY, "NONE") | ||
.build(); | ||
} | ||
@Override | ||
protected Session getMaterializedSession() | ||
{ | ||
return Session.builder(super.getSession()) | ||
.setSystemProperty(PUSHDOWN_SUBFIELDS_ENABLED, "true") | ||
.setSystemProperty(PARTITIONING_PROVIDER_CATALOG, "hive") | ||
.setSystemProperty(CTE_MATERIALIZATION_STRATEGY, "ALL") | ||
.setSystemProperty(CTE_FILTER_AND_PROJECTION_PUSHDOWN_ENABLED, "true") | ||
.build(); | ||
} | ||
} |