You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "KenanAdel (via GitHub)" <gi...@apache.org> on 2026/06/17 19:31:33 UTC

[PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

KenanAdel opened a new pull request, #28475:
URL: https://github.com/apache/flink/pull/28475

   ## What is the purpose of the change
   
   Fix CallContextMock to correctly handle optional arguments in test scenarios. The previous implementation could throw IndexOutOfBoundsException when accessing arguments that are not provided. This change ensures compliance with the CallContext interface contract by safely handling missing arguments.
   
   ## Brief change log
   
   - Prevent IndexOutOfBoundsException when accessing arguments beyond the available range
   - Return true for missing optional arguments or when the internal argument list is not initialized
   - Preserve existing behavior for explicitly provided arguments


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "spuru9 (via GitHub)" <gi...@apache.org>.
spuru9 commented on code in PR #28475:
URL: https://github.com/apache/flink/pull/28475#discussion_r3433293769


##########
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/utils/CallContextMock.java:
##########


Review Comment:
   isArgumentLiteral() and getArgumentValue() still do a raw .get(pos).  Not part of the ticket, but might as well guard it the same way while you're here



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #28475:
URL: https://github.com/apache/flink/pull/28475#issuecomment-4734494633

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d68f757d795d2ba6dd595f50d740c5e923ae66cd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d68f757d795d2ba6dd595f50d740c5e923ae66cd",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d68f757d795d2ba6dd595f50d740c5e923ae66cd UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "KenanAdel (via GitHub)" <gi...@apache.org>.
KenanAdel commented on code in PR #28475:
URL: https://github.com/apache/flink/pull/28475#discussion_r3436238166


##########
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/inference/utils/CallContextMock.java:
##########


Review Comment:
   @spuru9 Done. I've updated the PR description using the repository template and added consistent guard conditions to both isArgumentLiteral() and getArgumentValue(). Thanks for the review!



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser commented on PR #28475:
URL: https://github.com/apache/flink/pull/28475#issuecomment-4744079023

   This is also a PR that I highly suspect that's not follow the AI contribution guidelines, and we can't merge it as is


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "KenanAdel (via GitHub)" <gi...@apache.org>.
KenanAdel commented on PR #28475:
URL: https://github.com/apache/flink/pull/28475#issuecomment-4744375305

   Thanks for the feedback I've reviewed the AI contribution guidelines and updated the PR to comply with them, including the required disclosure and PR template updates. I have verified the implementation and understand the design and code logic The PR is ready for review. @MartijnVisser


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "KenanAdel (via GitHub)" <gi...@apache.org>.
KenanAdel commented on PR #28475:
URL: https://github.com/apache/flink/pull/28475#issuecomment-4735136819

   @flinkbot run azure


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39952][Table SQL/Planner] Fix CallContextMock.isArgumentNull() to correctly handle optional arguments [flink]

Posted by "KenanAdel (via GitHub)" <gi...@apache.org>.
KenanAdel commented on PR #28475:
URL: https://github.com/apache/flink/pull/28475#issuecomment-4794583912

   > > Previously, some methods could access argument metadata and values using direct list lookups, which could lead to IndexOutOfBoundsException when a test declared optional arguments but did not provide corresponding entries. This change makes the mock handle missing optional arguments consistently and safely.
   > 
   > how in this PR we can be sure that it is fixed and will not be broken after some other code change?
   
   Thanks for the feedback.
   I added regression tests for CallContextMock covering missing argument metadata, missing values, and out-of-bounds access The tests ensure the issue won’t be reintroduced in future changes.
   
   All tests are passing in CI.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org