Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 20A0C200BFA for ; Thu, 12 Jan 2017 09:41:14 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1F310160B40; Thu, 12 Jan 2017 08:41:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4192A160B2D for ; Thu, 12 Jan 2017 09:41:13 +0100 (CET) Received: (qmail 20653 invoked by uid 500); 12 Jan 2017 08:41:12 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 20641 invoked by uid 99); 12 Jan 2017 08:41:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2017 08:41:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 94AB5C047D for ; Thu, 12 Jan 2017 08:41:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id bdgoukSj0aUm for ; Thu, 12 Jan 2017 08:41:08 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 469C85F370 for ; Thu, 12 Jan 2017 08:41:08 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id r126so10118087wmr.0 for ; Thu, 12 Jan 2017 00:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=nXDi3NzD358aVt3lHp8vOLrPlcy+zSCoCIucZR7gm1I=; b=hYzH4TUxmW9dEK0PADUyiyeruIIFyNwO/14t3ojoGpzxy06fCWjTuCwkFxQZhVeJxv DIWU2fte6SuurcwrwCns/X6CtFp8Nlh3oUNln9QEXcKsWUiQHzxqW939M4EisEDmh6TU 030UVYYeK3qYdgpqmZhwQdawrPBJJ0607XRIlinnEzDCt527POGyZARDr8I+Z9IVdOqF DW85Y+OqWdTnJoYvGXgWwqQM6P1KAQDBqBrZLpnAy6p2UYBuUEnkCq5YR/X48+9Zoqfg JAKngwni8rkI/Mb3EfN/fyMaYFXbLOhlMkgBQYyuOBP7TP3EXctLthn3bJYpFG4m01oU gaeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=nXDi3NzD358aVt3lHp8vOLrPlcy+zSCoCIucZR7gm1I=; b=pIauUXuIdcpaXv3B62PV5k1cTyoFV9ToDryKT3B9VmAi2qJRpROVzERSspBjnGP2wq vxr9TqfaEhLocL/zyxUNFHd2Nu9t9Pr/bzfOmN5pKZ1RA4pk+WAEhM3IDCurAdO52Mx5 PVS81bUjcmhdSnk3VmK5uox289Us4g31DVDGrxS147CGdDZld/Wc6pMYPJ1XKMX9m11D m8wSwKHLFyjABJKstbHgxo8F6KV8nLBoaQy6PxmE3HQEWtcAGrprE3QA8Qjz9KwP2BuQ yl4lz3c3oKrPD91MgGHtCzU62bErHu5dNBcKfWWOa8xPfb94b5Aigq1imHE8tE+Lsf40 ELyg== X-Gm-Message-State: AIkVDXJGTjrs1nMuKVZRTYXGf+yxJ9S3ZCCmfT1X0eyF9oogwCEWqwZEg/BiMFHhdlmSeTS3j/d3q+VrezQ3aB5J X-Received: by 10.223.155.221 with SMTP id e29mr6111875wrc.107.1484210462476; Thu, 12 Jan 2017 00:41:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.234.34 with HTTP; Thu, 12 Jan 2017 00:41:01 -0800 (PST) In-Reply-To: References: From: Sergey Kozlov Date: Thu, 12 Jan 2017 11:41:01 +0300 Message-ID: Subject: Re: DDL implementation details To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c1b4e9a635db80545e1adb8 archived-at: Thu, 12 Jan 2017 08:41:14 -0000 --94eb2c1b4e9a635db80545e1adb8 Content-Type: text/plain; charset=UTF-8 As first stage of DDL we can implement following CREATE TABLE statement support: - CREATE TABLE without cache properties (use default cache properties or cache properties defined in SQL Schema) - CREATE TABLE .. LIKE where we can create a cache based on an another existing cache. On Thu, Jan 12, 2017 at 5:54 AM, Dmitriy Setrakyan wrote: > Agree with Sergey. We should be able to specify cache properties inside of > SQL statements. Does H2 have any support to process SQL hints? Can we > change it? > > Having said that, while we finalize the above, I think we should start > working on DDL implementation to use the default settings, as specified in > Alexander's email. > > Also agree with the stop-the-world on the cache for index creation. We can > always improve on it in future. > > D. > > On Wed, Jan 11, 2017 at 11:28 AM, Sergey Kozlov > wrote: > > > Hi > > > > I suppose we should put any ignite cache properties as additional > > non-standard attributes after CREATE TABLE () clause as it does > Postgress, > > MySQL and other RDBMS. > > Take a look on CREATE TABLE with using TABLESPACE (Postgess) or for > CREATE > > TABLE with using PARTITIONS (MySQL). > > > > > > > > > > > > On Wed, Jan 11, 2017 at 10:05 PM, Vladimir Ozerov > > wrote: > > > > > I believe custom synthax and parsing is a *must* for us, as well as for > > any > > > distributed database. At the very least we need to specify affinity key > > > column somehow. Any cache property can be specified at the very end of > > > table definition. Key columns can be determined as the ones with > PRIMARY > > > KEY constraint (Alex K. idea) + affinity column(s): > > > > > > CREATE TABLE employee ( > > > id BIGINT PRIMARY KEY, > > > dept_id BIGINT AFFINITY KEY, > > > name VARCHAR(128), > > > address VARCHAR(256) > > > BACKUPS 2, > > > ATOMICITY_MODE ATOMIC, > > > ); > > > > > > "id" and "dept_id" form key type, "name" and "address" form value type. > > > > > > Vladimir. > > > > > > On Wed, Jan 11, 2017 at 9:08 PM, Alexey Kuznetsov < > akuznetsov@apache.org > > > > > > wrote: > > > > > > > Hi, Alex! > > > > > > > > As far as I know most RDBMS allow something like: create table t1 (id > > > > integer primary key, ....) > > > > How about to take as key field that marked as "primary key"? > > > > > > > > As of atomicity and replication - I think it is a cache properties > and > > > with > > > > create table we will create "types" in cache. No? > > > > I thought that cache it is a kind of "schema" in RDBMS. > > > > > > > > Could you describe what will be created with CREATE TABLE? > > > > > > > > On Thu, Jan 12, 2017 at 12:54 AM, Alexander Paschenko < > > > > alexander.a.paschenko@gmail.com> wrote: > > > > > > > > > Hello Igniters, > > > > > > > > > > I would like to start discussion about implementation of SQL DDL > > > > commands. > > > > > > > > > > At the first stage, the most important ones seem to be CREATE TABLE > > > > > (that will obviously correspond to creation of a cache) and CREATE > > > > > INDEX. > > > > > > > > > > Regarding first one: SQL command for CREATE TABLE does not contain > > any > > > > > hints about cache settings (atomicity, replication, etc.), so these > > > > > will probably be defined by some configuration properties (like > > > > > ignite.ddl.default_cache_atomiticity, etc). > > > > > > > > > > Also it does not allow to distinguish between key and value > columns - > > > > > currently it is handled by keyFields property of QueryEntity, but > it > > > > > is unclear how to declare key fields via CREATE TABLE. > > > > > > > > > > So at a first glance it seems like we should either implement some > > > > > sort of custom parsing (I believe Sergi will be against it) or > > > > > introduce some kind of name prefix that would tell SQL engine that > > > > > certain column is a key field column. > > > > > > > > > > Of course, this problem disappears is key is of SQL type. > > > > > > > > > > Regarding CREATE INDEX: probably at first we will have to implement > > > > > this in "stop-the-world" manner, i.e. all cache will be blocked > > during > > > > > the index's initial buildup. > > > > > > > > > > Any thoughts? > > > > > > > > > > Currently I'm working on parsing of those commands as that will be > > > > > needed anyway and does not affect further implementation. > > > > > > > > > > - Alex > > > > > > > > > > > > > > > > > > > > > -- > > > > Alexey Kuznetsov > > > > > > > > > > > > > > > -- > > Sergey Kozlov > > GridGain Systems > > www.gridgain.com > > > -- Sergey Kozlov GridGain Systems www.gridgain.com --94eb2c1b4e9a635db80545e1adb8--