File tree 11 files changed +25
-9
lines changed
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type
seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus
11 files changed +25
-9
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- package org .apache .seatunnel .common .constants ;
18
+ package org .apache .seatunnel .api .table .type ;
19
+
20
+ import org .apache .seatunnel .api .table .catalog .Column ;
19
21
20
22
import lombok .Getter ;
21
23
24
+ /**
25
+ * Common option keys of SeaTunnel {@link Column#getOptions()} / {@link SeaTunnelRow#getOptions()}.
26
+ * Used to store some extra information of the column value.
27
+ */
22
28
@ Getter
23
29
public enum CommonOptions {
30
+ /**
31
+ * The key of {@link Column#getOptions()} to specify the column value is a json format string.
32
+ */
24
33
JSON ("Json" ),
34
+ /** The key of {@link Column#getOptions()} to specify the column value is a metadata field. */
25
35
METADATA ("Metadata" ),
36
+ /**
37
+ * The key of {@link SeaTunnelRow#getOptions()} to store the partition value of the row value.
38
+ */
26
39
PARTITION ("Partition" ),
27
40
;
28
41
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public final class SeaTunnelRow implements Serializable {
36
36
37
37
private volatile int size ;
38
38
39
- private Map <String , Object > options = new HashMap <>() ;
39
+ private Map <String , Object > options ;
40
40
41
41
public SeaTunnelRow (int arity ) {
42
42
this .fields = new Object [arity ];
@@ -75,6 +75,9 @@ public RowKind getRowKind() {
75
75
}
76
76
77
77
public Map <String , Object > getOptions () {
78
+ if (options == null ) {
79
+ options = new HashMap <>();
80
+ }
78
81
return options ;
79
82
}
80
83
Original file line number Diff line number Diff line change 32
32
import org .apache .seatunnel .api .table .catalog .exception .DatabaseNotExistException ;
33
33
import org .apache .seatunnel .api .table .catalog .exception .TableAlreadyExistException ;
34
34
import org .apache .seatunnel .api .table .catalog .exception .TableNotExistException ;
35
- import org .apache .seatunnel .common . constants .CommonOptions ;
35
+ import org .apache .seatunnel .api . table . type .CommonOptions ;
36
36
import org .apache .seatunnel .connectors .seatunnel .milvus .config .MilvusSinkConfig ;
37
37
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectionErrorCode ;
38
38
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectorException ;
Original file line number Diff line number Diff line change 20
20
import org .apache .seatunnel .api .configuration .ReadonlyConfig ;
21
21
import org .apache .seatunnel .api .table .catalog .CatalogTable ;
22
22
import org .apache .seatunnel .api .table .catalog .PrimaryKey ;
23
+ import org .apache .seatunnel .api .table .type .CommonOptions ;
23
24
import org .apache .seatunnel .api .table .type .SeaTunnelRow ;
24
- import org .apache .seatunnel .common .constants .CommonOptions ;
25
25
import org .apache .seatunnel .common .utils .SeaTunnelException ;
26
26
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectionErrorCode ;
27
27
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectorException ;
Original file line number Diff line number Diff line change 24
24
import org .apache .seatunnel .api .table .catalog .CatalogTable ;
25
25
import org .apache .seatunnel .api .table .catalog .TablePath ;
26
26
import org .apache .seatunnel .api .table .catalog .TableSchema ;
27
+ import org .apache .seatunnel .api .table .type .CommonOptions ;
27
28
import org .apache .seatunnel .api .table .type .SeaTunnelRow ;
28
- import org .apache .seatunnel .common .constants .CommonOptions ;
29
29
import org .apache .seatunnel .connectors .seatunnel .milvus .config .MilvusSourceConfig ;
30
30
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectionErrorCode ;
31
31
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectorException ;
Original file line number Diff line number Diff line change 19
19
20
20
import org .apache .seatunnel .api .table .catalog .CatalogTable ;
21
21
import org .apache .seatunnel .api .table .catalog .Column ;
22
- import org .apache .seatunnel .common . constants .CommonOptions ;
22
+ import org .apache .seatunnel .api . table . type .CommonOptions ;
23
23
24
24
import io .milvus .v2 .client .MilvusClientV2 ;
25
25
import io .milvus .v2 .service .collection .request .CreateCollectionReq ;
Original file line number Diff line number Diff line change 27
27
import org .apache .seatunnel .api .table .catalog .TablePath ;
28
28
import org .apache .seatunnel .api .table .catalog .TableSchema ;
29
29
import org .apache .seatunnel .api .table .catalog .VectorIndex ;
30
- import org .apache .seatunnel .common . constants .CommonOptions ;
30
+ import org .apache .seatunnel .api . table . type .CommonOptions ;
31
31
import org .apache .seatunnel .connectors .seatunnel .milvus .catalog .MilvusOptions ;
32
32
import org .apache .seatunnel .connectors .seatunnel .milvus .config .MilvusSourceConfig ;
33
33
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectionErrorCode ;
Original file line number Diff line number Diff line change 23
23
import org .apache .seatunnel .api .table .catalog .PrimaryKey ;
24
24
import org .apache .seatunnel .api .table .catalog .exception .CatalogException ;
25
25
import org .apache .seatunnel .api .table .type .ArrayType ;
26
+ import org .apache .seatunnel .api .table .type .CommonOptions ;
26
27
import org .apache .seatunnel .api .table .type .SeaTunnelDataType ;
27
28
import org .apache .seatunnel .api .table .type .SeaTunnelRow ;
28
29
import org .apache .seatunnel .api .table .type .SeaTunnelRowType ;
29
30
import org .apache .seatunnel .api .table .type .SqlType ;
30
- import org .apache .seatunnel .common .constants .CommonOptions ;
31
31
import org .apache .seatunnel .common .utils .BufferUtils ;
32
32
import org .apache .seatunnel .common .utils .JsonUtils ;
33
33
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectionErrorCode ;
Original file line number Diff line number Diff line change 23
23
import org .apache .seatunnel .api .table .catalog .TableSchema ;
24
24
import org .apache .seatunnel .api .table .type .ArrayType ;
25
25
import org .apache .seatunnel .api .table .type .BasicType ;
26
+ import org .apache .seatunnel .api .table .type .CommonOptions ;
26
27
import org .apache .seatunnel .api .table .type .RowKind ;
27
28
import org .apache .seatunnel .api .table .type .SeaTunnelDataType ;
28
29
import org .apache .seatunnel .api .table .type .SeaTunnelRow ;
29
30
import org .apache .seatunnel .api .table .type .SeaTunnelRowType ;
30
31
import org .apache .seatunnel .api .table .type .SqlType ;
31
32
import org .apache .seatunnel .api .table .type .VectorType ;
32
- import org .apache .seatunnel .common .constants .CommonOptions ;
33
33
import org .apache .seatunnel .common .exception .CommonErrorCode ;
34
34
import org .apache .seatunnel .common .utils .BufferUtils ;
35
35
import org .apache .seatunnel .connectors .seatunnel .milvus .exception .MilvusConnectorException ;
You can’t perform that action at this time.
0 commit comments