You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by GitBox <gi...@apache.org> on 2022/03/30 06:54:31 UTC

[GitHub] [incubator-linkis] casionone commented on pull request #1829: Script custom variable run type and suffix constraint configuration.

casionone commented on pull request #1829:
URL: https://github.com/apache/incubator-linkis/pull/1829#issuecomment-1082696320


   `org.apache.linkis.governance.common.paser.CodeType` has also mapping functions similar to codetype
   ```
   object CodeType extends Enumeration {
     type CodeType = Value
     val Python, SQL, Scala, Shell, Other, Remain, JSON = Value
   
     def getType(codeType: String): CodeType = codeType.toLowerCase() match {
       case "python" | "pyspark" | "py" => Python
       case "sql" | "hql" | "psql" => SQL
       case "scala" => Scala
       case "shell" | "sh" => Shell 
       case _ => Other
     }
   }
   
   ```
   `"shell" | "sh" => Shell`  is inconsistent with   `case "sh" | "shell" => codeType = SQL_TYPE` ,this also confuses me
   I understand that this mapping relationship should be global. Is it more reasonable to put it in the public module of linkis.
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org