You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "zstan (via GitHub)" <gi...@apache.org> on 2023/09/22 07:40:32 UTC
[GitHub] [ignite-3] zstan opened a new pull request, #2615: IGNITE-20336 Sql. Remove conversion from java types to TypeSpec
zstan opened a new pull request, #2615:
URL: https://github.com/apache/ignite-3/pull/2615
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
### The Review Checklist
- [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:
\- There is a single JIRA ticket related to the pull request.
\- The web-link to the pull request is attached to the JIRA ticket.
\- The JIRA ticket has the Patch Available state.
\- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
\- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
- [ ] **Design:** new code conforms with the design principles of the components it is added to.
- [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
- [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
- [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
### Notes
- [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] xtern commented on a diff in pull request #2615: IGNITE-20336 Sql. Remove conversion from java types to TypeSpec
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #2615:
URL: https://github.com/apache/ignite-3/pull/2615#discussion_r1334133298
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/TypeUtils.java:
##########
@@ -151,22 +150,12 @@ public static RelDataType combinedRowType(IgniteTypeFactory typeFactory, RelData
return builder.build();
}
- /**
- * CreateRowType.
- * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
- */
- public static RelDataType createRowType(IgniteTypeFactory typeFactory, Class<?>... fields) {
- List<RelDataType> types = Arrays.stream(fields)
- .map(typeFactory::createJavaType)
- .collect(Collectors.toList());
-
- return createRowType(typeFactory, types, "$F");
+ /** Assembly output type from input types. */
+ public static RelDataType createRowType(IgniteTypeFactory typeFactory, List<RelDataType> fields) {
+ return createRowType(typeFactory, fields.toArray(new RelDataType[0]));
Review Comment:
The fact that we are converting a list to an array and then an array to a list looks a little strange. Maybe we can rework it a bit to avoid this double conversion?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] zstan merged pull request #2615: IGNITE-20336 Sql. Remove conversion from java types to TypeSpec
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan merged PR #2615:
URL: https://github.com/apache/ignite-3/pull/2615
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite-3] zstan commented on a diff in pull request #2615: IGNITE-20336 Sql. Remove conversion from java types to TypeSpec
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #2615:
URL: https://github.com/apache/ignite-3/pull/2615#discussion_r1334246635
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/TypeUtils.java:
##########
@@ -151,22 +150,12 @@ public static RelDataType combinedRowType(IgniteTypeFactory typeFactory, RelData
return builder.build();
}
- /**
- * CreateRowType.
- * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
- */
- public static RelDataType createRowType(IgniteTypeFactory typeFactory, Class<?>... fields) {
- List<RelDataType> types = Arrays.stream(fields)
- .map(typeFactory::createJavaType)
- .collect(Collectors.toList());
-
- return createRowType(typeFactory, types, "$F");
+ /** Assembly output type from input types. */
+ public static RelDataType createRowType(IgniteTypeFactory typeFactory, List<RelDataType> fields) {
+ return createRowType(typeFactory, fields.toArray(new RelDataType[0]));
Review Comment:
you are right, fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org