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

# · text · 20 lines · 17 code · 3 blank · 0 comment · 0 complexity · 1edf847b40a3c8bc1a4132a34ca664b0 MD5 · raw file

  1. CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE;
  2. EXPLAIN
  3. FROM (
  4. FROM src_thrift
  5. SELECT TRANSFORM(src_thrift.aint + src_thrift.lint[0], src_thrift.lintstring[0])
  6. USING '/bin/cat' AS (tkey, tvalue)
  7. CLUSTER BY tkey
  8. ) tmap
  9. INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue;
  10. FROM (
  11. FROM src_thrift
  12. SELECT TRANSFORM(src_thrift.aint + src_thrift.lint[0], src_thrift.lintstring[0])
  13. USING '/bin/cat' AS (tkey, tvalue)
  14. CLUSTER BY tkey
  15. ) tmap
  16. INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue;
  17. SELECT dest1.* FROM dest1;