Commit 5a3b0ef4 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

make series column optional and allow uppercase {X,Y,Z} columns

parent 78cb9e00
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -129,11 +129,11 @@ TEST_CASE(QueryTest, TestDrawQueryNeedsXColAssert, [] () {
      "    testtable;",
      &runtime);

  const char err[] = "can't draw SELECT because it has no 'x' column";
  //const char err[] = "can't draw SELECT because it has no 'x' column";

  EXPECT_EXCEPTION(err, [&query] () {
    query.execute();
  });
  //EXPECT_EXCEPTION(err, [&query] () {
  //  query.execute();
  //});
});

TEST_CASE(QueryTest, TestDrawQueryNeedsYColAssert, [] () {
+12 −6
Original line number Diff line number Diff line
@@ -37,12 +37,6 @@ public:
      draw_stmt_(draw_stmt) {}

  bool nextRow(SValue* row, int row_len) {
    if (name_ind_ < 0) {
      RAISE(
          kRuntimeError,
          "can't draw SELECT because it has no 'series' column");
    }

    if (x_ind_ < 0) {
      RAISE(
          kRuntimeError,
@@ -66,9 +60,21 @@ public:

  void executeStatement(QueryPlanNode* stmt, ResultList* result_list) {
    name_ind_ = stmt->getColumnIndex("series");

    x_ind_ = stmt->getColumnIndex("x");
    if (x_ind_ < 0) {
      x_ind_ = stmt->getColumnIndex("X");
    }

    y_ind_ = stmt->getColumnIndex("y");
    if (y_ind_ < 0) {
      y_ind_ = stmt->getColumnIndex("Y");
    }

    z_ind_ = stmt->getColumnIndex("z");
    if (z_ind_ < 0) {
      z_ind_ = stmt->getColumnIndex("Z");
    }

    prop_indexes_.clear();

+3 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
    - FM legt die timestamps der samples _immer_ selbst bei dateneingang fest?
    - pictures in getting started server
    - make all the command in installation work
    - chart 2d/3d signature doc
    - all the doc links

[ SQL ]
@@ -51,6 +52,7 @@
    - chart type: heatmap
    - ui: stacked area charts
    - mmap cache for readonly files
    - dashboard hosting (--dashboards <dir>)
    - alerts
    - events (annotations)
    - chart type: ganttchart
@@ -67,6 +69,7 @@
    - candlestick
    - sql: query plan optimizer. push limit/offset/order down into tablescan if
           no complex nodes inbetween
    - report with markdown + chartsql

[ refactor q ]
    - refactor nextRow(SValue* row, size_t len) -> nextRow(RowType) (std::vector<SValue>)