You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2023/08/04 10:03:05 UTC

[ignite-3] 01/01: Merge branch 'main' into ignite-20105

This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch ignite-20105
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 532a495e1121a423492e981adb2daa61fc352755
Merge: c95e9d3651 c24e6e0497
Author: amashenkov <an...@gmail.com>
AuthorDate: Fri Aug 4 13:02:47 2023 +0300

    Merge branch 'main' into ignite-20105
    
    # Conflicts:
    #       modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java

 .../org/apache/ignite/table/mapper/PojoMapper.java |   8 +
 .../apache/ignite/table/mapper/PojoMapperImpl.java |   7 +
 modules/catalog/build.gradle                       |   6 +
 .../ignite/internal/catalog/CatalogManager.java    |   8 +-
 .../internal/catalog/CatalogManagerImpl.java       |  82 ++--
 .../catalog/CatalogParamsValidationUtils.java      | 181 +++++++
 .../catalog/CatalogValidationException.java        |  53 ++
 .../internal/catalog/commands/AlterZoneParams.java |  20 +
 .../internal/catalog/commands/CatalogUtils.java    |  29 ++
 .../catalog/commands/CreateZoneParams.java         |  49 +-
 ...{DropZoneParams.java => DataStorageParams.java} |  56 ++-
 .../internal/catalog/commands/DropZoneParams.java  |  41 +-
 .../descriptors/CatalogDataStorageDescriptor.java  |   1 +
 .../internal/catalog/BaseCatalogManagerTest.java   |  84 ++++
 .../internal/catalog/CatalogManagerSelfTest.java   | 104 ++--
 .../catalog/CatalogManagerValidationTest.java      | 541 +++++++++++++++++++++
 .../ignite/internal/client/TcpClientChannel.java   |   2 +-
 .../internal/client/table/ClientKeyValueView.java  |   4 +-
 .../ignite/internal/client/table/ClientSchema.java |   6 +-
 .../client/table/ClientTupleSerializer.java        |  76 ++-
 .../ignite/client/AbstractClientTableTest.java     | 114 ++++-
 .../ignite/client/ClientKeyValueViewTest.java      |  85 ++--
 .../apache/ignite/client/ClientRecordViewTest.java |  37 +-
 .../org/apache/ignite/client/DataStreamerTest.java |  12 +-
 .../ignite/client/PartitionAwarenessTest.java      |  35 +-
 .../ignite/lang/IgniteInternalException.java       |  13 +
 .../ignite/internal/marshaller/Marshaller.java     |  47 +-
 .../ItThinClientMarshallingEmbeddedTest.java       |  30 ++
 .../app/client/ItThinClientMarshallingTest.java    | 126 +++++
 .../ItThinClientSchemaSynchronizationTest.java     |  16 +-
 .../runner/app/client/ItThinClientSqlTest.java     |   8 +-
 .../streamer/ItAbstractDataStreamerTest.java       |  31 +-
 .../asm/ObjectMarshallerCodeGenerator.java         |  12 +
 .../marshaller/reflection/KvMarshallerImpl.java    |   4 +-
 .../schema/marshaller/reflection/Marshaller.java   |  41 +-
 .../reflection/RecordMarshallerImpl.java           |   6 +-
 .../schema/marshaller/KvMarshallerTest.java        | 140 +++---
 .../schema/marshaller/RecordMarshallerTest.java    |  78 ++-
 .../schema/testobjects/TestBitmaskObject.java      |  46 ++
 .../schema/testobjects/TestSimpleObjectKey.java    |  65 +++
 .../schema/testobjects/TestSimpleObjectVal.java    |  67 +++
 .../engine/exec/ddl/DdlCommandHandlerWrapper.java  |   8 +-
 .../storage/impl/TestMvPartitionStorage.java       |  10 +-
 .../schema/marshaller/TupleMarshallerImpl.java     |   4 +-
 .../table/distributed/StorageUpdateHandler.java    |  27 +-
 .../replicator/PartitionReplicaListener.java       |  53 +-
 46 files changed, 1966 insertions(+), 507 deletions(-)

diff --cc modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
index 00868794e7,99f31b6f29..0b1d4e3bcb
--- a/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
+++ b/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java
@@@ -38,55 -38,35 +38,84 @@@ import org.apache.ignite.sql.ColumnType
   * Catalog utils.
   */
  public class CatalogUtils {
+     /** Default number of distribution zone partitions. */
+     public static final int DEFAULT_PARTITION_COUNT = 25;
+ 
+     /** Default number of distribution zone replicas. */
+     public static final int DEFAULT_REPLICA_COUNT = 1;
+ 
+     /**
+      * Default filter of distribution zone, which is a {@link com.jayway.jsonpath.JsonPath} expression for including all attributes of
+      * nodes.
+      */
+     public static final String DEFAULT_FILTER = "$.+";
+ 
+     /** Default distribution zone storage engine. */
+     // TODO: IGNITE-19719 Should be defined differently
+     public static final String DEFAULT_STORAGE_ENGINE = "aipersist";
+ 
+     /** Default distribution zone storage engine data region. */
+     // TODO: IGNITE-19719 Must be storage engine specific
+     public static final String DEFAULT_DATA_REGION = "default";
+ 
+     /** Infinite value for the distribution zone timers. */
+     public static final int INFINITE_TIMER_VALUE = Integer.MAX_VALUE;
+ 
+     /** Value for the distribution zone timers which means that data nodes changing will be started without waiting. */
+     public static final int IMMEDIATE_TIMER_VALUE = 0;
+ 
+     /** Max number of distribution zone partitions. */
+     public static final int MAX_PARTITION_COUNT = 65_000;
+ 
 +    /**
 +     * Default TIMESTAMP type precision: microseconds.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 36
 +     */
 +    public static final int DEFAULT_TIMESTAMP_PRECISION = 6;
 +
 +    /**
 +     * Default TIME type precision: seconds.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 36
 +     */
 +    public static final int DEFAULT_TIME_PRECISION = 0;
 +
 +    /**
 +     * Default DECIMAL precision is implementation-defined.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 20
 +     */
 +    public static final int DEFAULT_DECIMAL_PRECISION = 19;
 +
 +    /**
 +     * Default scale is 0.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 22
 +     */
 +    public static final int DEFAULT_SCALE = 0;
 +
 +    /**
 +     * Maximum TIME and TIMESTAMP precision is implementation-defined.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 38
 +     */
 +    public static final int MAX_TIME_PRECISION = 9;
 +
 +    /**
 +     * Max DECIMAL precision is implementation-defined.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 25
 +     */
 +    public static final int MAX_DECIMAL_PRECISION = Short.MAX_VALUE;
 +
 +    /**
 +     * Max DECIMAL scale is implementation-defined.
 +     *
 +     * <p>SQL`16 part 2 section 6.1 syntax rule 25
 +     */
 +    public static final int MAX_DECIMAL_SCALE = Short.MAX_VALUE;
 +
      private static final Map<ColumnType, Set<ColumnType>> ALTER_COLUMN_TYPE_TRANSITIONS = new EnumMap<>(ColumnType.class);
  
      static {