skorotkov commented on code in PR #12055: URL: https://github.com/apache/ignite/pull/12055#discussion_r2095062098
########## modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/calcite/CalciteTestingApplication.java: ########## @@ -0,0 +1,360 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ignite.internal.ducktest.tests.calcite; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.Date; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Time; +import java.sql.Timestamp; +import java.time.Period; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import com.fasterxml.jackson.databind.JsonNode; +import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication; + +/** + * Calcite engine tests + */ +public class CalciteTestingApplication extends IgniteAwareApplication { + /** + * Helper class for testing SQL queries. + * Contains the query, expected results, and a flag to skip verification. + */ + private static class QueryTest { + /** Query. */ + String qry; + + /** Expected results. */ + List<Object> expectedResults; + + /** Skip verification. */ + boolean skipVerification; + + /** + * @param qry Query. + * @param expectedResults Expected results. + */ + QueryTest(String qry, Object... expectedResults) { + this.qry = qry; + this.expectedResults = Arrays.asList(expectedResults); + skipVerification = expectedResults.length == 0; + } + } + + /** {@inheritDoc} */ + @Override public void run(JsonNode jsonNode) throws SQLException { + markInitialized(); + + try (Connection conn = thinJdbcDataSource.getConnection()) { + Review Comment: Empty line is not needed here. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org