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

Preserve parameter type information in compiled runtime #8756

Merged
merged 15 commits into from
Feb 14, 2017

Conversation

henriknyman
Copy link
Contributor

This is needed for micro-benchmarking with lists of primitive types.

Also

  • Fixes some more orderability cases
  • Fixes unnecessary projection of variables

@alexaverbuch alexaverbuch force-pushed the 3.2-birk-sort-param-type branch 2 times, most recently from 787ec20 to 98f53ea Compare February 6, 2017 16:00

override def generateExpression[E](structure: MethodStructure[E])(implicit context: CodeGenContext): E =
structure.loadVariable(variableName)

override def nullable(implicit context: CodeGenContext) = true
override def nullable(implicit context: CodeGenContext) = cType.canBeNullable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that params can now be non-nullable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, yes, but only when assembling logical plans programmatically.

@systay
Copy link
Contributor

systay commented Feb 7, 2017

Looks good. Missing acceptance tests that make sure the parameter types are preserved

henriknyman and others added 15 commits February 14, 2017 11:05
- Fix ordering of nulls for nodes/relationships
- fix cases where orderability of Lists failed: Integer[], Long[], Float[], Double, float[], double[]
If a query variable already exists in the context we do not need to
project it again.
To use primitive types internally we need to force unboxing in
expectParameter
When node and relationship parameters are unboxed into primitives, we
need to handle nulls properly (assign the dedicated null value of -1L).
…iables to context

 - removes unused CompiledConversionUtils.loadPrimitiveListParameter method
 - it fails on compiled runtime, and making it green would unnecessarily delay the rest of the PR
 - this is not a regression, the test also fails against current 3.2 branch
- Reintroduce array parameter value test
@henriknyman henriknyman merged commit 2ef0a6d into neo4j:3.2 Feb 14, 2017
@henriknyman henriknyman deleted the 3.2-birk-sort-param-type branch February 14, 2017 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants