/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientpositive/udf_concat_ws.q

# · text · 18 lines · 13 code · 5 blank · 0 comment · 0 complexity · 4b64782d61da2f4464e3e41811bb70bf MD5 · raw file

  1. DESCRIBE FUNCTION concat_ws;
  2. DESCRIBE FUNCTION EXTENDED concat_ws;
  3. CREATE TABLE dest1(c1 STRING, c2 STRING, c3 STRING);
  4. FROM src INSERT OVERWRITE TABLE dest1 SELECT 'abc', 'xyz', '8675309' WHERE src.key = 86;
  5. EXPLAIN
  6. SELECT concat_ws(dest1.c1, dest1.c2, dest1.c3),
  7. concat_ws(',', dest1.c1, dest1.c2, dest1.c3),
  8. concat_ws(NULL, dest1.c1, dest1.c2, dest1.c3),
  9. concat_ws('**', dest1.c1, NULL, dest1.c3) FROM dest1;
  10. SELECT concat_ws(dest1.c1, dest1.c2, dest1.c3),
  11. concat_ws(',', dest1.c1, dest1.c2, dest1.c3),
  12. concat_ws(NULL, dest1.c1, dest1.c2, dest1.c3),
  13. concat_ws('**', dest1.c1, NULL, dest1.c3) FROM dest1;