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-4573) Zero copy LIKE, REGEXP_MATCHES, SUBSTR
Date Sun, 10 Apr 2016 02:51:25 GMT

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

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

Github user hsuanyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/458#discussion_r59125828
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSequenceWrapper.java
---
    @@ -0,0 +1,49 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.drill.exec.expr.fn.impl;
    +
    +import io.netty.buffer.DrillBuf;
    +
    +public class CharSequenceWrapper implements CharSequence {
    --- End diff --
    
    Can you add java doc for this class and the method setBuffer()?


> Zero copy LIKE, REGEXP_MATCHES, SUBSTR
> --------------------------------------
>
>                 Key: DRILL-4573
>                 URL: https://issues.apache.org/jira/browse/DRILL-4573
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: jean-claude
>            Priority: Minor
>         Attachments: DRILL-4573.1.patch.txt
>
>
> All the functions using the java.util.regex.Matcher are currently creating Java string
objects to pass into the matcher.reset().
> However this creates unnecessary copy of the bytes and a Java string object.
> The matcher uses a CharSequence, so instead of making a copy we can create an adapter
from the DrillBuffer to the CharSequence interface.
> Gains of 25% in execution speed are possible when going over VARCHAR of 36 chars. The
gain will be proportional to the size of the VARCHAR.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message