Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility with time_agg with only one operand #79

Open
javihern98 opened this issue Feb 21, 2025 · 4 comments
Open

Add compatibility with time_agg with only one operand #79

javihern98 opened this issue Feb 21, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@javihern98
Copy link
Contributor

javihern98 commented Feb 21, 2025

Overview

Currently we support the time aggregation when we pass the dataset. Seems there is another option where we do not pass any operand to the time_agg (currently not supported):

DS_r := sum ( DS_1 group all time_agg ( "A" ) )

Error shown when generating the AST:

vtlengine.Exceptions.SemanticError: ('Optional or empty expression node is not allowed in time_agg.', '1-4-2-2')

Tasks to perform

  • Review the manual and discuss the potential behaviour of this function
  • Add a ticket to the VTL community if necessary
  • Implement the expected behaviour and remove this Semantic Error
@javihern98 javihern98 added enhancement New feature or request question Further information is requested labels Feb 21, 2025
@javihern98 javihern98 added this to the 1.1 milestone Feb 21, 2025
@javihern98
Copy link
Contributor Author

javihern98 commented Feb 21, 2025

@antonio-olleros Please review this (not urgent)

Image

@antonio-olleros
Copy link
Contributor

Hi Javier, how do we support it? Do we need to add the time component code? If that's the case, then I would say we need to support also this case, with a check: The dataset on which we are aggregating needs to have one, and only one, time dimension

@javihern98
Copy link
Contributor Author

Currently we add the time component code in the expression. I agree on the check.

@mla2001
Copy link
Contributor

mla2001 commented Feb 25, 2025

It is not necessary to indicate the time id, there is a method that detects it from a dataset. Check the following method:
Time.py: 60
_get_time_id(cls, operand: Dataset)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants