forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Serialized Presto Page in Thrift UDF service
PrestoThriftBlock has limited type support (only supports array<bigint> for array types, no support for map types). The overall performance of Presto SerializedPage is better than using PrestoThriftBLock. Benchmark (typeSignature) Mode Cnt Score Error Units BenchmarkThriftPageSerDe.testSerializedPageSerde boolean avgt 20 166566.169 ± 18267.340 ns/op BenchmarkThriftPageSerDe.testSerializedPageSerde bigint avgt 20 216654.607 ± 32235.276 ns/op BenchmarkThriftPageSerDe.testSerializedPageSerde varchar avgt 20 1250560.212 ± 176070.250 ns/op BenchmarkThriftPageSerDe.testSerializedPageSerde array<bigint> avgt 20 488109.753 ± 55165.876 ns/op BenchmarkThriftPageSerDe.testSerializedPageSerde map<int, real> avgt 20 633627.296 ± 73473.657 ns/op BenchmarkThriftPageSerDe.testThriftPageSerde boolean avgt 20 335448.969 ± 22666.853 ns/op BenchmarkThriftPageSerDe.testThriftPageSerde bigint avgt 20 432328.947 ± 46902.591 ns/op BenchmarkThriftPageSerDe.testThriftPageSerde varchar avgt 20 1658012.817 ± 196150.353 ns/op BenchmarkThriftPageSerDe.testThriftPageSerde array<bigint> avgt 20 1291312.373 ± 128077.209 ns/op BenchmarkThriftPageSerDe.testThriftPageSerde map<int, real> avgt 20 2.971 ± 0.373 ns/op
- Loading branch information
Showing
14 changed files
with
471 additions
and
18 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
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
36 changes: 36 additions & 0 deletions
36
.../facebook/presto/functionNamespace/execution/thrift/ThriftSqlFunctionExecutionConfig.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,36 @@ | ||
/* | ||
* 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.functionNamespace.execution.thrift; | ||
|
||
import com.facebook.airlift.configuration.Config; | ||
import com.facebook.presto.thrift.api.udf.ThriftUdfPageFormat; | ||
|
||
import static com.facebook.presto.thrift.api.udf.ThriftUdfPageFormat.PRESTO_THRIFT; | ||
|
||
public class ThriftSqlFunctionExecutionConfig | ||
{ | ||
private ThriftUdfPageFormat thriftPageFormat = PRESTO_THRIFT; | ||
|
||
@Config("thrift-page-format") | ||
public ThriftSqlFunctionExecutionConfig setThriftPageFormat(String pageFormat) | ||
{ | ||
this.thriftPageFormat = ThriftUdfPageFormat.valueOf(pageFormat.toUpperCase()); | ||
return this; | ||
} | ||
|
||
public ThriftUdfPageFormat getThriftPageFormat() | ||
{ | ||
return thriftPageFormat; | ||
} | ||
} |
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
Oops, something went wrong.