You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by arina-ielchiieva <gi...@git.apache.org> on 2017/06/15 17:11:44 UTC

[GitHub] drill pull request #853: DRILL-5130: Fix explainTerms method for Values node...

GitHub user arina-ielchiieva opened a pull request:

    https://github.com/apache/drill/pull/853

    DRILL-5130: Fix explainTerms method for Values nodes to describe two different Values nodes correctly

    1. Factor out common logic for DrillValuesRel and ValuesPrel into DrillValuesRelBase.
    2. Revisit explainTerms to write full tuples content so consequently Values nodes with the same row type and count but different values are considered to be different.
    3. Minor refactoring.
    
    Details in Jira DRILL-5130.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/arina-ielchiieva/drill DRILL-5130

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/853.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #853
    
----
commit 598a44f81cec5fdfc005573c39d790ff1b20eb6b
Author: Arina Ielchiieva <ar...@gmail.com>
Date:   2017-06-15T15:03:34Z

    DRILL-5130: Fix explainTerms method for Values nodes to describe two different Values nodes correctly
    
    1. Factor out common logic for DrillValuesRel and ValuesPrel into DrillValuesRelBase.
    2. Revisit explainTerms to write full tuples content so consequently Values nodes with the same row type and count but different values are considered to be different.
    3. Minor refactoring.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #853: DRILL-5130: Fix explainTerms method for Values node...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/853#discussion_r123312311
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillValuesRelBase.java ---
    @@ -0,0 +1,46 @@
    +/*
    + * 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.planner.common;
    +
    +import org.apache.calcite.plan.RelOptCluster;
    +import org.apache.calcite.plan.RelTraitSet;
    +import org.apache.calcite.rel.AbstractRelNode;
    +import org.apache.calcite.rel.RelWriter;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.drill.common.JSONOptions;
    +
    +/**
    + * Base class for logical and physical Values implemented in Drill.
    + */
    +public abstract class DrillValuesRelBase extends AbstractRelNode {
    --- End diff --
    
    Calcite has an abstract class Values. Neither of DrillValueRel or ValuePrel extends from that Calcite class. Will it help solve the problem if we extend from Calcite's class?
    
    https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/core/Values.java



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #853: DRILL-5130: Implement DrillValuesRel and ValuePrel as Calc...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/853
  
    Merged into master with commit id 33682be99e719dce9cb326e2835ebc4ae434104a


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #853: DRILL-5130: Fix explainTerms method for Values node...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/853#discussion_r123471670
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillValuesRelBase.java ---
    @@ -0,0 +1,46 @@
    +/*
    + * 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.planner.common;
    +
    +import org.apache.calcite.plan.RelOptCluster;
    +import org.apache.calcite.plan.RelTraitSet;
    +import org.apache.calcite.rel.AbstractRelNode;
    +import org.apache.calcite.rel.RelWriter;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.drill.common.JSONOptions;
    +
    +/**
    + * Base class for logical and physical Values implemented in Drill.
    + */
    +public abstract class DrillValuesRelBase extends AbstractRelNode {
    --- End diff --
    
    Yes, it will. Thanks for pointing on this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #853: DRILL-5130: Implement DrillValuesRel and ValuePrel ...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva closed the pull request at:

    https://github.com/apache/drill/pull/853


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #853: DRILL-5130: Implement DrillValuesRel and ValuePrel as Calc...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/853
  
    @jinfengni I have implemented DrillValuesRel and ValuesPrel as Calcite Values sub-classes. Also added second constructor to avoid unnecessary tuples parsing into json during copying or logical to physical values conversion. Please review the changes when possible. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #853: DRILL-5130: Fix explainTerms method for Values node...

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/853#discussion_r123136893
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillValuesRelBase.java ---
    @@ -0,0 +1,44 @@
    +/*
    + * 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.planner.common;
    +
    +
    +import org.apache.calcite.plan.RelOptCluster;
    +import org.apache.calcite.plan.RelTraitSet;
    +import org.apache.calcite.rel.AbstractRelNode;
    +import org.apache.calcite.rel.RelWriter;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.drill.common.JSONOptions;
    +
    +public abstract class DrillValuesRelBase extends AbstractRelNode {
    --- End diff --
    
    Maybe a brief Javadoc comment explaining the purpose of this new base class?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #853: DRILL-5130: Fix explainTerms method for Values node...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/853#discussion_r123218383
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillValuesRelBase.java ---
    @@ -0,0 +1,44 @@
    +/*
    + * 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.planner.common;
    +
    +
    +import org.apache.calcite.plan.RelOptCluster;
    +import org.apache.calcite.plan.RelTraitSet;
    +import org.apache.calcite.rel.AbstractRelNode;
    +import org.apache.calcite.rel.RelWriter;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.drill.common.JSONOptions;
    +
    +public abstract class DrillValuesRelBase extends AbstractRelNode {
    --- End diff --
    
    Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---