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

Implement a transformation which takes value from another column of output file #25

Open
anatoly-scherbakov opened this issue Jun 28, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@anatoly-scherbakov
Copy link
Collaborator

How to call this?

  • output
  • column
  • from-column
  • copy-column
  • duplicate

This task also means that we need to process columns in the order of their dependencies one from another; this makes this task rather complicated.

@anatoly-scherbakov anatoly-scherbakov self-assigned this Jun 28, 2020
@anatoly-scherbakov anatoly-scherbakov added the enhancement New feature or request label Jun 28, 2020
@anatoly-scherbakov
Copy link
Collaborator Author

I will go with from.

@anatoly-scherbakov
Copy link
Collaborator Author

When transformation chain for column a refers to column b, it requires that the value for b for current line must be already computed.

Right now, the cells of output row are calculated in the order in which they come in output file, left to right. However, since column 1 might in fact reference column 2, such a simplistic calculation is not always possible.

What we have to do is:

  • Determine the order of processing for the available columns;
  • Calculate columns in that specified order;
  • When calculating every column, we need to have access to results of calculating previous columns (as vector? as linked map?)
  • When outputting the row, we need to order it properly for output.

@anatoly-scherbakov
Copy link
Collaborator Author

anatoly-scherbakov commented Jun 29, 2020

I believe we will use a mutable BTreeMap<String, Option<String>> for a while to store values of the current output row. This is not efficient, but I'd like to get a proof of concept working first.

We will separately store a Vec<String> sequence of columns in the order of processing them.

anatoly-scherbakov added a commit that referenced this issue Jul 3, 2020
anatoly-scherbakov added a commit that referenced this issue Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant