convert_check_key_mem2.sql 415 B

12345678910111213141516
  1. /* postgres can not */
  2. PRAGMA DisableSimpleColumns;
  3. $a = AsList(
  4. AsStruct(255ut AS K, 1 AS V),
  5. AsStruct(127ut AS K, 2 AS V),
  6. AsStruct(0ut AS K, 3 AS V));
  7. $b = AsList(
  8. AsStruct(Int8("-1") AS K, 1 AS V),
  9. AsStruct(Int8("127") AS K, 2 AS V),
  10. AsStruct(Int8("0") AS K, 3 AS V));
  11. select a.K, b.V from as_table($a) as a
  12. join as_table($b) as b on a.K = b.K and a.V = b.V
  13. order by a.K, b.V;