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 SparkDataType as wrapper for unmapped spark data type #2492

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

penghuo
Copy link
Collaborator

@penghuo penghuo commented Jan 31, 2024

Description

Add SparkDataType as wrapper for unmapped spark data type

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Peng Huo <penghuo@gmail.com>
dai-chen
dai-chen previously approved these changes Jan 31, 2024
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

column.getName(), new ExprTimestampValue(row.getString(column.getName())));
} else if (type == ExprCoreType.STRING) {
linkedHashMap.put(column.getName(), new ExprStringValue(row.getString(column.getName())));
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Just for understanding: anything apart from above datatypes is a SparkDataType.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, any spark datatype sql can not mapping to is wrapped as SparkDataType.

The major reason for doing this mapping is event analysis frontend feature use SQL data type to display type icon.

@vamsimanohar
Copy link
Member

Thanks for the fix. LGTM

vamsimanohar
vamsimanohar previously approved these changes Jan 31, 2024
Signed-off-by: Peng Huo <penghuo@gmail.com>
@penghuo penghuo dismissed stale reviews from vamsimanohar and dai-chen via 87a969e January 31, 2024 22:50
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6f30aea) 95.41% compared to head (87a969e) 95.41%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2492   +/-   ##
=========================================
  Coverage     95.41%   95.41%           
- Complexity     5000     5006    +6     
=========================================
  Files           479      481    +2     
  Lines         13950    13963   +13     
  Branches        937      940    +3     
=========================================
+ Hits          13310    13323   +13     
  Misses          618      618           
  Partials         22       22           
Flag Coverage Δ
sql-engine 95.41% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vamsimanohar vamsimanohar merged commit e59bf75 into opensearch-project:main Feb 1, 2024
20 of 22 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 1, 2024
* Add SparkDataType as wrapper for unmapped spark data type

Signed-off-by: Peng Huo <penghuo@gmail.com>

* add IT for parsing explain query reponse

Signed-off-by: Peng Huo <penghuo@gmail.com>

---------

Signed-off-by: Peng Huo <penghuo@gmail.com>
(cherry picked from commit e59bf75)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
penghuo pushed a commit that referenced this pull request Feb 1, 2024
)

* Add SparkDataType as wrapper for unmapped spark data type



* add IT for parsing explain query reponse



---------


(cherry picked from commit e59bf75)

Signed-off-by: Peng Huo <penghuo@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants