Commit Graph

20 Commits

Author SHA1 Message Date
mrks
a4703fec5b
Add DESCRIBE () 2019-09-16 11:58:05 +02:00
mrks
755ea052d7
Remove HISTORY keyword () 2019-07-31 12:43:18 +02:00
Moritz Eyssen
9701403ff5 Fix multi-threaded parsing ()
This should fix multi-threaded parsing. Not a clean solution, I am guessing the following block should be a single, state-less pattern? @mrks

```
\'                          { BEGIN singlequotedstring; strbuf = std::stringstream{}; }
<singlequotedstring>\'\'    { strbuf << '\''; }
<singlequotedstring>[^']*   { strbuf << yytext; }
<singlequotedstring>\'      { BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; }
<singlequotedstring><<EOF>> { fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; }
```

Anyway, the following hyrise playground does not crash anymore, so Toni should be able to work with this for the time being.

```c++
#include <iostream>
#include <thread>

#include "types.hpp"
#include "tpch/tpch_queries.hpp"
#include "SQLParser.h"

using namespace opossum;  // NOLINT

int main() {
  std::vector<std::thread> threads;

  for (size_t t = 0; t < 200; ++t) {
    threads.emplace_back([&]() {
      for (size_t p = 0; p < 10'000; ++p) {
        hsql::SQLParserResult result;
        hsql::SQLParser::parse(tpch_queries.at(19), &result);
        std::cout << "Parsing " << p << " is valid: " << result.isValid() << std::endl;
      }
    });
  }

  for (auto& thread : threads) {
    thread.join();
  }

  return 0;
}
```
2019-03-22 07:07:17 -05:00
mrks
62d162579a
Support escaped strings (e.g., 'Max O''Mustermann') ()
* Support escaped strings (e.g., 'Max O''Mustermann')

* review
2018-11-12 15:35:31 +01:00
alkim0
a59deb43c3 Added boolean literal support ()
* Added boolean support

* Made bool literals int vals

With a flag indicating if they came from boolean literals.

* Add makeLiteral(bool val);
2018-11-02 11:42:23 +01:00
mrks
a122effd46
Fix Tokens ()
* Fix Tokens

* fix

* ci
2018-10-22 22:05:29 +02:00
mrks
f7bd4ee592
Support more of the CREATE TABLE command ()
* Support more of the CREATE TABLE command

* bison version

* build on nemea

* bla

* Check for flex version
2018-10-19 14:18:03 +02:00
mrks
79bdad949f
Remove PART keyword ()
* Remove PART keyword

* Change it in some tests
2018-10-10 16:33:53 +02:00
Moritz Eyssen
73ed061d7d Support EXTRACT ()
* EXTRACT support

* formatting

* formatting

* formatting
2018-05-23 03:02:14 +02:00
Markus Dreseler
8bd3ad3a2c
Fix use of old flex version 2018-02-08 18:06:17 +01:00
Markus Dreseler
8ec540fc52
Merge branch 'master' of https://github.com/hyrise/sql-parser into limit-offset 2018-02-08 17:25:30 +01:00
javrucebo
e33e6f61f7 committing bison/flex output to run testsuite on travis 2018-01-27 01:00:55 +01:00
Moritz Eyssen
48f32a4b73 remove unused enum members 2018-01-24 15:35:45 +01:00
Tim Zimmermann
2316e07d52 Do not allow deprecated features for flex 2017-09-05 10:25:39 +00:00
Tim Zimmermann
0233f77cef Add support for SHOW TABLES statement 2017-08-23 23:56:16 +02:00
alkim0
88ffe4822b Many updates to grammar including support for arrays, ilike, natural joins with no predicates... ()
* Got ISNULL working

* Allow function calls with no arguments

* Added no-else cases and arrays

* Added more operations including ilike, concat

* Added optional all to set operations and fixed natural join

* Ran astyle

* Used the appropriate star expression

Instead of using a ColumnRef with star literal.

* NULL expressions now returns true isLiteral

* Fixed structure for no-else case clauses

* Fixed up grammar conflicts
2017-07-26 19:09:02 +02:00
Tim Zimmermann
6a05b8e94b Add enum types for formerly 'simple' operands ()
* Add enum types for formerly 'simple' operands

* Use non-semantic names

* Formatting

* Add generated files
2017-06-29 13:40:24 +02:00
Pedro Flemming
4d1278cb1f update lexer 2017-04-06 17:02:54 +02:00
Pedro
137f273410 update parser build 2017-03-08 20:36:06 +01:00
Pedro
8b59940fa3 include bison and flex generated code in release 2015-12-23 17:02:45 +01:00