Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1343

Date types override works for data loading but not for calculations

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_RELEASE_1_5_2
    • Component/s: None
    • Labels:
      None

      Description

      After I add an extension for date types to support extended date ranges, loading and storing data works fine. However, math operation with dates break since the code still uses XMLGregorianCalendar in date utilities with no possibility to override it. More details in: https://phabricator.wikimedia.org/T94539

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        All of these are normal SPARQL execution rather than mock setups. The failures therefore represent unresolved issues in the main code.

        • BigdataConnectionTest:
          		String queryString = "SELECT * { ?sub ?pred ?obj . FILTER ( 'not a number' + 1 = ?obj )}";
          
        Show
        bryanthompson bryanthompson added a comment - All of these are normal SPARQL execution rather than mock setups. The failures therefore represent unresolved issues in the main code. BigdataConnectionTest: String queryString = "SELECT * { ?sub ?pred ?obj . FILTER ( 'not a number' + 1 = ?obj )}" ;
        Hide
        bryanthompson bryanthompson added a comment - - edited

        The problem is that some function factories invoke AST2BOpUtility.toVE() and do not pass through the BOpContextBase. The fix is to modify

        AST2BOpUtility.toVE1() invokes:

                    final IValueExpression<? extends IV> ve = FunctionRegistry.toVE(
                            globals, functionURI, scalarValues, args);
        

        The fix is to pass through the BOpContextBase into FunctionRegistry.toVE() and from there into a modified method signature for the Function.Factory interface. Applying this change will touch ALL function Factory instances.

        @beebs @mikepersonick *This change will break code for any custom functions - the fix is to modify the custom function factory to accept the additional argument and pass it through to AST2BOpUtility.toVE() if that method is used from within the Factory.create() implementation.

        Show
        bryanthompson bryanthompson added a comment - - edited The problem is that some function factories invoke AST2BOpUtility.toVE() and do not pass through the BOpContextBase. The fix is to modify AST2BOpUtility.toVE1() invokes: final IValueExpression<? extends IV> ve = FunctionRegistry.toVE( globals, functionURI, scalarValues, args); The fix is to pass through the BOpContextBase into FunctionRegistry.toVE() and from there into a modified method signature for the Function.Factory interface. Applying this change will touch ALL function Factory instances. @beebs @mikepersonick *This change will break code for any custom functions - the fix is to modify the custom function factory to accept the additional argument and pass it through to AST2BOpUtility.toVE() if that method is used from within the Factory.create() implementation.
        Hide
        bryanthompson bryanthompson added a comment - - edited

        Fix committed to github branch for this ticket: ba57f72b23156ee978f8c3938b0752280a4c94e3.

        Show
        bryanthompson bryanthompson added a comment - - edited Fix committed to github branch for this ticket: ba57f72b23156ee978f8c3938b0752280a4c94e3.
        Hide
        bryanthompson bryanthompson added a comment - - edited
        Show
        bryanthompson bryanthompson added a comment - - edited In queue for CI: https://ci.bigdata.com/job/BLZG-1343-fix
        Hide
        bryanthompson bryanthompson added a comment -

        Clean CI. Merged by @beebs to master.

        Show
        bryanthompson bryanthompson added a comment - Clean CI. Merged by @beebs to master.

          People

          • Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            stasmalyshev stasmalyshev
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: