parquet-java icon indicating copy to clipboard operation
parquet-java copied to clipboard

Make ColumnPath immutable

Open findepi opened this issue 1 year ago • 3 comments

Make sure you have checked all steps below.

Jira

  • [ ] My PR addresses the following Parquet Jira issues and references them in the PR title. For example, "PARQUET-1234: My Parquet PR"
    • https://issues.apache.org/jira/browse/PARQUET-XXX
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Tests

  • [x] My PR adds the following unit tests OR does not need testing for this extremely good reason: I don't know of an estabilished way of testing for class immutability

Commits

  • [ ] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Style

  • [x] My contribution adheres to the code style guidelines and Spotless passes.
    • To apply the necessary changes, run mvn spotless:apply -Pvector-plugins

Documentation

  • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

findepi avatar Jun 20 '24 11:06 findepi

cc @raunaqmorarka

  • My PR addresses the following Parquet Jira issues and references them in the PR title.

not yet. I will create one if needed

findepi avatar Jun 20 '24 11:06 findepi

It seems that you need to run mvn spotless:apply to make the CIs happy.

wgtmac avatar Jul 03 '24 16:07 wgtmac

@wgtmac thanks! can you please allow the workflow again? It passed on my fork this time.

findepi avatar Jul 03 '24 19:07 findepi

BTW, could you please create an issue to explain why do we need this change?

https://github.com/apache/parquet-java/issues/new/choose

wgtmac avatar Jul 04 '24 02:07 wgtmac

I don't think i can describe my reasoning in terms of a end-user perceivable bug. I do believe immutable objects are easier to reason about and ColumnPath looks like it was intended not to be mutated.

findepi avatar Jul 04 '24 06:07 findepi