-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Transport to use API from Trino v406 (#128)
* Upgrade Transport to use API from Trino v406 * Upgrade Transport to use API from Trino v406 * PoC of Trino Connector * PoC of Trino Connector * address comments and remove unreachable artifactory repo * address comments * fix the issue of Maven repo * fixing conjar repo issue in transportable-udfs-examples * address comments * address comments * address comments * address comments * address comments * address comments * address comments * add some comments * remove conjar repo * address comments --------- Co-authored-by: Yiqiang Ding <yiqding@yiqding-mn1.linkedin.biz>
- Loading branch information
Showing
37 changed files
with
768 additions
and
119 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
File renamed without changes.
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 |
---|---|---|
|
@@ -31,9 +31,6 @@ subprojects { | |
} | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url "https://conjars.org/repo" | ||
} | ||
} | ||
} | ||
|
||
|
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
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
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
87 changes: 87 additions & 0 deletions
87
...-trino/src/main/java/com/linkedin/transport/test/trino/TrinoTestFunctionDependencies.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,87 @@ | ||
/** | ||
* Copyright 2023 LinkedIn Corporation. All rights reserved. | ||
* Licensed under the BSD-2 Clause license. | ||
* See LICENSE in the project root for license information. | ||
*/ | ||
package com.linkedin.transport.test.trino; | ||
|
||
import io.trino.spi.function.FunctionDependencies; | ||
import io.trino.spi.function.FunctionNullability; | ||
import io.trino.spi.function.InvocationConvention; | ||
import io.trino.spi.function.OperatorType; | ||
import io.trino.spi.function.QualifiedFunctionName; | ||
import io.trino.spi.function.ScalarFunctionImplementation; | ||
import io.trino.spi.type.Type; | ||
import io.trino.spi.type.TypeManager; | ||
import io.trino.spi.type.TypeSignature; | ||
import io.trino.testing.LocalQueryRunner; | ||
import java.util.List; | ||
|
||
|
||
public class TrinoTestFunctionDependencies implements FunctionDependencies { | ||
private final TypeManager typeManager; | ||
private final LocalQueryRunner queryRunner; | ||
|
||
public TrinoTestFunctionDependencies(TypeManager typeManager, LocalQueryRunner queryRunner) { | ||
this.typeManager = typeManager; | ||
this.queryRunner = queryRunner; | ||
} | ||
|
||
@Override | ||
public Type getType(TypeSignature typeSignature) { | ||
return typeManager.getType(typeSignature); | ||
} | ||
|
||
@Override | ||
public FunctionNullability getFunctionNullability(QualifiedFunctionName name, List<Type> parameterTypes) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public FunctionNullability getOperatorNullability(OperatorType operatorType, List<Type> parameterTypes) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public FunctionNullability getCastNullability(Type fromType, Type toType) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ScalarFunctionImplementation getScalarFunctionImplementation(QualifiedFunctionName name, | ||
List<Type> parameterTypes, InvocationConvention invocationConvention) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ScalarFunctionImplementation getScalarFunctionImplementationSignature(QualifiedFunctionName name, | ||
List<TypeSignature> parameterTypes, InvocationConvention invocationConvention) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ScalarFunctionImplementation getOperatorImplementation(OperatorType operatorType, List<Type> parameterTypes, | ||
InvocationConvention invocationConvention) { | ||
return queryRunner.getFunctionManager() | ||
.getScalarFunctionImplementation(queryRunner.getMetadata().resolveOperator(queryRunner.getDefaultSession(), operatorType, parameterTypes), | ||
invocationConvention); | ||
} | ||
|
||
@Override | ||
public ScalarFunctionImplementation getOperatorImplementationSignature(OperatorType operatorType, | ||
List<TypeSignature> parameterTypes, InvocationConvention invocationConvention) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ScalarFunctionImplementation getCastImplementation(Type fromType, Type toType, | ||
InvocationConvention invocationConvention) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ScalarFunctionImplementation getCastImplementationSignature(TypeSignature fromType, TypeSignature toType, | ||
InvocationConvention invocationConvention) { | ||
return null; | ||
} | ||
} |
Oops, something went wrong.