bug fixed.

This commit is contained in:
wenshao
2017-06-14 11:30:19 +08:00
parent a47342eb3b
commit 2c978ff758
4 changed files with 54 additions and 66 deletions
@@ -16,11 +16,10 @@ public class Bug_for_qianbi extends TestCase {
String sql = "insert into table lol select detail(sellerid,id) as count1,sum(sellerid) as sum1 from ctu_trade_paid_done.time('natural','1d','1h') "
+ "where match(auctionTitle,\"男鞋\\n中石化&加油卡\\n中石化&充值卡\\n中石化&冲值卡\\n中石化&代冲\\n中石化&代充\\n中国石化&加油卡\\n中国石化&充值卡\\n中国石化&冲值卡\\n中国石化&代冲\\n中国石化&代充\",\"\\n\")";
String expected = "INSERT INTO TABLE lol"
+ "\nSELECT detail(sellerid, id) AS count1"
+ "\n\t, SUM(sellerid) AS sum1"
+ "\nFROM ctu_trade_paid_done:time('natural', '1d', '1h')"
+ "\nWHERE match(auctionTitle, '男鞋\\n中石化&加油卡\\n中石化&充值卡\\n中石化&冲值卡\\n中石化&代冲\\n中石化&代充\\n中国石化&加油卡\\n中国石化&充值卡\\n中国石化&冲值卡\\n中国石化&代冲\\n中国石化&代充', '\\n');\n";
String expected = "INSERT INTO TABLE lol\n" +
"SELECT detail(sellerid, id) AS count1, SUM(sellerid) AS sum1\n" +
"FROM ctu_trade_paid_done:time('natural', '1d', '1h')\n" +
"WHERE match(auctionTitle, '男鞋\\n中石化&加油卡\\n中石化&充值卡\\n中石化&冲值卡\\n中石化&代冲\\n中石化&代充\\n中国石化&加油卡\\n中国石化&充值卡\\n中国石化&冲值卡\\n中国石化&代冲\\n中国石化&代充', '\\n');\n";
StringBuilder out = new StringBuilder();
OdpsOutputVisitor visitor = new OdpsOutputVisitor(out);