You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "AMashenkov (via GitHub)" <gi...@apache.org> on 2023/06/28 10:39:31 UTC

[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2226: IGNITE-17765 Sql. Introduce cache for parsed statements

AMashenkov commented on code in PR #2226:
URL: https://github.com/apache/ignite-3/pull/2226#discussion_r1245027243


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/PrepareServiceImpl.java:
##########
@@ -296,4 +364,67 @@ private ResultSetMetadata resultSetMetadata(
                 }
         );
     }
+
+    private static SqlNode parse(String query, QueryContext queryContext, BaseQueryContext ctx) {
+        StatementParseResult parseResult = IgniteSqlParser.parse(query, StatementParseResult.MODE);
+
+        SqlNode sqlNode = parseResult.statement();
+
+        validateParsedStatement(queryContext, parseResult, sqlNode, ctx.parameters());
+
+        return sqlNode;
+    }
+
+    private static boolean skipCache(SqlNode sqlNode) {
+        SqlKind kind = sqlNode.getKind();
+
+        switch (kind) {
+            case SELECT:
+            case INSERT:
+                return false;

Review Comment:
   There is an issue with DELETE statement https://issues.apache.org/jira/browse/IGNITE-19866.
   Allow caching for the rest of DML queries.



-- 
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