You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "marc-pydantic (via GitHub)" <gi...@apache.org> on 2025/10/27 13:27:05 UTC

[PR] Enforce unique names for `is_set` on `first_value` and `last_value` [datafusion]

marc-pydantic opened a new pull request, #18303:
URL: https://github.com/apache/datafusion/pull/18303

   ## Which issue does this PR close?
   
   - Closes #18302
   
   ## Rationale for this change
   
   As described in the issue, this is a low-effort QoL fix for now.
   
   ## What changes are included in this PR?
   
   Uses the existing function for naming fields to replace the hardcoded `"is_set"` with a field-dependent name. Example output:
   
   ```
   Field {
       name: "first_value(records_partitioned.trace_id)[first_value]",
       data_type: Utf8View,
       nullable: true,
       dict_id: 0,
       dict_is_ordered: false,
       metadata: {},
   },
   Field {
       name: "first_value(records_partitioned.trace_id)[first_value_is_set]",
       data_type: Boolean,
       nullable: true,
       dict_id: 0,
       dict_is_ordered: false,
       metadata: {},
   },
   Field {
       name: "first_value(records_partitioned.value)[first_value]",
       data_type: Int32,
       nullable: true,
       dict_id: 0,
       dict_is_ordered: false,
       metadata: {},
   },
   Field {
       name: "first_value(records_partitioned.value)[first_value_is_set]",
       data_type: Boolean,
       nullable: true,
       dict_id: 0,
       dict_is_ordered: false,
       metadata: {},
   },
   ```
   
   ## Are these changes tested?
   
   No tests have been added, hopefully it should be covered by existing changes.
   
   ## Are there any user-facing changes?
   
   There should not be any, I assume `is_set` is never user visible.
   


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Enforce unique names for `is_set` on `first_value` and `last_value` [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #18303:
URL: https://github.com/apache/datafusion/pull/18303


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Enforce unique names for `is_set` on `first_value` and `last_value` [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #18303:
URL: https://github.com/apache/datafusion/pull/18303#issuecomment-3451377916

   Looks like need to make some accompanying changes to test in the codebase


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Enforce unique names for `is_set` on `first_value` and `last_value` [datafusion]

Posted by "marc-pydantic (via GitHub)" <gi...@apache.org>.
marc-pydantic commented on PR #18303:
URL: https://github.com/apache/datafusion/pull/18303#issuecomment-3451663984

   I made the change. `test_duplicate_state_fields_for_dfschema_construct` is a bit weaker for it, but it still has one duplicate field left, namely `timestamp@0`.


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Enforce unique names for `is_set` on `first_value` and `last_value` [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #18303:
URL: https://github.com/apache/datafusion/pull/18303#issuecomment-3454170104

   Thanks @marc-pydantic 


-- 
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: github-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org