-
Notifications
You must be signed in to change notification settings - Fork 27
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
Sync/cdr 423 enhance sdk parser #376
Conversation
see CDR-423
see CDR-423
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
see CDR-411
@@ -30,7 +30,10 @@ topExpr | |||
// | TOP INTEGER FORWARD ; | |||
|
|||
function | |||
: FUNCTION_IDENTIFIER OPEN_PAR (IDENTIFIER|identifiedPath|operand) (COMMA (IDENTIFIER|identifiedPath|operand))* CLOSE_PAR; | |||
: FUNCTION_IDENTIFIER OPEN_PAR (IDENTIFIER|identifiedPath|operand|) (COMMA (IDENTIFIER|identifiedPath|operand))* CLOSE_PAR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am aware it is from the other grammar, but this would also parse e.g. CONCAT( , "x")
.
How about FUNCTION_IDENTIFIER OPEN_PAR ((IDENTIFIER|identifiedPath|operand) (COMMA (IDENTIFIER|identifiedPath|operand))*)? CLOSE_PAR
?
web-template/src/test/java/org/ehrbase/webtemplate/util/CharSequenceHelperTest.java
Outdated
Show resolved
Hide resolved
* @author Stefan Spiska | ||
*/ | ||
public enum PerformanceTestCase implements AqlTestDto { | ||
Query1( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum constants should be upper case
aql/src/test/java/org/ehrbase/aql/roundtriptest/AqlTestDto.java
Outdated
Show resolved
Hide resolved
testAql(testData); | ||
} | ||
|
||
void testAql(AqlTestDto testData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename to assertRoundTrip
?
return (SelectAqlField) Function.avg(bind(dto.getParameters().get(0), containmentMap), dto.getName()); | ||
default: | ||
throw new AqlParseException(String.format( | ||
"Unsupported Funktion %s", dto.getAqlFunction().name())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo "Unsupported Function"
aql/src/main/java/org/ehrbase/aql/dto/condition/ExistsConditionOperator.java
Outdated
Show resolved
Hide resolved
@@ -15,30 +15,40 @@ | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
package org.ehrbase.webtemplate.parser; | |||
package org.ehrbase.aql.dto.path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have different models for web template paths and aql paths?
*/ | ||
public class PredicateHelper { | ||
|
||
public static final String[] PREDICATE_DIVIDERS = {" and ", " AND ", " or ", " OR ", ","}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing a final array may be problematic. It is sorted (over and over again) in AqlPath::split.
Maybe somehow wrap the search operation here?
Also, this seems to introduce a circular dependency with AqlPath.
see CDR-411
No description provided.