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

[hotfix] multi stage engine serde #8689

Conversation

walterddr
Copy link
Contributor

SerDeUtils has 2 limitations

  1. annotated rowType field is of Calcite's relational data type and cannot be understood.
  2. @ProtoProperites field lookup doesn't extend into superClass

change to use RexExpression from pinot that's proto serializable. to fix item 1, item 2 will be address separately

- fix serde issue with calcite data object
- adding in correct serde test
@walterddr walterddr changed the base branch from master to multi_stage_query_engine May 12, 2022 16:29

public JoinNode(int stageId) {
super(stageId);
}

public JoinNode(int stageId, RelDataType rowType, JoinRelType joinRelType, List<JoinClause> criteria) {
public JoinNode(int stageId, FieldSpec.DataType rowType, JoinRelType joinRelType, List<JoinClause> criteria) {
Copy link
Contributor

@siddharthteotia siddharthteotia May 12, 2022

Choose a reason for hiding this comment

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

IIUC, RelDataType can be used to represent a field's type in Calcite and also the rowType since it encapsulates the field info of all fields ? So, replacing it here with Pinot FieldSpec.DataType for Join seems intuitive since the two join key columns will be of the same type.

However, the same change further down in TableScanNode does not seem intuitive because TableScanNode technically needs a rowType as it may not necessarily work at the single column level ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this field as it is not used.


public TableScanNode(int stageId) {
super(stageId);
}

public TableScanNode(int stageId, RelDataType rowType, String tableName, List<String> tableScanColumns) {
public TableScanNode(int stageId, FieldSpec.DataType rowType, String tableName, List<String> tableScanColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we ok with replacing rowType with a columnType ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. actually pinot doens't support nested schema (for now) so I think we can do a list of datatypes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

2nd thought. no need to encode this here. we will add RexExpression if needed

@walterddr walterddr force-pushed the hotfix_multi_stage_engine_serde branch from 2b12b36 to c8c6d67 Compare May 12, 2022 20:49
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2022

Codecov Report

❗ No coverage uploaded for pull request base (multi_stage_query_engine@77b59bf). Click here to learn what that means.
The diff coverage is n/a.

@@                     Coverage Diff                     @@
##             multi_stage_query_engine    #8689   +/-   ##
===========================================================
  Coverage                            ?   70.47%           
  Complexity                          ?     4723           
===========================================================
  Files                               ?     1749           
  Lines                               ?    90186           
  Branches                            ?    13402           
===========================================================
  Hits                                ?    63562           
  Misses                              ?    22246           
  Partials                            ?     4378           
Flag Coverage Δ
integration1 27.51% <0.00%> (?)
integration2 25.36% <0.00%> (?)
unittests1 66.13% <0.00%> (?)
unittests2 15.71% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77b59bf...c8c6d67. Read the comment docs.

@siddharthteotia siddharthteotia merged commit 08da4ee into apache:multi_stage_query_engine May 12, 2022
walterddr added a commit to walterddr/pinot that referenced this pull request May 17, 2022
* [hotfix] serde issue with RelDataType from Calcite

- fix serde issue with calcite data object
- adding in correct serde test

* remove rowType, as it is encoded in RexExpression already

Co-authored-by: Rong Rong <rongr@startree.ai>
walterddr added a commit to walterddr/pinot that referenced this pull request May 24, 2022
* [hotfix] serde issue with RelDataType from Calcite

- fix serde issue with calcite data object
- adding in correct serde test

* remove rowType, as it is encoded in RexExpression already

Co-authored-by: Rong Rong <rongr@startree.ai>
walterddr added a commit to walterddr/pinot that referenced this pull request Jun 8, 2022
* [hotfix] serde issue with RelDataType from Calcite

- fix serde issue with calcite data object
- adding in correct serde test

* remove rowType, as it is encoded in RexExpression already

Co-authored-by: Rong Rong <rongr@startree.ai>
walterddr added a commit that referenced this pull request Jun 8, 2022
* [hotfix] serde issue with RelDataType from Calcite

- fix serde issue with calcite data object
- adding in correct serde test

* remove rowType, as it is encoded in RexExpression already

Co-authored-by: Rong Rong <rongr@startree.ai>
@walterddr walterddr deleted the hotfix_multi_stage_engine_serde branch December 6, 2023 16:20
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.

3 participants