luchunliang opened a new pull request, #10143:
URL: https://github.com/apache/inlong/pull/10143

   Fixes #10130 
   
   ### Motivation
   
   Transform SQL support string concat function
   
   ### Modifications
   
   - Support to parse the following PB protocol
   syntax = "proto3";
   package test;
   message SdkMessage {
     bytes msg = 1;
     int64 msgTime = 2;
     map<string, string> extinfo = 3;
   }
   message SdkDataRequest {
     string sid = 1;
     repeated SdkMessage msgs = 2;
     uint64 packageID = 3;
   }
   - Support to parse the following PB data
           SdkDataRequest.Builder requestBuilder = SdkDataRequest.newBuilder();
           requestBuilder.setSid("sid");
           requestBuilder.setPackageID(1);
           {
               SdkMessage.Builder msgBuilder = SdkMessage.newBuilder();
               msgBuilder.setMsgTime(1713243918000L);
               msgBuilder.setMsg(ByteString.copyFrom("msgValue4".getBytes()));
               msgBuilder.putExtinfo("key", "value");
               SdkMessage msgObj = msgBuilder.build();
               requestBuilder.addMsgs(msgObj);
           }
           {
               SdkMessage.Builder msgBuilder = SdkMessage.newBuilder();
               msgBuilder.setMsgTime(1713243918002L);
               msgBuilder.setMsg(ByteString.copyFrom("msgValue42".getBytes()));
               msgBuilder.putExtinfo("key2", "value2");
               SdkMessage msgObj = msgBuilder.build();
               requestBuilder.addMsgs(msgObj);
           }
           SdkDataRequest requestObj = requestBuilder.build();
           byte[] srcBytes = requestObj.toByteArray();
   - Generate the final data by the following SQL
   select 
$root.sid,$root.packageID,$child.msgTime,concat($root.sid,$root.packageID,$child.msgTime,$child.msg)
 msg from source
   
   - The final data is the following string
   sid|1|1713243918000|sid11713243918000msgValue4
   sid|1|1713243918002|sid11713243918002msgValue42
   
   ### 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-unsubscr...@inlong.apache.org

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

Reply via email to