-
Notifications
You must be signed in to change notification settings - Fork 148
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
Conversation
Signed-off-by: Peng Huo <penghuo@gmail.com>
There was a problem hiding this 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!
.../java/org/opensearch/sql/spark/functions/response/DefaultSparkSqlFunctionResponseHandle.java
Show resolved
Hide resolved
column.getName(), new ExprTimestampValue(row.getString(column.getName()))); | ||
} else if (type == ExprCoreType.STRING) { | ||
linkedHashMap.put(column.getName(), new ExprStringValue(row.getString(column.getName()))); | ||
} else { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks for the fix. LGTM |
Signed-off-by: Peng Huo <penghuo@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
* 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>
) * 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>
Description
Add SparkDataType as wrapper for unmapped spark data type
Issues Resolved
Check List
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.