You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hivemall.apache.org by maropu <gi...@git.apache.org> on 2017/03/09 00:58:02 UTC

[GitHub] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

GitHub user maropu opened a pull request:

    https://github.com/apache/incubator-hivemall/pull/62

    [HIVEMALL-89][SQL] Support to_from/from_csv in HivemallOps

    ## What changes were proposed in this pull request?
    This pr supported `to_csv`/`from_csv` for Spark (See SPARK-15463 for related discussion)
    
    ## What type of PR is it?
    Improvement
    
    ## What is the Jira issue?
    https://issues.apache.org/jira/browse/HIVEMALL-89
    
    ## How was this patch tested?
    Added tests in `HivemallOps`


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

    $ git pull https://github.com/maropu/incubator-hivemall HIVEMALL-89

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

    https://github.com/apache/incubator-hivemall/pull/62.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 #62
    
----
commit 32e4b61107a40b6ea5300aa8723aa5c023ca84ef
Author: Takeshi Yamamuro <ya...@apache.org>
Date:   2017-03-08T23:07:55Z

    Support to_from/from_csv in HivemallOps

----


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    Thanks!


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    @maropu LGTM \U0001f44d Could you please merge this PR?


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105100365
  
    --- Diff: spark/spark-2.1/pom.xml ---
    @@ -104,6 +104,12 @@
     			<version>${spark.version}</version>
     			<scope>provided</scope>
     		</dependency>
    +		<dependency>
    +			<groupId>org.jodd</groupId>
    +			<artifactId>jodd-core</artifactId>
    +			<version>3.5.2</version>
    +			<scope>provided</scope>
    --- End diff --
    
    `provided` is enough in Spark?


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105101006
  
    --- Diff: spark/spark-2.1/pom.xml ---
    @@ -104,6 +104,12 @@
     			<version>${spark.version}</version>
     			<scope>provided</scope>
     		</dependency>
    +		<dependency>
    +			<groupId>org.jodd</groupId>
    +			<artifactId>jodd-core</artifactId>
    +			<version>3.5.2</version>
    +			<scope>provided</scope>
    --- End diff --
    
    yea, it's okay.


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    Updated descriptions for the two funcs.


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105102387
  
    --- Diff: spark/spark-2.1/pom.xml ---
    @@ -104,6 +104,12 @@
     			<version>${spark.version}</version>
     			<scope>provided</scope>
     		</dependency>
    +		<dependency>
    +			<groupId>org.jodd</groupId>
    +			<artifactId>jodd-core</artifactId>
    +			<version>3.5.2</version>
    +			<scope>provided</scope>
    --- End diff --
    
    okay, fixed.


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    @maropu Please check scalastyle check carefully.
    
    ```
    error file=/home/travis/build/apache/incubator-hivemall/spark/spark-2.1/src/main/scala/org/apache/spark/sql/execution/datasources/csv/csvExpressions.scala message=Header does not match expected text line=2
    Saving to outputFile=/home/travis/build/apache/incubator-hivemall/spark/spark-2.1/target/scalastyle-output.xml
    Processed 31 file(s)
    Found 1 errors
    Found 0 warnings
    Found 0 infos
    Finished in 2371 ms
    [ERROR] Failed to execute goal org.scalastyle:scalastyle-maven-plugin:0.8.0:check (default-cli) on project hivemall-spark: Failed during scalastyle execution: You have 1 Scalastyle violation(s). -> [Help 1]
    ```


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    Merged to master


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    I'll add document desc. for the two functions in `spark/misc/functions.md` after #61 merged.


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105090294
  
    --- Diff: spark/spark-2.1/src/main/scala/org/apache/spark/sql/execution/datasources/csv/csvExpressions.scala ---
    @@ -0,0 +1,153 @@
    +/*
    + * 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.spark.sql.execution.datasources.csv
    +
    +import java.io.CharArrayWriter
    +
    +import jodd.util.CsvUtil
    --- End diff --
    
    Updated


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105102219
  
    --- Diff: spark/spark-2.1/pom.xml ---
    @@ -104,6 +104,12 @@
     			<version>${spark.version}</version>
     			<scope>provided</scope>
     		</dependency>
    +		<dependency>
    +			<groupId>org.jodd</groupId>
    +			<artifactId>jodd-core</artifactId>
    +			<version>3.5.2</version>
    +			<scope>provided</scope>
    --- End diff --
    
    Aha, okay, I'll revert.


---
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] incubator-hivemall issue #62: [HIVEMALL-89][SQL] Support to_from/from_csv in...

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

    https://github.com/apache/incubator-hivemall/pull/62
  
    
    [![Coverage Status](https://coveralls.io/builds/10543714/badge)](https://coveralls.io/builds/10543714)
    
    Coverage increased (+0.2%) to 36.988% when pulling **a03718f3c47e31305d1b48280806eace929c5768 on maropu:HIVEMALL-89** into **f7fc3041fba258a578bf0bf4bd78d5422718777c on apache:master**.



---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105089062
  
    --- Diff: spark/spark-2.1/src/main/scala/org/apache/spark/sql/execution/datasources/csv/csvExpressions.scala ---
    @@ -0,0 +1,153 @@
    +/*
    + * 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.spark.sql.execution.datasources.csv
    +
    +import java.io.CharArrayWriter
    +
    +import jodd.util.CsvUtil
    --- End diff --
    
    Ah, I missed. I'll add soon.


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105101891
  
    --- Diff: spark/spark-2.1/pom.xml ---
    @@ -104,6 +104,12 @@
     			<version>${spark.version}</version>
     			<scope>provided</scope>
     		</dependency>
    +		<dependency>
    +			<groupId>org.jodd</groupId>
    +			<artifactId>jodd-core</artifactId>
    +			<version>3.5.2</version>
    +			<scope>provided</scope>
    --- End diff --
    
    If so, `jodd-core` is already imported using Spark dependencies.
    So, no need to add `jodd-core`.


---
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] incubator-hivemall pull request #62: [HIVEMALL-89][SQL] Support to_from/from...

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

    https://github.com/apache/incubator-hivemall/pull/62#discussion_r105074849
  
    --- Diff: spark/spark-2.1/src/main/scala/org/apache/spark/sql/execution/datasources/csv/csvExpressions.scala ---
    @@ -0,0 +1,153 @@
    +/*
    + * 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.spark.sql.execution.datasources.csv
    +
    +import java.io.CharArrayWriter
    +
    +import jodd.util.CsvUtil
    --- End diff --
    
    Did you included dependencies for `jodd`?


---
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.
---