danburkert / ksql

An experimental SQL-like shell for Apache Kudu
Apache License 2.0
7 stars 3 forks source link

panic from SHOW CREATE TABLE #13

Open danburkert opened 7 years ago

danburkert commented 7 years ago
kudu> create table metrics (metric STRING, timestamp int64, value DOUBLE, PRIMARY KEY (metric, timestamp)) PARTITION BY HASH (metric) PARTITIONS 4, RANGE (timestamp) (PARTITION 1420070400 <= VALUES < 1422748800, PARTITION 1422748800 <= VALUES < 1425168000, PARTITION 1425168000 <= VALUES < 1427846400) REPLICAS 1;
table created

kudu> show tables;
Table   | ID
--------+---------------------------------
metrics | 0bff591f76e54662b94a875df2cbd083

kudu> show create table metrics;
CREATE TABLE metrics (
    metric String NOT NULL,
    timestamp Int64 NOT NULL,
    value Double,
    PRIMARY KEY (metric, timestamp),
)
PARTITION BY
    HASH (metric) PARTITIONS 4,
    RANGE (timestamp) (
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidArgument("type Int8 is invalid for column timestamp Int64 NOT NULL")', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.
        PARTITION ⏎
danburkert commented 7 years ago

with RUST_BACKTRACE:

kudu> show create table metrics;
CREATE TABLE metrics (
    metric String NOT NULL,
    timestamp Int64 NOT NULL,
    value Double,
    PRIMARY KEY (metric, timestamp),
)
PARTITION BY
    HASH (metric) PARTITIONS 4,
    RANGE (timestamp) (
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidArgument("type Int8 is invalid for column timestamp Int64 NOT NULL")', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/result.rs:837
stack backtrace:
   1:        0x103e3d03a - std::sys::imp::backtrace::tracing::imp::write::h1461f67be4bf68a9
   2:        0x103e3f22f - std::panicking::default_hook::{{closure}}::h6dba65b2b498d274
   3:        0x103e3eed7 - std::panicking::default_hook::ha8ecbcff1f59e805
   4:        0x103e3f6f6 - std::panicking::rust_panic_with_hook::h5ceed7bd7aef311a
   5:        0x103e3f544 - std::panicking::begin_panic::h091a980eb2ddd29a
   6:        0x103e3f4b2 - std::panicking::begin_panic_fmt::h063a49cc71e3d103
   7:        0x103e3f417 - rust_begin_unwind
   8:        0x103e683a0 - core::panicking::panic_fmt::h59374b8a88ef3536
   9:        0x10370cdee - core::result::unwrap_failed::h38d7743f8c6e3987
  10:        0x103689122 - <core::result::Result<T, E>>::unwrap::h1f19848abb380c6d
  11:        0x1037e8a2a - kudu::key::is_cell_incremented::h73fe106e0388d8e5
  12:        0x1037e913b - kudu::key::is_row_incremented::hff3c5a1f2a1e34d2
  13:        0x1038080fa - kudu::partition::Partition::fmt_range_partition::h511e19b26b7e4dc4
  14:        0x10357828f - <ksql::terminal::RangePartition<'a> as core::fmt::Debug>::fmt::h6079fb4d04584f34
  15:        0x103e69fd5 - core::fmt::write::hb83bb444116bb73c
  16:        0x103e69cba - <core::fmt::Arguments<'a> as core::fmt::Display>::fmt::hc56c9f0ad676438d
  17:        0x103428148 - <itertools::format::FormatWith<'a, I, F> as core::fmt::Display>::fmt::{{closure}}::h68fc96135cc9ae1d
  18:        0x1035781a5 - ksql::terminal::Terminal::print_create_table::{{closure}}::hcd4d144f916f87c9
  19:        0x103427c24 - <itertools::format::FormatWith<'a, I, F> as core::fmt::Display>::fmt::hf75247dc84cf8200
  20:        0x103e69fd5 - core::fmt::write::hb83bb444116bb73c
  21:        0x10358eec5 - std::io::Write::write_fmt::he27a87f8b3aa4493
  22:        0x1034484e0 - std::io::impls::<impl std::io::Write for Box<W>>::write_fmt::hc75b73acd6206831
  23:        0x103577e2a - ksql::terminal::Terminal::print_create_table::h0ac6d54e0d337127
  24:        0x1034c4864 - ksql::command::Command::execute::h0a23997cf042d199
  25:        0x103579089 - ksql::main::h0cf40124380d6aa7
  26:        0x103e406aa - __rust_maybe_catch_panic
  27:        0x103e3fa96 - std::rt::lang_start::ha9be7b379cf1665e
  28:        0x10357c3a9 - main