Skip to content

added Input Data POJO#1100

Closed
Nitish1814 wants to merge 246 commits intozinggAI:mainfrom
Nitish1814:lookup12march
Closed

added Input Data POJO#1100
Nitish1814 wants to merge 246 commits intozinggAI:mainfrom
Nitish1814:lookup12march

Conversation

@Nitish1814
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@sonalgoyal sonalgoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lookgs good overall, added few extra comments


public interface IData<D, R, C> {
List<ZFrame<D, R, C>> getData();
InputType getInputType();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getFirst

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getByIndex

import zingg.common.client.cols.ZidAndFieldDefSelector;
import zingg.common.core.executor.processunit.IDataProcessUnit;

public class ZidAndFieldSelectorUnit<D, R, C> implements IDataProcessUnit<D, R, C> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ColSelector...which takes iselector

@@ -0,0 +1,77 @@
package zingg.common.core.data;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to DataImpl or ZData

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}

@Override
public InputType getInputType() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed


protected List<ZFrame<D, R, C>> data;

public IDataImpl(List<ZFrame<D, R, C>> data) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add another constructor which takes ZFrame<> data... so its easier to constructo this object at other places

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to keep thie list of data final?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import zingg.common.client.ZFrame;
import zingg.common.client.ZinggClientException;

public interface IDataProcessUnit<D, R, C> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call it IDataProcessor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

public IData<D, R, C> getData(IArguments args, PipeUtilBase<S, D, R, C> p) throws ZinggClientException{
ZFrame<D,R,C> data = p.read(true, true, args.getNumPartitions(), true, args.getData());
return data;
return new IDataImpl<D, R, C>(new ArrayList<>(List.of(data)));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will go once oyu have the constructor in DataImpl/ZData

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

if (secondary == null) {
secondary = zFrame;
} else {
secondary = secondary.union(zFrame);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no we should not be doing a union here. we should just add all the frames one after the other

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that gives us flexibility to do multi joins etc as needed in the downstream executors

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -0,0 +1,6 @@
package zingg.common.core.data;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

}

@Override
public long count() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be cool to save it once computed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check for the way

@Nitish1814 Nitish1814 closed this May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants