You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sh...@apache.org on 2019/07/05 14:47:11 UTC

[flink] branch master updated: [FLINK-12744][ml] add shared params in ml package

This is an automated email from the ASF dual-hosted git repository.

shaoxuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new f18481e  [FLINK-12744][ml] add shared params in ml package
f18481e is described below

commit f18481ee54b61a737ae1426ff4dcaf7006e0edbd
Author: xuyang1706 <xu...@gmail.com>
AuthorDate: Wed Jun 19 21:15:09 2019 +0800

    [FLINK-12744][ml] add shared params in ml package
    
    This closes #8632
---
 .../ml/params/shared/colname/HasOutputCol.java     | 47 ++++++++++++++++++++++
 .../shared/colname/HasOutputColDefaultAsNull.java  | 47 ++++++++++++++++++++++
 .../ml/params/shared/colname/HasOutputCols.java    | 47 ++++++++++++++++++++++
 .../shared/colname/HasOutputColsDefaultAsNull.java | 47 ++++++++++++++++++++++
 .../ml/params/shared/colname/HasPredictionCol.java | 44 ++++++++++++++++++++
 .../shared/colname/HasPredictionDetailCol.java     | 45 +++++++++++++++++++++
 .../ml/params/shared/colname/HasReservedCols.java  | 44 ++++++++++++++++++++
 .../ml/params/shared/colname/HasSelectedCol.java   | 47 ++++++++++++++++++++++
 .../colname/HasSelectedColDefaultAsNull.java       | 47 ++++++++++++++++++++++
 .../ml/params/shared/colname/HasSelectedCols.java  | 47 ++++++++++++++++++++++
 .../colname/HasSelectedColsDefaultAsNull.java      | 47 ++++++++++++++++++++++
 11 files changed, 509 insertions(+)

diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputCol.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputCol.java
new file mode 100644
index 0000000..8d028fe
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputCol.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the name of the output column.
+ * @see HasOutputCols
+ * @see HasOutputColDefaultAsNull
+ * @see HasOutputColsDefaultAsNull
+ */
+public interface HasOutputCol<T> extends WithParams <T> {
+
+	ParamInfo <String> OUTPUT_COL = ParamInfoFactory
+		.createParamInfo("outputCol", String.class)
+		.setDescription("Name of the output column")
+		.setRequired()
+		.build();
+
+	default String getOutputCol() {
+		return get(OUTPUT_COL);
+	}
+
+	default T setOutputCol(String value) {
+		return set(OUTPUT_COL, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputColDefaultAsNull.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputColDefaultAsNull.java
new file mode 100644
index 0000000..817f78a
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputColDefaultAsNull.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying name of the output column with a null default value.
+ * @see HasOutputCol
+ * @see HasOutputCols
+ * @see HasOutputColsDefaultAsNull
+ */
+public interface HasOutputColDefaultAsNull<T> extends WithParams <T> {
+
+	ParamInfo <String> OUTPUT_COL = ParamInfoFactory
+		.createParamInfo("outputCol", String.class)
+		.setDescription("Name of the output column")
+		.setHasDefaultValue(null)
+		.build();
+
+	default String getOutputCol() {
+		return get(OUTPUT_COL);
+	}
+
+	default T setOutputCol(String value) {
+		return set(OUTPUT_COL, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputCols.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputCols.java
new file mode 100644
index 0000000..7487a24
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputCols.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying names of multiple output columns.
+ * @see HasOutputCol
+ * @see HasOutputColDefaultAsNull
+ * @see HasOutputColsDefaultAsNull
+ */
+public interface HasOutputCols<T> extends WithParams <T> {
+
+	ParamInfo <String[]> OUTPUT_COLS = ParamInfoFactory
+		.createParamInfo("outputCols", String[].class)
+		.setDescription("Names of the output columns")
+		.setRequired()
+		.build();
+
+	default String[] getOutputCols() {
+		return get(OUTPUT_COLS);
+	}
+
+	default T setOutputCols(String... value) {
+		return set(OUTPUT_COLS, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputColsDefaultAsNull.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputColsDefaultAsNull.java
new file mode 100644
index 0000000..1394b0f3
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasOutputColsDefaultAsNull.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying names of multiple output columns. The default parameter value is null.
+ * @see HasOutputCol
+ * @see HasOutputColDefaultAsNull
+ * @see HasOutputCols
+ */
+public interface HasOutputColsDefaultAsNull<T> extends WithParams <T> {
+
+	ParamInfo <String[]> OUTPUT_COLS = ParamInfoFactory
+		.createParamInfo("outputCols", String[].class)
+		.setDescription("Names of the output columns")
+		.setHasDefaultValue(null)
+		.build();
+
+	default String[] getOutputCols() {
+		return get(OUTPUT_COLS);
+	}
+
+	default T setOutputCols(String... value) {
+		return set(OUTPUT_COLS, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasPredictionCol.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasPredictionCol.java
new file mode 100644
index 0000000..6edfbca
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasPredictionCol.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the column name of the prediction.
+ */
+public interface HasPredictionCol<T> extends WithParams <T> {
+
+	ParamInfo <String> PREDICTION_COL = ParamInfoFactory
+		.createParamInfo("predictionCol", String.class)
+		.setDescription("Column name of prediction.")
+		.setRequired()
+		.build();
+
+	default String getPredictionCol() {
+		return get(PREDICTION_COL);
+	}
+
+	default T setPredictionCol(String value) {
+		return set(PREDICTION_COL, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasPredictionDetailCol.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasPredictionDetailCol.java
new file mode 100644
index 0000000..1681374
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasPredictionDetailCol.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the column name of prediction detail.
+ *
+ * <p>The detail is the information of prediction result, such as the probability of each label in classifier.
+ */
+public interface HasPredictionDetailCol<T> extends WithParams <T> {
+
+	ParamInfo <String> PREDICTION_DETAIL_COL = ParamInfoFactory
+		.createParamInfo("predictionDetailCol", String.class)
+		.setDescription("Column name of prediction result, it will include detailed info.")
+		.build();
+
+	default String getPredictionDetailCol() {
+		return get(PREDICTION_DETAIL_COL);
+	}
+
+	default T setPredictionDetailCol(String value) {
+		return set(PREDICTION_DETAIL_COL, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasReservedCols.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasReservedCols.java
new file mode 100644
index 0000000..a14327e
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasReservedCols.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the names of the columns to be retained in the output table.
+ */
+public interface HasReservedCols<T> extends WithParams <T> {
+
+	ParamInfo <String[]> RESERVED_COLS = ParamInfoFactory
+		.createParamInfo("reservedCols", String[].class)
+		.setDescription("Names of the columns to be retained in the output table")
+		.setHasDefaultValue(null)
+		.build();
+
+	default String[] getReservedCols() {
+		return get(RESERVED_COLS);
+	}
+
+	default T setReservedCols(String... value) {
+		return set(RESERVED_COLS, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedCol.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedCol.java
new file mode 100644
index 0000000..a0e4880
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedCol.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the name of the table column.
+ * @see HasSelectedColDefaultAsNull
+ * @see HasSelectedCols
+ * @see HasSelectedColsDefaultAsNull
+ */
+public interface HasSelectedCol<T> extends WithParams <T> {
+
+	ParamInfo <String> SELECTED_COL = ParamInfoFactory
+		.createParamInfo("selectedCol", String.class)
+		.setDescription("Name of the selected column used for processing")
+		.setRequired()
+		.build();
+
+	default String getSelectedCol() {
+		return get(SELECTED_COL);
+	}
+
+	default T setSelectedCol(String value) {
+		return set(SELECTED_COL, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedColDefaultAsNull.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedColDefaultAsNull.java
new file mode 100644
index 0000000..23b3705
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedColDefaultAsNull.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the name of the table column with null default value.
+ * @see HasSelectedCol
+ * @see HasSelectedCols
+ * @see HasSelectedColsDefaultAsNull
+ */
+public interface HasSelectedColDefaultAsNull<T> extends WithParams <T> {
+
+	ParamInfo <String> SELECTED_COL = ParamInfoFactory
+		.createParamInfo("selectedCol", String.class)
+		.setDescription("Name of the selected column used for processing")
+		.setHasDefaultValue(null)
+		.build();
+
+	default String getSelectedCol() {
+		return get(SELECTED_COL);
+	}
+
+	default T setSelectedCol(String value) {
+		return set(SELECTED_COL, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedCols.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedCols.java
new file mode 100644
index 0000000..35fe368
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedCols.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the name of multiple table columns.
+ * @see HasSelectedCol
+ * @see HasSelectedColDefaultAsNull
+ * @see HasSelectedColsDefaultAsNull
+ */
+public interface HasSelectedCols<T> extends WithParams <T> {
+
+	ParamInfo <String[]> SELECTED_COLS = ParamInfoFactory
+		.createParamInfo("selectedCols", String[].class)
+		.setDescription("Names of the columns used for processing")
+		.setRequired()
+		.build();
+
+	default String[] getSelectedCols() {
+		return get(SELECTED_COLS);
+	}
+
+	default T setSelectedCols(String... value) {
+		return set(SELECTED_COLS, value);
+	}
+}
diff --git a/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedColsDefaultAsNull.java b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedColsDefaultAsNull.java
new file mode 100644
index 0000000..7a15ae4
--- /dev/null
+++ b/flink-ml-parent/flink-ml-lib/src/main/java/org/apache/flink/ml/params/shared/colname/HasSelectedColsDefaultAsNull.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.flink.ml.params.shared.colname;
+
+import org.apache.flink.ml.api.misc.param.ParamInfo;
+import org.apache.flink.ml.api.misc.param.ParamInfoFactory;
+import org.apache.flink.ml.api.misc.param.WithParams;
+
+/**
+ * An interface for classes with a parameter specifying the name of multiple table columns with null default value.
+ * @see HasSelectedCol
+ * @see HasSelectedColDefaultAsNull
+ * @see HasSelectedCols
+ */
+public interface HasSelectedColsDefaultAsNull<T> extends WithParams <T> {
+
+	ParamInfo <String[]> SELECTED_COLS = ParamInfoFactory
+		.createParamInfo("selectedCols", String[].class)
+		.setDescription("Names of the columns used for processing")
+		.setHasDefaultValue(null)
+		.build();
+
+	default String[] getSelectedCols() {
+		return get(SELECTED_COLS);
+	}
+
+	default T setSelectedCols(String... value) {
+		return set(SELECTED_COLS, value);
+	}
+}