@Test public void testStringReplace() { String originString = "select count(*) as cnt from test_kylin_fact where char_length(lstg_format_name) < 10"; String replacedString = HivePushDownConverter.replaceString(originString, "char_length", "length"); assertEquals("select count(*) as cnt from test_kylin_fact where length(lstg_format_name) < 10", replacedString); }
public static String replaceString(String originString, String fromString, String toString) { return originString.replace(fromString, toString); }
HivePushDownConverter implements IPushDownConverter { public static String replaceString(String originString, String fromString, String toString) { return originString.replace(fromString, toString); } }
HivePushDownConverter implements IPushDownConverter { public static String replaceString(String originString, String fromString, String toString) { return originString.replace(fromString, toString); }  }
HivePushDownConverter implements IPushDownConverter { public static String replaceString(String originString, String fromString, String toString) { return originString.replace(fromString, toString); }  static String replaceString(String originString, String fromString, String toString); static String extractReplace(String originString); static String castReplace(String originString); static String subqueryReplace(String originString); static String timestampAddDiffReplace(String originString); static String concatReplace(String originString); static String addLimit(String originString); static String doConvert(String originStr, boolean isPrepare); @Override String convert(String originSql, String project, String defaultSchema, boolean isPrepare); }
HivePushDownConverter implements IPushDownConverter { public static String replaceString(String originString, String fromString, String toString) { return originString.replace(fromString, toString); }  static String replaceString(String originString, String fromString, String toString); static String extractReplace(String originString); static String castReplace(String originString); static String subqueryReplace(String originString); static String timestampAddDiffReplace(String originString); static String concatReplace(String originString); static String addLimit(String originString); static String doConvert(String originStr, boolean isPrepare); @Override String convert(String originSql, String project, String defaultSchema, boolean isPrepare);  }