Skip to content
  1. Sep 20, 2016
    • gmantele's avatar
      [ADQL] Fix the tree generated by the parsing of NATURAL JOINs. · 7ca49f81
      gmantele authored
      The "normal" JOIN:
          A JOIN B ON A.id = B.id JOIN C ON B.id = C.id
      is correctly interpreted as:
          ( (A JOIN B ON A.id = B.id) JOIN C ON B.id = C.id )
      But with a NATURAL JOIN, the tree is mirrored:
          A NATURAL JOIN B NATURAL JOIN C
      gives:
      	( A NATURAL JOIN (B NATURAL JOIN C) )
      instead of:
          ( (A NATURAL JOIN B) NATURAL JOIN C )
      This is not a problem when the SQL translation is identical to the ADQL
      expression, but for some DBMS a conversion into a INNER JOIN ON is necessary
      and in this case we got the following SQL:
          A JOIN B JOIN C ON A.id = B.id ON B.id = C.id
      Which seems to work, but is syntactically strange.
      
      This commit should fix the generated tree. A "normal" JOIN and a NATURAL JOIN
      should now have the same form. A JUnit test has been added into TestADQLParser
      to check that: testJoinTree().
      7ca49f81
  2. Sep 14, 2016
  3. Sep 13, 2016
  4. Sep 09, 2016
  5. Sep 02, 2016
    • gmantele's avatar
      [TAP] Fix bug about BOOLEAN datatypes. · c5cba4ba
      gmantele authored
      If a BOOLEAN database column is encountered, its datatype will be considered
      as SMALLINT (because TAP 1.0 does not support BOOLEAN) and its values will
      be converted into 0 for FALSE and 1 for TRUE. This last part was missing
      in the TAP library before this commit.
      c5cba4ba
  6. Sep 01, 2016
  7. Aug 10, 2016
  8. Aug 08, 2016
  9. Jul 21, 2016
  10. Jul 18, 2016
  11. Jul 14, 2016
    • gmantele's avatar
      [TAP] Fix an artefact of 19026c1b. · 6ba9bffb
      gmantele authored
      TAPTable.copy(...) and TAPColumn.copy(...) use directly the attribute dbName
      instead using getDBName() ; indeed getDBName() <> dbName.
      Because of this bug, queries with aliased tables did not work anymore.
      6ba9bffb
    • gmantele's avatar
      [TAP] Add a TAP 1.1 feature: table_index and column_index in TAP_SCHEMA. · 6fc7f8fd
      gmantele authored
      These two columns let recommend an order, respectively, for tables in their
      schema, and columns in their table.
      In addition of these new columns, "arraysize" has been also added.
      All these new columns are already supported when creating a TAP_SCHEMA from
      an XML file.
      6fc7f8fd
  12. Jul 13, 2016
  13. Jul 12, 2016
  14. Jul 01, 2016
  15. Jun 16, 2016
  16. Jun 13, 2016
  17. Jun 08, 2016
  18. May 26, 2016
    • gmantele's avatar
      [ALL] Fix the JUnit validation using the ANT scripts. · 88e99ad2
      gmantele authored
      Before, the scripts relied unfortunately on the compilation performed by
      Eclipse. Now, all the JUnit test cases are compiled all the time before
      performing the JUnit validation (i.e. ANT task named `junitValidation`).
      88e99ad2
  19. May 25, 2016
    • gmantele's avatar
      [ADQL] Fix recursive replacement using SimpleReplaceHandler. · ad2acca3
      gmantele authored
      Before correction, if an ADQlObject (e.g. a function or a sub-query) contains
      another ADQLObject and that both (i.e. parent and child) are matching in a
      SimpleReplaceHandler and are asked to be replaced, only the parent
      seemed to have been replaced. However, the child has been replaced, but
      in the former instance of the parent ; and so its replacement is not
      visible in the final query.
      
      For instance:
      if all mathematical functions must be replaced by a dumb UDF named 'foo' in
      the ADQL query:
              "SELECT sqrt(abs(81)) FROM myTable"
      ,the result should be:
              "SELECT foo(foo(81)) FROM myTable"
      ,but before this correction it was:
              "SELECT foo(abs(81)) FROM myTable".
      ad2acca3
  20. Apr 20, 2016
  21. Apr 19, 2016
    • gmantele's avatar
      [TAP] Finish fixing the transaction management bug. · 5ac8f1fb
      gmantele authored
      See the commit bd621842,
      for the first part of the fix (which actually did not really
      fixed the problem: connections "idle in transaction" were
      still in the database ; the connection being inside an opened transaction,
      it generates lock issues in the database in addition of probably taking
      some memory resources).
      5ac8f1fb
  22. Apr 14, 2016
  23. Apr 12, 2016
    • gmantele's avatar
      [TAP] New fix for the transaction management. · bd621842
      gmantele authored
      The transaction and Statement were closed too early before.
        - Fetching the row was not possible once the first bunch of fetched
      rows was over.
        - The problem of "statement is aborted" preventing the re-use of
      a same DB connection was apparently still there, but occurred less often.
      
        Now, any transaction potentially started in a DB connection is always
      closed after one of the public functions of JDBCConnection is called ;
      except executeQuery(ADQLQuery) whose the call MUST be wrapped inside a
      try...catch block in which DBConnection.cancel(true) MUST be called
      in case of error (in order to effectively end any started transaction).
      bd621842
  24. Mar 17, 2016
  25. Mar 04, 2016
    • gmantele's avatar
      [ADQL] Set a type to a query's resulting column when it is not originally a column. · 0003e343
      gmantele authored
      This is easily possible for concatenations, string constants and User Defined
      Functions having a FunctionDef. A new special datatype was needed for
      numeric functions and operations: UNKNOWN_NUMERIC. This special type
      can not be set with FunctionDef.parse(...) and it behaves exactly like the type
      UNKNOWN, except that DBType.isNumeric() returns true (as .isUnknown()).
      Thus, while writing the metadata of a result in TAP, nothing changes:
      an UNKNOWN_NUMERIC type will be processed similarly as an UNKNOWN type:
      to use the type returned from the database ResultSet or to set VARCHAR.
      (no modification of TAP was needed for that)
      0003e343