-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat(native): Add TextReader registration #25995
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 all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can move these tests to presto-native-tests module to avoid inflating presto-native-execution.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the tpch and tpcds tests are currently in presto-native-execution module. Are we planning to move them to presto-native-tests? If so, I think it might be better to do that in a separate PR.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xin-zhang2 Tpch and tpcds tests with Parquet are a smoke test for native engine, so they will continue to be a part of presto-native-execution. These tests are mostly for text reading abilities. And that is not a core feature as such. So hence was the recommendation to move to presto-native-tests which is the fuil suite of presto native tests.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved the tpch and tpchds query tests for TextReader to presto-native-tests. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * 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.nativetests; | ||
|
|
||
| import com.facebook.presto.nativeworker.AbstractTestNativeTpcdsQueries; | ||
| import com.facebook.presto.nativeworker.PrestoNativeQueryRunnerUtils; | ||
| import com.facebook.presto.testing.ExpectedQueryRunner; | ||
| import com.facebook.presto.testing.QueryRunner; | ||
|
|
||
| public class TestTextReaderWithTpcdsQueriesUsingThrift | ||
| extends AbstractTestNativeTpcdsQueries | ||
| { | ||
| private static final String TEXTFILE = "TEXTFILE"; | ||
|
|
||
| @Override | ||
| protected QueryRunner createQueryRunner() | ||
| throws Exception | ||
| { | ||
| return PrestoNativeQueryRunnerUtils.nativeHiveQueryRunnerBuilder() | ||
| .setStorageFormat(TEXTFILE) | ||
| .setAddStorageFormatToPath(true) | ||
| .setUseThrift(true) | ||
| .build(); | ||
| } | ||
|
|
||
| @Override | ||
| protected ExpectedQueryRunner createExpectedQueryRunner() | ||
| throws Exception | ||
| { | ||
| this.storageFormat = TEXTFILE; | ||
| return PrestoNativeQueryRunnerUtils.javaHiveQueryRunnerBuilder() | ||
| .setStorageFormat(this.storageFormat) | ||
| .setAddStorageFormatToPath(true) | ||
| .build(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * 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.nativetests; | ||
|
|
||
| import com.facebook.presto.nativeworker.AbstractTestNativeTpchQueries; | ||
| import com.facebook.presto.nativeworker.PrestoNativeQueryRunnerUtils; | ||
| import com.facebook.presto.testing.ExpectedQueryRunner; | ||
| import com.facebook.presto.testing.QueryRunner; | ||
|
|
||
| public class TestTextReaderWithTpchQueriesUsingJSON | ||
| extends AbstractTestNativeTpchQueries | ||
| { | ||
| private static final String TEXTFILE = "TEXTFILE"; | ||
|
|
||
| @Override | ||
| protected QueryRunner createQueryRunner() throws Exception | ||
| { | ||
| return PrestoNativeQueryRunnerUtils.nativeHiveQueryRunnerBuilder() | ||
| .setStorageFormat(TEXTFILE) | ||
| .setAddStorageFormatToPath(true) | ||
| .build(); | ||
| } | ||
|
|
||
| @Override | ||
| protected ExpectedQueryRunner createExpectedQueryRunner() throws Exception | ||
| { | ||
|
BryanCutler marked this conversation as resolved.
|
||
| return PrestoNativeQueryRunnerUtils.javaHiveQueryRunnerBuilder() | ||
| .setStorageFormat(TEXTFILE) | ||
| .setAddStorageFormatToPath(true) | ||
| .build(); | ||
| } | ||
| } | ||
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.
Just to double confirm, so internally we're registering text reader factory? @zacw7
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.
internally it's a different registration mechanism. let me sync with u internally