You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/11/04 04:32:45 UTC

[GitHub] [inlong] e-mhui opened a new pull request, #6404: [INLONG-6402][Sort] Modify the metadata field of oracle connector

e-mhui opened a new pull request, #6404:
URL: https://github.com/apache/inlong/pull/6404

   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   - Title Example: [INLONG-XYZ][Component] Title of the pull request
   
   *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)*
   
   - Fixes #XYZ
   
   ### Motivation
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve?*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on a diff in pull request #6404: [INLONG-6402][Sort] Modify the metadata field of oracle connector

Posted by GitBox <gi...@apache.org>.
gong commented on code in PR #6404:
URL: https://github.com/apache/inlong/pull/6404#discussion_r1013689847


##########
inlong-sort/sort-connectors/oracle-cdc/src/main/java/org/apache/inlong/sort/cdc/oracle/table/OracleReadableMetaData.java:
##########
@@ -47,6 +47,70 @@
 /** Defines the supported metadata columns for {@link OracleTableSource}. */
 public enum OracleReadableMetaData {
 
+    /**
+     * Name of the table that contain the row.
+     */
+    TABLE_NAME(
+            "table_name",
+            DataTypes.STRING().notNull(),
+            new MetadataConverter() {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public Object read(SourceRecord record) {
+                    return StringData.fromString(getMetaData(record, AbstractSourceInfo.TABLE_NAME_KEY));
+                }
+            }),
+
+    /**
+     * Name of the schema that contain the row.
+     */
+    SCHEMA_NAME(
+            "schema_name",
+            DataTypes.STRING().notNull(),
+            new MetadataConverter() {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public Object read(SourceRecord record) {
+                    return StringData.fromString(getMetaData(record, AbstractSourceInfo.SCHEMA_NAME_KEY));
+                }
+            }),
+
+    /**
+     * Name of the database that contain the row.
+     */
+    DATABASE_NAME(
+            "database_name",
+            DataTypes.STRING().notNull(),
+            new MetadataConverter() {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public Object read(SourceRecord record) {
+                    return StringData.fromString(getMetaData(record, AbstractSourceInfo.DATABASE_NAME_KEY));
+                }
+            }),
+
+    /**
+     * It indicates the time that the change was made in the database. If the record is read from
+     * snapshot of the table instead of the binlog, the value is always 0.

Review Comment:
   binlog is concept of mysql



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #6404: [INLONG-6402][Sort] Modify the metadata field of oracle connector

Posted by GitBox <gi...@apache.org>.
yunqingmoswu commented on code in PR #6404:
URL: https://github.com/apache/inlong/pull/6404#discussion_r1013672117


##########
inlong-sort/sort-connectors/oracle-cdc/src/main/java/org/apache/inlong/sort/cdc/oracle/table/OracleReadableMetaData.java:
##########
@@ -87,18 +94,18 @@ public Object read(SourceRecord record) {
 
     /**
      * It indicates the time that the change was made in the database. If the record is read from
-     * snapshot of the table instead of the change stream, the value is always 0.
+     * snapshot of the table instead of the binlog, the value is always 0.
      */
-    OP_TS(

Review Comment:
   Would it be better to keep?



##########
inlong-sort/sort-connectors/oracle-cdc/src/main/java/org/apache/inlong/sort/cdc/oracle/table/OracleReadableMetaData.java:
##########
@@ -72,9 +77,11 @@ public Object read(SourceRecord record) {
                 }
             }),
 
-    /** Name of the database that contain the row. */
-    DATABASE_NAME(

Review Comment:
   Would it be better to keep?



##########
inlong-sort/sort-connectors/oracle-cdc/src/main/java/org/apache/inlong/sort/cdc/oracle/table/OracleReadableMetaData.java:
##########
@@ -47,9 +47,11 @@
 /** Defines the supported metadata columns for {@link OracleTableSource}. */
 public enum OracleReadableMetaData {
 
-    /** Name of the table that contain the row. */
-    TABLE_NAME(

Review Comment:
   Would it be better to keep?



##########
inlong-sort/sort-connectors/oracle-cdc/src/main/java/org/apache/inlong/sort/cdc/oracle/table/OracleReadableMetaData.java:
##########
@@ -59,9 +61,12 @@ public Object read(SourceRecord record) {
                     return StringData.fromString(getMetaData(record, AbstractSourceInfo.TABLE_NAME_KEY));
                 }
             }),
-    /** Name of the schema that contain the row. */
-    SCHEMA_NAME(

Review Comment:
   Would it be better to keep?



##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/Metadata.java:
##########
@@ -54,14 +54,6 @@ default String getMetadataKey(MetaField metaField) {
             case OP_TS:
                 metadataKey = "op_ts";
                 break;
-            case DATA:

Review Comment:
   Why remove it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] yunqingmoswu merged pull request #6404: [INLONG-6402][Sort] Modify the metadata field of oracle connector

Posted by GitBox <gi...@apache.org>.
yunqingmoswu merged PR #6404:
URL: https://github.com/apache/inlong/pull/6404


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org