1. 11 Feb, 2019 2 commits
    • Donald H. (Donnie) Pinkston, III's avatar
      Simplify/flatten composite Boolean expressions · f3d2f477
      Donald H. (Donnie) Pinkston, III authored
      The new ANTLRv4 parser generates left-deep nested Boolean AND/OR
      expressions, which need to be flattened where appropriate.  The
      BooleanOperator.simplify() method takes care of this operation.
      
      Introducing this flattening/simplification everywhere all at once seemed
      to be inadvisable, so currently it is only applied in the query AST when
      schemas are computed.  Additionally, only WHERE predicates, HAVING
      predicates, and ON clauses are simplified/flattened.  (NATURAL JOIN and
      USING join predicates are generated programmatically, not by the parser,
      and are already flattened.)
      f3d2f477
    • Donald H. (Donnie) Pinkston, III's avatar
  2. 09 Feb, 2019 1 commit
  3. 04 Feb, 2019 2 commits
    • Donald H. (Donnie) Pinkston, III's avatar
      Documents and code changes for Assignment 3 · c7b4e8f9
      Donald H. (Donnie) Pinkston, III authored
      The design document and information document are included under the doc
      directory now.
      
      Added a lot of documentation, particularly to the Schema class.
      
      Made a few changes to the ArithmeticOperator and BooleanOperator
      classes' simplify() methods so that we can do some basic
      simplifications.
      
      Added the StatisticsUpdater so that it's easier for students to modify
      statistics based on selection predicates.
      
      Fixed a bug in SelectClause where ORDER BY clauses were using the
      FROM-clause schema rather than the SELECT-clause schema.
      c7b4e8f9
    • Donald H. (Donnie) Pinkston, III's avatar
      Stores schema for HW3+ · 67f1b287
      Donald H. (Donnie) Pinkston, III authored
      67f1b287
  4. 31 Jan, 2019 1 commit
    • Michael A. Goulet's avatar
      Fix overwritten columns in selclause resultSchema · 4c8b4486
      Michael A. Goulet authored
      the `SelectClause.computeSchema` method aggregates a `resultSchema`
      member by appending all of the ColumnInfos for each of the selectValues
      in the statement.
      
      However, when efforts were made to make Schema less "mutable", I think
      a change was overlooked that causes all but the last selectValue's
      ColumnInfos to remain in the resultSchema.
      
      I believe this was left undetected because the resultSchema of the
      SelectClause isn't really used in many places, except for nested
      subqueries. This problem was found by a student, that the first out of
      two columns in a nested subquery would "disappear" from the schema.
      4c8b4486
  5. 30 Jan, 2019 2 commits
    • Donald H. (Donnie) Pinkston, III's avatar
      Aggregate function bugfixes · 1ceddf40
      Donald H. (Donnie) Pinkston, III authored
      A number of bugfixes caused by some of the changes in the arithmetic
      type-coercion rules, and the parser-framework changes.
      
      COUNT(DISTINCT a) wasn't being handled correctly due to an issue in
      the NanoSQLTranslator flow-control.
      
      The SumAvg/StdDevVar aggregate implementations are now updated to
      produce double-precision results when calculating their values.  The
      type-converter had been changed to do integer division when the LHS
      and RHS are both integers, and this was breaking tests of these
      aggregate functions.
      1ceddf40
    • Donald H. (Donnie) Pinkston, III's avatar
      Set up HW2 basic SQL tests · 0812fe0c
      Donald H. (Donnie) Pinkston, III authored
      The existing SQL tests are now all assigned to the "sql" group, and a
      subset are also now assigned to the "hw2" group if they should be
      supported by the SimplePlanner.
      
      The Maven pom.xml is also updated to include the "hw2" tests.
      0812fe0c
  6. 29 Jan, 2019 2 commits
  7. 25 Jan, 2019 1 commit
    • Michael A. Goulet's avatar
      Add warning for out-of-date NanoDB package · 155cf487
      Michael A. Goulet authored
      If the last-modified date for any of the sources is higher than the
      last-modified date of the JAR produced by maven, then a warning will be
      emitted to make sure the user is aware that her/his changes may not be
      in effect.
      
      This modification also fails silently, e.g. if `find` is missing, or if
      the user doesn't have the right version of `stat` to support the printf
      flag.
      155cf487
  8. 24 Jan, 2019 3 commits
  9. 22 Jan, 2019 1 commit
  10. 21 Jan, 2019 1 commit
  11. 18 Jan, 2019 1 commit
  12. 17 Jan, 2019 2 commits
    • Donald H. (Donnie) Pinkston, III's avatar
      Add "SHOW '...' STATS" command back into parser · 0ee9c83d
      Donald H. (Donnie) Pinkston, III authored
      Somehow when upgrading the NanoDB parser to ANTLR4, I forgot to include
      the SHOW STATS command.  This is essential for the storage lab, so of
      course I added it back in as quickly as possible.
      0ee9c83d
    • Donald H. (Donnie) Pinkston, III's avatar
      Improve support for NanoDB on Windows · efef4169
      Donald H. (Donnie) Pinkston, III authored
      Updated the nanodb script to properly handle being run under Git Bash.
      Needed to wrap the Java program with "winpty" when starting it from Git
      Bash.
      
      Also updated the Surefire configuration to not require all tests to pass
      before building a JAR file.  There are a few tests that aren't working
      on Windows due to file-locking differences from *NIX.
      efef4169
  13. 16 Jan, 2019 1 commit
    • Michael A. Goulet's avatar
      Explicitly set Locale.ENGLISH in DateTimeUtils · 8b85c48f
      Michael A. Goulet authored
      Some tests were failing on my box because I've got my locale set to
      Portuguese; this shouldn't be an issue, since the NanoDB tests are
      explicitly written in English. In order to fix Date parsing language-
      agnostically, I just explicitly set the locale to `Locale.ENGLISH`.
      8b85c48f
  14. 15 Jan, 2019 2 commits