@Override
  public SqlSource createSqlSource(
      Configuration configuration, String script, Class<?> parameterType) {
    Matcher matcher = inNumberPattern.matcher(script);
    if (matcher.find()) {
      String newScript = inNumber(matcher);
      LOG.info("REPLACE IN_NUMBER_LIST original script:{}, new script:{}", script, newScript);
      return super.createSqlSource(configuration, newScript, parameterType);
    }

    matcher = inStringPattern.matcher(script);
    if (matcher.find()) {
      String newScript = inString(matcher);
      LOG.info("REPLACE IN_NUMBER_LIST original script:{}, new script:{}", script, newScript);
      return super.createSqlSource(configuration, newScript, parameterType);
    }

    return super.createSqlSource(configuration, script, parameterType);
  }
Mybatis language extensions, this diver will replace sql script like

<pre>
 select * from tbl where id in (#{ids::number[]})
</pre>

to

<pre>
<script>
  select * from tbl where id in
   <foreach collection="items" item="item" separator="," open="(" close=")" >
     #{items}
   </foreach>
</script>
</pre>

<p>or replace sql script like

<pre>
 select * from tbl where id in (#{ids::string[]})
</pre>

to

<pre>
<script>
  select * from tbl where id in
   <foreach collection="items" item="item" separator="," open="(" close=")" >
     #{items}
   </foreach>
</script>
</pre>
amoro-ams/src/main/java/org/apache/amoro/server/persistence/extension/InListExtendedLanguageDriver.java