Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
MODE-2159 Validates and fixes various Lucene queries This commit adds extensive unit test support for Lucene queries, reusing most of the tests from the LocalIndexProvider and JcrQueryManager. It fixes the node types change adapter making sure that with each primary type/mixin types change, all the information is sent to the index. It also fixes the "sync reindexing" semantic, making sure that the JcrQueryManger is notified in-thread of any changes.

  1. … 52 more files in changeset.
MODE-2159 Changes the default indexing design adding default implementations for a lot of operations These changes come the fact that both the Local index provider and the Lucene index provider have very similar logic in a lot of places involving CRUD operations on indexes starting from index definitions. Therefore, this commit "abstracts" a lot of the logic of the Local index provider and makes it default behavior. In addition, this commit also adds generic support for multi-column indexes in the form of composite IndexChangeAdapters.

  1. … 23 more files in changeset.
MODE-1903 Adds incremental reindexing via the repository configuration Each index provider can "tell" the repository if it supports incremental reindexing. If it does and the journal is enabled, the repository can be configured at startup to reindex only the changed nodes since the last successful index update time. This commit also makes several changes & fixes to the ClusteredJournal logic.

  1. … 25 more files in changeset.
MODE-2166 Adds CAST dynamic operand for JCR-SQL2.

  1. … 5 more files in changeset.
MODE-2494 Adding check whether a child node join has been reversed during query optimization, mirroring logic for SameNodeJoinCondition and EquiJoinCondition.

For some complex queries, such as:

SELECT parent.[jcr:path], child1.[jcr:name], desc.[jcr:name]

FROM [nt:unstructured] AS parent

LEFT OUTER JOIN [nt:unstructured] AS child1 ON ISCHILDNODE(child1,parent)

INNER JOIN [nt:unstructured] AS desc on ISCHILDNODE(desc, child1)

LEFT OUTER JOIN [nt:unstructured] AS child2 ON ISCHILDNODE(child2,parent)

WHERE ISCHILDNODE(parent,'/')

AND NAME(child2) = 'Hybrid'

AND NAME(desc) LIKE 'Nissan%'

the query optimizer reverses the left and right sides of the join, leading to an assertion error in ScanningQueryEngine.

This fix checks if the join has been reversed, and creates rowextractors for the opposite columns if this is the case.

Added three tests, two which are fixed by this change, and one which is still an issue, suggesting a deeper problem. For the remaining (@Ignored) test, the exception is in the DescendantNodeJoinCondition code.

This seems less simple to resolve, and probably a true fix lies in ReplaceViews or somewhere similar.

  1. … 1 more file in changeset.
MODE-2491 Fixed the LOWER and UPPER operands handling in case of multi-valued properties.

  1. … 1 more file in changeset.
  1. … 2 more files in changeset.
MODE-2473 Fixed behavior of nodeIterator#skip when entire batches coming from an index provider are skipped.

  1. … 5 more files in changeset.
MODE-2401 Added support for handling mixins which have the "noquery" type attribute and updated the code to reflect the differences between the "noquery" types and the previously existing ModeShape noquery document attribute which has a different semantic.

  1. … 38 more files in changeset.
MODE-2401 Fixed the fact that queryable children which were under parents that had the noquery attribute were not taken into account by the query engine.

  1. … 3 more files in changeset.
MODE-2448 Fixed unicode support in regex matching for FTS.

  1. … 1 more file in changeset.
MODE-2435 Fixed the sorting sequence handling of batches.

    • -2
    • +5
    ./engine/process/BufferingSequence.java
  1. … 1 more file in changeset.
MODE-2425 Fixed PATH() queries with SET criteria.

  1. … 1 more file in changeset.
MODE-2401 Updated the query & indexing SPI to handle the "noquery" type attribute.

  1. … 10 more files in changeset.
MODE-2355 Fixed several indexing related issues: - when constraint contains the OR operator and index should apply only if it applies to all the parts of the constraint - the (cost * cardinality) formula should always be used when deciding which indexes to use - when determining the node-type criteria for the index selection, always use only the less-specific node type (i.e. super-type)

  1. … 5 more files in changeset.
MODE-2346 Changed the logic around the selection of the indexes in the query plan. User-defined indexes should always have priority over the DescendantsByPath implicit index.

  1. … 5 more files in changeset.
MODE-2347, MODE-1055 Made sure QOM behaves in the same way as SQL2 as far as missing selector columns in queries.

  1. … 2 more files in changeset.
MODE-2329 Fixed the handling of expanded form selector names for the query engine.

  1. … 1 more file in changeset.
MODE-2290 Corrected use of mixin aliases in determining whether indexes are applicable

When an alias is used in a query, there is a constraint that specifies the allowed values for the 'jcr:primaryType' or 'jcr:mixinTypes' properties. (This constraint is added during the planning/optimization phase, and is based upon whether the selected node type is a mixin.)

The logic used in the IndexCalculator was only looking for constraints on 'jcr:primaryType', and thus any alias on a type that was a mixin type would not apply to any indexes. Changing the logic to also look at the 'jcr:mixinTypes' in the property value of the constraint fixes the problem.

  1. … 1 more file in changeset.
MODE-2312 Implicit indexes used on comparison constraints with jcr:uuid and jcr:path

  1. … 1 more file in changeset.
MODE-2314 Corrected indexing operations

  1. … 6 more files in changeset.
MODE-2318 Corrected behavior of indexes on restart.

  1. … 7 more files in changeset.
MODE-2313 Corrected concurrent modification exceptions, and changed query engine to not use indexes that are being rebuild via re-indexing.

  1. … 11 more files in changeset.
MODE-2297 Corrected getNodes() functionality

Changed the tests to always check the query via rows and, if there's only one selector in the query, also by nodes. Fix a problem when getting the nodes on some queries.

  1. … 2 more files in changeset.
MODE-2297 Minor correction to previous change on pseudocolumns.

  1. … 2 more files in changeset.
MODE-2297 Using pseudocolumns no longer is a warning

Using a pseudocolumn in a select used to result in a warning, but that is no longer the case. Also cleaned up the places that used pseudocolumns by encapsulating all pseudocolumn info into a single class.

    • -0
    • +212
    ./PseudoColumns.java
  1. … 3 more files in changeset.
MODE-2307 Indexes are now used when join conditions can be applied

Previously, index applicability only took into account constraints. So when an access query did not have any constraints (other than on jcr:primaryType or jcr:mixinTypes) then indexes were not considered, even though an index might apply to one of the selectors & properties on one side of the join condition.

With this change, it is now possible for the repository to try to apply indexes based upon constraints and/or join conditions. For example, an index on 'jcr:uuid' might apply to a SameNodeJoinCondition. Or, a property index might apply when an EquiJoinCondition involves that property.

Note that in these cases, join conditions have no literal values on which the index can filter its results, but it still can be used by returning all nodes in the index. This still might be significantly better than scanning the index.

It's even possible now that indexes might be applied based upon join constraints (additional constraints that apply to the join, and that cannot be pushed down to either side of the join).

  1. … 5 more files in changeset.
MODE-2307 Corrected how subselects are used in dependent joins

  1. … 2 more files in changeset.
MODE-2297 Corrected query engine to properly report mismatched set operation columns

  1. … 8 more files in changeset.
MODE-2297 Corrected asymmetric set operations

A recent change introduced a bug that caused some parts of joins to be removed when rewritten.

    • -1
    • +1
    ./engine/process/DistinctSequence.java
    • -2
    • +2
    ./engine/process/HashJoinSequence.java
    • -1
    • +1
    ./engine/process/IntersectSequence.java
  1. … 4 more files in changeset.