File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
presto-clp/src/main/java/com/facebook/presto/plugin/clp Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ public enum ClpErrorCode
3030 CLP_UNSUPPORTED_CONFIG_OPTION (4 , EXTERNAL ),
3131
3232 CLP_SPLIT_FILTER_CONFIG_NOT_FOUND (10 , USER_ERROR ),
33- CLP_MANDATORY_SPLIT_FILTER_NOT_VALID (11 , USER_ERROR );
33+ CLP_MANDATORY_SPLIT_FILTER_NOT_VALID (11 , USER_ERROR ),
34+ CLP_UNSUPPORTED_SPLIT_FILTER_SOURCE (12 , EXTERNAL );
3435
3536 private final ErrorCode errorCode ;
3637
Original file line number Diff line number Diff line change 2929import static com .facebook .presto .plugin .clp .ClpConfig .SplitFilterProviderType ;
3030import static com .facebook .presto .plugin .clp .ClpConfig .SplitProviderType ;
3131import static com .facebook .presto .plugin .clp .ClpErrorCode .CLP_UNSUPPORTED_METADATA_SOURCE ;
32+ import static com .facebook .presto .plugin .clp .ClpErrorCode .CLP_UNSUPPORTED_SPLIT_FILTER_SOURCE ;
3233import static com .facebook .presto .plugin .clp .ClpErrorCode .CLP_UNSUPPORTED_SPLIT_SOURCE ;
3334
3435public class ClpModule
@@ -48,6 +49,9 @@ protected void setup(Binder binder)
4849 if (SplitFilterProviderType .MYSQL == config .getSplitFilterProviderType ()) {
4950 binder .bind (ClpSplitFilterProvider .class ).to (ClpMySqlSplitFilterProvider .class ).in (Scopes .SINGLETON );
5051 }
52+ else {
53+ throw new PrestoException (CLP_UNSUPPORTED_SPLIT_FILTER_SOURCE , "Unsupported split filter provider type: " + config .getSplitFilterProviderType ());
54+ }
5155
5256 if (config .getMetadataProviderType () == MetadataProviderType .MYSQL ) {
5357 binder .bind (ClpMetadataProvider .class ).to (ClpMySqlMetadataProvider .class ).in (Scopes .SINGLETON );
You can’t perform that action at this time.
0 commit comments