You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2013/12/01 10:23:35 UTC

[jira] [Commented] (JENA-595) Improve filter placement optimization

    [ https://issues.apache.org/jira/browse/JENA-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835990#comment-13835990 ] 

Claude Warren commented on JENA-595:
------------------------------------

In actual usage the query above is followed by a series of filters that run a local function to verify that the data returned are of the type expected for SQL.   In fact the above is a list columns in all tables query used by the DatabaseMetadata.getColumns() method.  Anyway, these extra filters are not being placed correctly when the query is parsed by TDB.  

The query is the query above with the following inserted before the closing 2 braces:

      FILTER checkTypeF(?REMARKS)
      FILTER checkTypeF(?DECIMAL_DIGITS)
      FILTER checkTypeF(?TABLE_SCHEM)
      FILTER checkTypeF(?IS_AUTOINCREMENT)
      FILTER checkTypeF(?IS_NULLABLE)
      FILTER checkTypeF(?CHAR_OCTET_LENGTH)
      FILTER checkTypeF(?COLUMN_NAME)
      FILTER checkTypeF(?TABLE_NAME)
      FILTER checkTypeF(?COLUMN_SIZE)
      FILTER checkTypeF(?SCOPE_TABLE)
      FILTER checkTypeF(?TABLE_CAT)
      FILTER checkTypeF(?SCOPE_CATLOG)
      FILTER checkTypeF(?DATA_TYPE)
      FILTER checkTypeF(?SQL_DATA_TYPE)
      FILTER checkTypeF(?COLUMN_DEF)
      FILTER checkTypeF(?SOURCE_DATA_TYPE)
      FILTER checkTypeF(?TYPE_NAME)
      FILTER checkTypeF(?BUFFER_LENGTH)
      FILTER checkTypeF(?SCOPE_SCHEMA)
      FILTER checkTypeF(?NULLABLE)
      FILTER checkTypeF(?SQL_DATETIME_SUB)
      FILTER checkTypeF(?NUM_PREC_RADIX)
      FILTER checkTypeF(?ORDINAL_POSITION)

When the check for "TABLE_SCHEM" is run the binding only contains the vars from the inner most block before the first BIND statement namely: 
?Schema·Columns 
     ?v_5a48766a_eca1_4a8d_b77b_29f7728f63c9
     ?v_9c77b7fe_377e_45ad_bb57_0c63b5288f64 
     ?v_1d587ff0_a8e0_408e_a867_c94bbd2a164d 
     ?v_c6a6279a_82c1_480a_bfd3_98d99fe375fb
     ?v_b1b27077_8156_4de7_a905_a00e365e7970 
     ?v_66219e5b_918f_423e_bb05_b340ea2a3c80

I have tried to figure out what the command line is to execute the arq.parse command above with the TDB query engine and have been unsuccessful thus far.

Any help would be appreciated.


> Improve filter placement optimization
> -------------------------------------
>
>                 Key: JENA-595
>                 URL: https://issues.apache.org/jira/browse/JENA-595
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>         Attachments: FilterPlacementError.java, JENA-595-FilterPlacement.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1#6144)