Cyanty commented on issue #9936:
URL: https://github.com/apache/seatunnel/issues/9936#issuecomment-3409969708

   @Hisoka-X @zhangshenghang @dybyte 
   In the `ConfigParser.ParseContext#parseValue` method, when AST node is 
parsed recursively, top-level fields are the first to be pushed onto the stack, 
at which point `pathStack.size()` is 1.
   To distinguish the `source`, `transform`, and `sink` fields from other 
fields with the same name (e.g., those defined under `schema` -> `fields`), 
would it be acceptable to add a `pathStack.size() == 1` check?
   Here is the proposed change:
   ```java
   // 
org.apache.seatunnel.shade.com.typesafe.config.impl.ConfigParser.ParseContext#parseValue
   // at line 126
   if (path != null
       && pathStack.size() == 1 // added this line
       && !ConfigSyntax.JSON.equals(flavor)
       && ("source".equals(path.first())
           || "transform".equals(path.first())
           || "sink".equals(path.first()))) {
       v = parseObjectForSeaTunnel((ConfigNodeObject) n);
   } else {
       v = parseObject((ConfigNodeObject) n);
   }
   ```
   Is this approach feasible?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to