[ https://issues.apache.org/jira/browse/IGNITE-21122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913235#comment-17913235 ]
Pavel Pereslegin edited comment on IGNITE-21122 at 1/15/25 9:35 AM: -------------------------------------------------------------------- [~mzhuravkov], merged to the main branch ([85d36ec|https://github.com/apache/ignite-3/commit/85d36ec3577098dc23e511c06302b84b2cb02cec]), thanks for the contribution! was (Author: xtern): [~mzhuravkov], merged to the main branch ([85d36ec|https://github.com/apache/ignite-3/commit/85d36ec3577098dc23e511c06302b84b2cb02cec]), thanks for the contribution! > Sql. Introduce attributes for SqlQueryType and use them instead of direct > checks. > --------------------------------------------------------------------------------- > > Key: IGNITE-21122 > URL: https://issues.apache.org/jira/browse/IGNITE-21122 > Project: Ignite > Issue Type: Improvement > Components: sql > Reporter: Maksim Zhuravkov > Assignee: Maksim Zhuravkov > Priority: Minor > Labels: ignite-3 > Fix For: 3.1 > > Time Spent: 20m > Remaining Estimate: 0h > > Instead of using specific SqlQueryTypes in checks such as `queryType == > SqlQueryType.QUERY || queryType == SqlQueryType.DML` in > `ParserServiceImpl::shouldBeCached`, we can introduce "attrbiutes" that > answer such questions. E.g. `queryType.cacheParseResult()` > > Possible canidate for such "attributes": > - can we cache AST for a statement? (See ParserServiceImpl:: shouldBeCached) > - does a statement produce a result set? (See SELECT_STATEMENT_QUERIES, > UPDATE_STATEMENT_QUERIES in JDBC and cursor::hasRowSet, cursor::affectedRows) > - does a statement support EXPLAIN command? (See > PrepareService::prepareExplain) > - can a statement run outside of a script? (see START TRANSACTION, ROLLBACK, > COMMIT) > - is this a read-only statement (see IGNITE-20673 > SqlQueryProcessor::readOnlyQuery)? -- This message was sent by Atlassian Jira (v8.20.10#820010)