You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/08/17 02:29:54 UTC

[GitHub] [incubator-seatunnel] ashulin opened a new pull request, #2436: [Improve][Connector-V2] Pulsar support user-defined schema

ashulin opened a new pull request, #2436:
URL: https://github.com/apache/incubator-seatunnel/pull/2436

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ashulin commented on a diff in pull request #2436: [Improve][Connector-V2] Pulsar support user-defined schema

Posted by GitBox <gi...@apache.org>.
ashulin commented on code in PR #2436:
URL: https://github.com/apache/incubator-seatunnel/pull/2436#discussion_r950823821


##########
seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java:
##########
@@ -222,7 +225,9 @@ private void setPartitionDiscoverer(Config config) {
 
     private void setDeserialization(Config config) {
         String format = config.getString("format");
-        // TODO: json format
+        // TODO: format SPI
+        SeaTunnelRowType rowType = SeatunnelSchema.buildWithConfig(config.getConfig(SeatunnelSchema.SCHEMA)).getSeaTunnelRowType();

Review Comment:
   `SeatunnelSchema` does not support your notation yet;



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #2436: [Improve][Connector-V2] Pulsar support user-defined schema

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #2436:
URL: https://github.com/apache/incubator-seatunnel/pull/2436#discussion_r952088845


##########
seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java:
##########
@@ -222,7 +225,9 @@ private void setPartitionDiscoverer(Config config) {
 
     private void setDeserialization(Config config) {
         String format = config.getString("format");
-        // TODO: json format
+        // TODO: format SPI
+        SeaTunnelRowType rowType = SeatunnelSchema.buildWithConfig(config.getConfig(SeatunnelSchema.SCHEMA)).getSeaTunnelRowType();

Review Comment:
   You can merge from dev again. Then you can use this feature.



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Hisoka-X merged pull request #2436: [Improve][Connector-V2] Pulsar support user-defined schema

Posted by GitBox <gi...@apache.org>.
Hisoka-X merged PR #2436:
URL: https://github.com/apache/incubator-seatunnel/pull/2436


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #2436: [Improve][Connector-V2] Pulsar support user-defined schema

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2436:
URL: https://github.com/apache/incubator-seatunnel/pull/2436#discussion_r950825865


##########
seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java:
##########
@@ -222,7 +225,9 @@ private void setPartitionDiscoverer(Config config) {
 
     private void setDeserialization(Config config) {
         String format = config.getString("format");
-        // TODO: json format
+        // TODO: format SPI
+        SeaTunnelRowType rowType = SeatunnelSchema.buildWithConfig(config.getConfig(SeatunnelSchema.SCHEMA)).getSeaTunnelRowType();

Review Comment:
   example:
   https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-connectors-v2/connector-iotdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdb/source/IoTDBSource.java#L70



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #2436: [Improve][Connector-V2] Pulsar support user-defined schema

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2436:
URL: https://github.com/apache/incubator-seatunnel/pull/2436#discussion_r950798921


##########
seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java:
##########
@@ -222,7 +225,9 @@ private void setPartitionDiscoverer(Config config) {
 
     private void setDeserialization(Config config) {
         String format = config.getString("format");
-        // TODO: json format
+        // TODO: format SPI
+        SeaTunnelRowType rowType = SeatunnelSchema.buildWithConfig(config.getConfig(SeatunnelSchema.SCHEMA)).getSeaTunnelRowType();

Review Comment:
   Use `fields` as config key?  reference #2469
   
   example:
   ```java
   SeaTunnelRowType rowType = SeatunnelSchema.buildWithConfig(config).getSeaTunnelRowType();
   ```



-- 
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@seatunnel.apache.org

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