aksmf1442 commented on PR #10360:
URL: https://github.com/apache/seatunnel/pull/10360#issuecomment-3799846396

   > > 
https://github.com/apache/seatunnel/blob/dev/seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/DateTimeFunction.java
   > > ```
   > > public static boolean isDate(List<Object> args) {
   > >         try {
   > >             parsedatetime(args);
   > >             return true;
   > >         } catch (Throwable e) {
   > >             return false;
   > >         }
   > >     }
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > 현재 코드에서 IS_DATE는 parsedatetime을 직접 재사용하고 있으므로, 이 부분에 대한 호환성을 유지해야 할지 아니면 
문서를 수정해야 할지가 문제입니다.
   > 
   > @yzeng1618 It would be good to document this behavior. Since **'isDate'** 
reuses **'parsedatetime'**, it is subject to the same whitelist constraints. 
This ensures consistent behavior for patterns like **'CASE WHEN IS_DATE(s, 
format) THEN TO_DATE(s, format)'**.
   
   @
   
   > > 
https://github.com/apache/seatunnel/blob/dev/seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/DateTimeFunction.java
   > > ```
   > > public static boolean isDate(List<Object> args) {
   > >         try {
   > >             parsedatetime(args);
   > >             return true;
   > >         } catch (Throwable e) {
   > >             return false;
   > >         }
   > >     }
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > In the code, IS_DATE currently directly reuses parsedatetime, so the 
question is whether we need to maintain compatibility for this part or modify 
the documentation.
   > 
   > @yzeng1618 It would be good to document this behavior. Since **'isDate'** 
reuses **'parsedatetime'**, it is subject to the same whitelist constraints. 
This ensures consistent behavior for patterns like **'CASE WHEN IS_DATE(s, 
format) THEN TO_DATE(s, format)'**.
   
   @yzeng1618 
   Updated the documentation to clarify that IS_DATE reuses parsedatetime and 
therefore shares the same whitelist constraints.


-- 
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