drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5838) Fix MaprDB filter pushdown for the case of nested field (reg. of DRILL-4264)
Date Fri, 06 Oct 2017 04:33:02 GMT

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

ASF GitHub Bot commented on DRILL-5838:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/972#discussion_r143107377
  
    --- Diff: logical/src/main/java/org/apache/drill/common/expression/SchemaPath.java ---
    @@ -264,6 +264,56 @@ public String getRootSegmentPath() {
         return rootSegment.getPath();
       }
     
    +  /**
    +   * Returns {@code String} representation of this schema path,
    +   * quoting all name segments if specified {@code quote} is true or quoting
    +   * only those name segments which have a complex name (their name contains dots).
    +   *
    +   * @param quoted is name segment should be quoted
    +   * @return the {@code String} representation of this {@code SchemaPath}
    +   * @throws IllegalStateException if root segment is {@code ArraySegment}
    +   */
    +  public String asPathString(boolean quoted) throws RuntimeException {
    +    StringBuilder sb = new StringBuilder();
    +    PathSegment seg = rootSegment;
    +    if (seg.isArray()) {
    +      throw new IllegalStateException("Drill doesn't currently support top level arrays");
    +    }
    +    NameSegment nameSegment = seg.getNameSegment();
    +    writeQuoted(sb, nameSegment.getPath(), quoted || nameSegment.isComplex());
    +
    +    while ((seg = seg.getChild()) != null) {
    +      if (seg.isNamed()) {
    +        nameSegment = seg.getNameSegment();
    +        sb.append('.');
    +        writeQuoted(sb, nameSegment.getPath(), quoted || nameSegment.isComplex());
    --- End diff --
    
    If `isComplex()` is meant to indicate that a name must be quoted, then `requiresQuotes()`
would be a better name. Some other names that require quotes:
    
    {noformat}
    names with spaces
    names-with-dashes
    anything/with+an*operator
    $looks$like$internal$name
    maybeEvenCaseSensitive
    MAYBEeVENcASEsENSIVIVE
    &so!on
    ...
    {noformat}
    
    Basically, anything that is not a symbol (initial alpha followed by any number of alphanumeric...)


> Fix MaprDB filter pushdown for the case of nested field (reg. of DRILL-4264)
> ----------------------------------------------------------------------------
>
>                 Key: DRILL-5838
>                 URL: https://issues.apache.org/jira/browse/DRILL-5838
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MapRDB
>    Affects Versions: 1.11.0
>            Reporter: Volodymyr Vysotskyi
>            Assignee: Volodymyr Vysotskyi
>
> After the changes in DRILL-4264, filter for MaprDB tables operate only with root field
name, but {{MaprDBJsonRecordReader}} expects to use condition with full field path. In MaprDB
classes compares the results of calling {{org.ojai.FieldPath.asPathString()}} method for the
fields from project list and from filter list. 
> So current code works only for cases when compares root fields, but not nested.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message