-
Notifications
You must be signed in to change notification settings - Fork 3
test: Add E2E unit tests for CLP connector. #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
4ddd424
16e7bf6
dbd1c49
9ae9d0e
64713dc
13962cb
59d7898
55d3a9f
a186ee5
c7aac44
8cc8e90
bd25ca8
ec7ded5
455f5a6
7b8a9cd
96e7bd7
7c60cee
d1ec5cd
8abeb89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,170 @@ | ||||||
| /* | ||||||
| * 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.plugin.clp; | ||||||
|
|
||||||
| import com.facebook.airlift.log.Logger; | ||||||
| import com.facebook.presto.Session; | ||||||
| import com.facebook.presto.plugin.clp.mockdb.ClpMockMetadataDatabase; | ||||||
| import com.facebook.presto.plugin.clp.mockdb.table.ArchivesTableRows; | ||||||
| import com.facebook.presto.plugin.clp.mockdb.table.ColumnMetadataTableRows; | ||||||
| import com.facebook.presto.spi.security.Identity; | ||||||
| import com.facebook.presto.spi.security.SelectedRole; | ||||||
| import com.facebook.presto.tests.DistributedQueryRunner; | ||||||
| import com.google.common.collect.ImmutableList; | ||||||
| import com.google.common.collect.ImmutableMap; | ||||||
|
|
||||||
| import java.net.URI; | ||||||
| import java.util.List; | ||||||
| import java.util.Map; | ||||||
| import java.util.Optional; | ||||||
| import java.util.function.BiFunction; | ||||||
|
|
||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.Boolean; | ||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.ClpString; | ||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.DateString; | ||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.Integer; | ||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.NullValue; | ||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.UnstructuredArray; | ||||||
| import static com.facebook.presto.plugin.clp.metadata.ClpSchemaTreeNodeType.VarString; | ||||||
| import static com.facebook.presto.spi.security.SelectedRole.Type.ROLE; | ||||||
| import static com.facebook.presto.testing.TestingSession.testSessionBuilder; | ||||||
|
|
||||||
| public class ClpQueryRunner | ||||||
| { | ||||||
| private static final Logger log = Logger.get(ClpQueryRunner.class); | ||||||
anlowee marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| public static final String CLP_CATALOG = "clp"; | ||||||
| public static final String CLP_CONNECTOR = CLP_CATALOG; | ||||||
| public static final int DEFAULT_NUM_OF_WORKERS = 1; | ||||||
| public static final String DEFAULT_SCHEMA = "default"; | ||||||
| public static final String DEFAULT_TABLE_NAME = "test_e2e"; | ||||||
|
|
||||||
| private DistributedQueryRunner actualQueryRunner; | ||||||
|
||||||
| private DistributedQueryRunner actualQueryRunner; | |
| private DistributedQueryRunner queryRunner; |
anlowee marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably make it more general since there's a chance the udf test will use this QueryRunner