Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh comment #2

Open
wants to merge 219 commits into
base: main
Choose a base branch
from
Open

Gh comment #2

wants to merge 219 commits into from

Conversation

jstastny-cz
Copy link
Owner

Testing CI PR check.

tkobayas and others added 30 commits May 23, 2023 12:12
apache#5233) (apache#5242)

* [DROOLS-7444] join constraints are ignored when BigDecimal equality is involved in a Pattern

* - Add more tests

* - added more tests

* - improve assertion
…#5243)

* [KOGITO-9141] remove no longer needed RuleUnitStatefulSession

* wip

* wip

* wip
…ache#5247)

* [kie-roadmap#120] Add profile for running tests with custom jars.

* [kie-roadmap#120] Move profile to drools-build-parent bom.
* rebase PR#5184 into ReliablePropagationList patch

* consequence is null

* LambdaConsequence serialization

* retrieve ObjectTypeConf (PropagationEntry) from new  kbase

* Full strategy, first test

* FullReliable strategy, more tests

* remove commented out lines
… join node under the same left input adapter (apache#5255)

* [DROOLS-7430] fix incremental compilation when readding more than one join node under the same left input adapter

* fix imports
…ration (apache#5254)

* DROOLS-7451: drools-templates: Remove use of KieBase for template iteration

* Simplify drools-decisiontable dependencies.

---------

Co-authored-by: Michael Anstis <[email protected]>
- Enable the test as we cannot reproduce the issue
- Set debug log level for the future when we will upgrade to the Infinispan version with logging. See ISPN-14901
* WIP: Add lhsGroupBy to the DRL parser.

The temporary syntax for lhsGroupBy is

    lhsGroupBy        ::= 'groupby' '('
                           lhsAnd (',' | ';')
                           groupByKeyBinding (',' groupByKeyBinding)*
                           accumulateFunctionBinding (COMMA accumulateFunctionBinding)*
                           (SEMICOLON constraints)?
                           ')' ';'?

    groupByKeyBinding ::= 'key' (identifier ':') expression

The temporary syntax was inspired the accumulate syntax.
The soft keyword 'key' was added to distinguish grouping functions
from the accumulating functions.

* Use the syntax defined in DROOLS-7436 for groupby

Simplified groupByKeyFunction by using
conditionalExpression() to get the conditional expression
string instead of using exprParser.expression().

* Rewrite the majority of GroupByTest to use DRL

Some tests cannot be faithfully rewritten because they use
group bys with no accumulate functions, which cannot be
defined in DRL currently due to syntax.

A few tests fail with DRL due to two issues:

- the key variable being hidden when an outer group by uses an inner group by
- duplicate parameter/variable when only a single variable used

RUN_TYPE STANDARD_FROM_DRL fails currently with
"""
Cannot invoke "org.drools.compiler.rule.builder.RuleConditionBuilder.build(org.drools.compiler.rule.builder.RuleBuildContext,
                                                                           org.drools.drl.ast.descr.BaseDescr,
                                                                           org.drools.core.rule.Pattern)"
because "builder" is null
""".

* Translate groupby with no accumulators tests + fix groupby visitor/builder issues

- Using count() as an accumulator for groupby with no accumulators is
  faithful; If there are no accumulators, a count accumulator is
  automatically added
  (see https://github.com/kiegroup/drools/blob/main/drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/KiePackagesBuilder.java#L845)

- Fix an issue with duplicate parameters; ExpressionTyper's
  getUsedDeclarations() may return duplicate Strings, which
  causes the duplicate parameter issue. To fix it, first convert
  it into a Set.

- Fix an issue with inner groupby's key not being accessible
  to outer groupby. The cause of this was two seperate issues:

  * GroupByVisitor using addDeclaration() instead of
    addDeclarationReplacing() for the group key
  * KiePackagesBuilder.buildAccumulate did
    not build inner groupby, causing their declaration to be
    missing.

- Fix an issue with KiePackagesBuilder.addInnerBindings when
  it tries to get the inner bindings of patterns that does not
  support them (for instance, eval patterns).

* Convert remaining GroupByTest tests to DRL, fix various bugs

- Change ExpressionTyperContext.usedDeclarations to a Set to
  force uniqueness

- Fix a bug in FromVisitor where duplicate parameters may be
  added if a variable is scoped

- Refactor inner groupby processing code so each groupby is
  processed once; the inner groupby processing code before
  processed all the groupby within the accumulate (including
  a recursive call to buildAccumulate). This mean
  in the extremely unlikely case there are three or more
  groupby, the innermost groupby is processed multiple times:
  one time by the outermost groupby, another by the
  second-outermost groupby. Now it passes the groupByDescriptor
  and index to buildAccumulate and end recursion there, meaning
  each groupBy is processed at most once.

* simplify groupby model creation

* Add documentation for groupby to the language reference

---------

Co-authored-by: mariofusco <[email protected]>
…pache#5240)

* [kie-issues#273] Remove use of Drools 5.5.0.Final from kie-ci tests

* Remove testing.properties

* Fix typo

* [kie-issues#273] Use latest junit 4 version.
* Remove unmaintained branches

* Update .ci/jenkins/config/main.yaml
… bom that brings in such dependency (apache#5265)

Co-authored-by: Gabriele-Cardosi <[email protected]>
* DROOLS-7450 Rebased

* DROOLS-7450 Removed generics on FactHandle

* DROOLS-7450
-Removed generics from more classes
-Added missing license headers

* DROOLS-7450
-Split TerminalNode into two, so add/removeAssociatedTerminal is type safe.

* DROOLS-7450
-Improved EventHandle

* DROOLS-7450 Minor cleanups after rebase
* [DROOLS-7450] fix split packages in drools-base

* wip

* wip

* wip

* wip

* wip
tkobayas and others added 25 commits September 1, 2023 10:29
…ache#5482)

* [DROOLS-7508] Enhance KieService to choose services based on tags
- WIP

* - Introduce get(String reliabilityPersistanceLayer) to avoid exposing Tag.reliabilityPersistanceLayer
- Throw an Exceptin when 2 services are found with the same tag

* - code smells, coverage

* - code improvement
apache#5452)

* [DROOLS-7529] Alyways use RightTupleImpl instead of RightTuple (Fix the secondary super cache problem in Drools)

* Use specific iterator for TMS, everything else iterates over AbstractTuple instead of RighTuple

* Removed leftover
)

* [DROOLS-7511] Review StoredObject and StoredEvent structure

* - Code Smells
…36tt4aq

[main] DSL: Remove branch 8.42.x
* kie-issues-531 prep for replacing file copyrights for moving to ASF

* kie-issues-531 part-2 prep for replacing file copyrights for moving to ASF
added comments back with ASF recommended header

* kie-issues-531 part-3 prep for replacing file copyrights for moving to ASF
removing mvn license plugin from pom files, restoring to the original version and deleting the static license-header.txt file, also used only during the header updates

* fix apache/incubator-kie-issues#531

* resolving merge conflict for PR https://github.com/kiegroup/drools/pull/5503
fix apache/incubator-kie-issues#531

* removed headers that were making tests unstable
Prepare for Apache migration

update

Remove PR job

updated dsl config

correct dsl config

[apache_migration] Apache migration update (apache#5518)

* updated pipelines

* Setup jenkinsfile

corrected dsl

Fix CI

update config

Disable kie-jpmml-integration

As not migrated for now

PR multibranchPipelineJob (apache#5523)

Co-authored-by: jstastny-cz <[email protected]>

Update `kiegroup` repository references to `apache` (apache#5519)

still use apache_migration branch in apache (apache#5526)

Co-authored-by: jstastny-cz <[email protected]>

Fix CI references to kie-docs and kie-benchmarks (apache#5527)

Co-authored-by: jstastny-cz <[email protected]>

Switch to main branch in config

Co-authored-by: radtriste <[email protected]>
…che#5530)

* Align with Apache parent bom.

* Fix JavaDoc generation to original state.

* Add changes requested in PR review.
@jstastny-cz
Copy link
Owner Author

HEADINGTesting comment from shell.

@jstastny-cz
Copy link
Owner Author

Testing comment Bold

1 similar comment
@jstastny-cz
Copy link
Owner Author

Testing comment Bold

jstastny-cz pushed a commit that referenced this pull request Oct 18, 2024
apache#5682)

* add antlr4 based drl parser

* bump to drools 8.16.0.Beta

* improve node position discovery

* first c3 integration

* Module reorganization (#2)

* WIP

* Ignore directories

* Add debug. Minor modifications

* WIP

* Fix tests - add comments

* manage null ast nodes and fix failing test

* improve drl parser

* Fix basic completion (apache#4)

* Add Java grammar, fix DRL grammar, simplify token index calculation, remove template code

* Add ignored tokens to completion

Co-authored-by: livio <[email protected]>

* add constraints parsing

* - Added DRLParserWrapper to store errors using DRLErrorListener (apache#5)

- Added MiscDRLParserTest which is being ported from RuleParserTest to enhance coverage.

* Enhance test/grammar coverage. function import, global, exists, not (apache#6)

* Enhance test/grammar coverage. and, or, listExpression (apache#7)

* Enhance test/grammar coverage. matches, single quoted string, escape (apache#9)

- Introduced drlExpression, drlPrimary, drlLiteral, DRL_STRING_LITERAL

* Enhance test/grammar coverage. dialect, invalid lhs (apache#10)

* Enhance test/grammar coverage. keyword collision (apache#11)

- Add "DRL_" prefix for DRL keywords for clarification

* Enhance test/grammar coverage. function, attributes, consequence (apache#12)

* Enhance test/grammar coverage. function, attributes, consequence
- better getText preserving whitespaces
- resolving WARNs because of overlapping keywords

* - No need to declare duplicate keywords

* Enhance test/grammar coverage. OR, inline map (apache#13)

* OpenRewrite applied for junit5 and assertj (apache#14)

* Enhance test/grammar coverage. label, consequenceLocation, test refac… (apache#15)

* Enhance test/grammar coverage. label, consequenceLocation, test refactoring, assertj best practice

* - better test method names

* [DROOLS-7253] Review and improve drools-lsp parser Visitor design (apache#16)

* [DROOLS-7253] Review and improve drools-lsp parser Visitor design
- Remove currentConstructStack. Utilize return object instead.

* - Remove instance fields. Utilize return objects instead.

* [DROOLS-7270] Enhance test/grammar coverage : andRestriction, orRestriction (apache#4)

- Removed some unused cast

* [DROOLS-7271] Fully port RuleParserTest as MiscDRLParserTest with @disabled and priority comment (apache#10)

* [DROOLS-7285] Failed to parse and/or with parentheses in LHS (apache#15)

* [DROOLS-7286] Failed to parse binding with || (apache#21)

* [DROOLS-7287] Failed to parse comments in RHS (apache#23)

* [DROOLS-7287] Failed to parse comments in RHS

* - add rhs string check

* [DROOLS-7515] Parser : Accept plain text in RHS (apache#26)

* [DROOLS-7515] Parser : Accept plain text in RHS

* - Handle keyword token in RHS

* - Removed sysout

* - Revert statementKeywords. Instead, define DRL_END with newline or EOF

* - fix method name

* [DROOLS-7288] Failed to parse complex parentheses (apache#27)

* [DROOLS-7288] Failed to parse complex parentheses
- bump to 8.43.0.Final

* additional tests

* [DROOLS-7289] Implement accumulate (apache#28)

* [DROOLS-7296] Implement from entry-point (apache#30)

* [DROOLS-7297] Implement import accumulate (apache#29)

* [DROOLS-7290] Implement BigInteger literal, BigDecimal literal (apache#31)

* [DROOLS-7292] Implement eval (apache#32)

* [DROOLS-7293] Implement extends (apache#33)

* [DROOLS-7294] Implement forall (apache#34)

* [DROOLS-7298] Implement memberOf (apache#35)

* [DROOLS-7300] Implement positional constraint (apache#36)

* [DROOLS-7304] Implement temporal operators (apache#38)

- Also covers [DROOLS-7303] Implement sliding window

* [DROOLS-7301] Implement query (apache#37)

- Also partially fixes [DROOLS-7302] Implement semicolon delimiter

* [DROOLS-7295] Implement from collect (apache#39)

* [DROOLS-7305] Implement type declaration (apache#40)

- also covers [DROOLS-7291] Implement entry-point declaration
- also covers window declaration

* [DROOLS-7306] Implement unification (apache#41)

* [DROOLS-7306] Implement unification
- Also [DROOLS-7307] Parse attribute agenda-group

* [DROOLS-7308] Parse attribute without value
- Also [DROOLS-7309] Parse attribute with parentheses

* [DROOLS-7310] parse nested parentheses (apache#42)

* [DROOLS-7310] parse nested parentheses

* - Adding code commentes and explanations
- Adding more nested level tests

* [DROOLS-7577] drools-lsp : Add comments and explanations for drools-p… (apache#43)

* [DROOLS-7577] drools-lsp : Add comments and explanations for drools-parser

* removed syntax examples

* [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser into drools (apache#44)

- Add some methods to call from drools code base

* Move necessary files without any additional modifications

* Update DRL6Expressions.g4 to ANTLR 4 (apache#47)

* Add DescrDumperTest and fix the expression parser grammar (apache#48)

* Add DescrDumperTest

* Fix it

* [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser into drools
- New parser is migrated in drools-drl/drools-drl-parser with org.drools.drl10.parser package
- To enable the new parser, run `mvn test -PDRL10`
- At the moment, we get lots of test failures especially in drools-model/drools-model-codegen and drools-test-coverage/test-compiler-integration

* - License header
- Revert an inappropriate test edit
- Removed unnecessary profile
- Clarify unsupported methods
- Removed unnecessary bom dependency

---------

Co-authored-by: mariofusco <[email protected]>
Co-authored-by: Gabriele Cardosi <[email protected]>
Co-authored-by: Livio Benčik <[email protected]>
Co-authored-by: livio <[email protected]>
Co-authored-by: Jiří Locker <[email protected]>
jstastny-cz pushed a commit that referenced this pull request Oct 18, 2024
* WIP

* Ignore directories

* Add debug. Minor modifications

* WIP

* Fix tests - add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.