[Native] Pass Configs to Type Manager#26001
Draft
saitejagoruganthu wants to merge 1 commit intoprestodb:masterfrom
Draft
[Native] Pass Configs to Type Manager#26001saitejagoruganthu wants to merge 1 commit intoprestodb:masterfrom
saitejagoruganthu wants to merge 1 commit intoprestodb:masterfrom
Conversation
The committers listed above are authorized under a signed CLA. |
Contributor
Reviewer's GuideThis PR extends the TypeManager loading path to accept configuration properties across the SPI, core engine, and testing layers, and integrates HTTP client configuration into the native sidecar type manager with corresponding injection and verification in tests. Sequence diagram for TypeManager loading with configuration propertiessequenceDiagram
participant StaticTypeManagerStore
participant FunctionAndTypeManager
participant TypeManagerFactory
participant NativeTypeManagerFactory
participant NativeTypeManager
participant HttpClient
StaticTypeManagerStore->>FunctionAndTypeManager: loadTypeManager(typeManagerName, properties)
FunctionAndTypeManager->>TypeManagerFactory: create(TypeManagerContext, properties)
TypeManagerFactory->>NativeTypeManagerFactory: create(TypeManagerContext, properties)
NativeTypeManagerFactory->>NativeTypeManager: NativeTypeManager(TypeManager, HttpClient)
NativeTypeManager->>HttpClient: (injected)
NativeTypeManager-->>NativeTypeManagerFactory: instance returned
NativeTypeManagerFactory-->>TypeManagerFactory: instance returned
TypeManagerFactory-->>FunctionAndTypeManager: instance returned
FunctionAndTypeManager-->>StaticTypeManagerStore: registration complete
Class diagram for updated TypeManagerFactory and related classesclassDiagram
class TypeManagerFactory {
<<interface>>
+String getName()
+TypeManager create(TypeManagerContext context, Map<String, String> config)
}
class NativeTypeManagerFactory {
+String getName()
+TypeManager create(TypeManagerContext context, Map<String, String> config)
}
TypeManagerFactory <|.. NativeTypeManagerFactory
class NativeTypeManager {
+NativeTypeManager(TypeManager typeManager, HttpClient httpClient)
+HttpClient getHttpClient()
}
class TypeManagerContext {
+TypeManager getTypeManager()
}
class FunctionAndTypeManager {
+void loadTypeManager(String typeManagerName, Map<String, String> properties)
+Map<String, TypeManager> getTypeManagers()
}
class StaticTypeManagerStore {
-void loadTypeManager(String catalogName, Map<String, String> properties)
}
class QueryRunner {
+void loadTypeManager(String typeManagerName, Map<String, String> properties)
}
NativeTypeManagerFactory --> NativeTypeManager
NativeTypeManagerFactory --> TypeManagerContext
NativeTypeManager --> HttpClient
FunctionAndTypeManager --> TypeManager
StaticTypeManagerStore --> FunctionAndTypeManager
QueryRunner --> FunctionAndTypeManager
Class diagram for NativeTypeManager with injected HttpClientclassDiagram
class NativeTypeManager {
+NativeTypeManager(TypeManager typeManager, HttpClient httpClient)
+HttpClient getHttpClient()
-TypeManager typeManager
-HttpClient httpClient
}
NativeTypeManager --> HttpClient
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
e750f08 to
6f098e4
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added support for passing down configuration properties to
NativeTypeManagerduring initialization.Motivation and Context
Currently, the NativeTypeManager does not accept or propagate configuration properties during initialization. This change enables the NativeTypeManager to receive and utilize configuration properties (specifically HTTP client configuration) similar to other components in the system like NativeSystemSessionPropertyProvider and NativeFunctionDefinitionProvider.
#25894
Test Plan
Added test case in
testHttpClientProperties()method to verify that the sidecar.http-client.max-content-length configuration property is properly passed down to NativeTypeManagerTest verifies that the NativeTypeManager's HttpClient has the correct max content length configuration
Test follows the same pattern as existing tests for NativeSystemSessionPropertyProvider and NativeFunctionDefinitionProvider
All existing tests continue to pass, ensuring no regression