You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/15 07:12:49 UTC

[GitHub] [spark] viirya opened a new pull request #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

viirya opened a new pull request #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918
 
 
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   This is a follow-up of #27851. This proposes to also support nonnull annotation on fields directly.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   Enabling users to encode Java Beans with non-nullable fields to non-null schema.
   
   ### Does this PR introduce any user-facing change?
   <!--
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If no, write 'No'.
   -->
   
   Yes, uses can use `javax.annotation.Nonnull` to annotate fields directly.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   
   Unit tests.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599197006
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176799
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599197008
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119812/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176712
 
 
   **[Test build #119812 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119812/testReport)** for PR 27918 at commit [`bb125db`](https://github.com/apache/spark/commit/bb125db3e56848c6a3c50b875b7ef88d6747139b).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599196814
 
 
   **[Test build #119812 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119812/testReport)** for PR 27918 at commit [`bb125db`](https://github.com/apache/spark/commit/bb125db3e56848c6a3c50b875b7ef88d6747139b).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya closed pull request #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
viirya closed pull request #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599245128
 
 
   Hmm.... Not sure what you mean from _Java_ standpoint...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599197006
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599246596
 
 
   This change would mean that the _property_ should not be marked as @Nonnull. I mean, it is up to the author to ensure that the properties can never be null if the annotation is in place. I see your point now. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
viirya commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599262112
 
 
   That's good point. I think it is possible and the example code looks correctly marked. I thought about possible inconsistent cases like this too, but I was not sure if this is plausible use case, i.e. we will see real Java Beans like that. I now agree with @srowen's point that it's possible this case exists. @kyrill007 do you have more idea on this? If no, I may close this later.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599269670
 
 
   What's the motivation here? to not annotate a property, when we want to state something about the property? I don't think that's enough of a reason to support.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599267714
 
 
   It is a better place (I just want both places). What is not great is to declare a field @Nonnull, but make a property nullable. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599243876
 
 
   Hm, is it possible that the field is non-null but the getter method is not? it's _possible_ but wondering if there's any use case for it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599245782
 
 
   @kyrill007 what about this situation:
   ```
   @Nonnull
   private String foo;
   ...
   public String getFoo() {
     if (... some condition ...) {
       return null;
     }
     return foo;
   }
   ```
   The bean property `foo` can't be considered non-null here, but this change would cause it to be, right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599247542
 
 
   Right, since the encoder always reads *properties*, I thought it would be too much to ask Spark guys to support this annotation on fields too. It would have made what you're describing possible, which would be somewhat incorrect. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599265319
 
 
   Hm, why is the above case bad programming?
   Why would the property not be the better place to express nullability of the property?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599197008
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119812/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
viirya commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599268330
 
 
   Although I cannot tell if this is bad or not, the example provided above looks a legal one. Except for few special cases like that, putting the annotation at fields also looks like reasonable. @srowen How about add a SQL config to control where (getter, field) we look at the annotation?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176802
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24542/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
viirya commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176515
 
 
   cc @cloud-fan @HyukjinKwon @kyrill007 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599265062
 
 
   I don't think this is a plausible case, and it is definitely a case of bad programming. :) So, I would love if Spark could look at fields too for this annotation. I do put them on fields in my domain model, I don't mind duplicating them on _getters_ too, but why...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599244118
 
 
   Yeah, I'd love if Spark also looked at @Nonull *fields*. But it looks like Bean encoder looks only at *properties*, so I haven't mentioned it. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599247260
 
 
   Here it's correctly marked, even. The field is never null (let's say); the bean property clearly may be null though. This change would mean the property is taken to be non-null, which isn't correct. It's probably not common, but, I think it's possible this (correct) case exists, and this would do the wrong thing.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176802
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24542/
   Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
kyrill007 commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599271008
 
 
   Yes, I will not insist. There are some rules that _Encoder.bean_ follows. The values of Java beans are read as _properties_ through getter methods. It would be a much stronger case if we could instruct Encoder *where to read values from*: fields or properties, but I realize that is a much bigger discussion than a simple @Nonnull annotation. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176799
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599176712
 
 
   **[Test build #119812 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119812/testReport)** for PR 27918 at commit [`bb125db`](https://github.com/apache/spark/commit/bb125db3e56848c6a3c50b875b7ef88d6747139b).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly

Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27918: [SPARK-31071][SQL][Follow-up] Support nonnull annotation by field directly
URL: https://github.com/apache/spark/pull/27918#issuecomment-599244277
 
 
   I'm saying it's possible that the property is nullable but some underlying field is not, in which case, you don't want to consider it non-nullable right? but wondering if this is even a plausible use case, even if it's possible in code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org