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

[GitHub] [ignite] siaron opened a new issue, #10746: Apache Ignite Table support Schemaless ?

siaron opened a new issue, #10746:
URL: https://github.com/apache/ignite/issues/10746

    Apache Ignite Table  usage supports Schemaless ?. For example, columns are automatically created when writing. More common in IoT scenarios


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite] siaron commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1568113063

   Use the key, value api to operate the table, how to update the schema of the table after dynamically adding columns


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


[GitHub] [ignite] siaron commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1567792531

   if using UPDATE set some filed value, Will ignite internally re-write the value of the entire object? Will there be a problem with write amplification?


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


[GitHub] [ignite] siaron closed issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron closed issue #10746:  Apache Ignite Table support  Schemaless ?
URL: https://github.com/apache/ignite/issues/10746


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


[GitHub] [ignite] siaron closed issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron closed issue #10746:  Apache Ignite Table support  Schemaless ?
URL: https://github.com/apache/ignite/issues/10746


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


[GitHub] [ignite] ptupitsyn commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1568027001

   The data is stored in serialized form (think byte array). Ignite knows the offset of every field in this byte array. Only the modified field will be updated, other fields are not deserialized/serialized.


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


[GitHub] [ignite] ptupitsyn commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1566857529

   Adding or deleting a column with SQL API should be fairly quick, because it does not modify the data. The data is always stored in schemaless format (key/value pairs). 
   
   For example:
   
   
   ```csharp
   using Apache.Ignite.Core;
   using Apache.Ignite.Core.Cache.Configuration;
   using Apache.Ignite.Core.Cache.Query;
   
   var ignite = Ignition.Start();
   
   var cfg = new CacheConfiguration("c", new QueryEntity(typeof(Person)));
   var cache = ignite.GetOrCreateCache<int, Person>(cfg);
   cache[1] = new Person(1, "Foo", 123);
   
   Query("SELECT * FROM PERSON");
   Query("ALTER TABLE Person ADD COLUMN Age INT");
   Query("SELECT * FROM PERSON");
   Query("ALTER TABLE Person DROP COLUMN Age");
   
   // "Age" value is not affected by DDL.
   Console.WriteLine("Person = " + cache[1]);
   
   void Query(string sql)
   {
       Console.WriteLine(" >>> " + sql);
   
       using var cursor = cache.Query(new SqlFieldsQuery(sql));
   
       foreach (var name in cursor.FieldNames)
       {
           Console.Write($"{name}\t");
       }
   
       Console.WriteLine();
   
       foreach (var row in cursor)
       {
           foreach (var val in row)
           {
               Console.Write($"{val}\t");
           }
       }
   
       Console.WriteLine();
       Console.WriteLine();
   }
   
   // Initial configuration does not include SQL Age column.
   public record Person(
       [property: QuerySqlField] int Id,
       [property: QuerySqlField] string Name,
       int Age);
   ```


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


[GitHub] [ignite] siaron commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1568012187

   Ignite will also serialize the entire value object internally and then update a certain field and write it into memory?


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


[GitHub] [ignite] ptupitsyn commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1568127310

   > Use the key, value api to dynamically add colum on Cache, how to update table schema .
   
   Use `ALTER TABLE .. ADD COLUMN ..` to update the SQL schema. See the example above


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


[GitHub] [ignite] ptupitsyn commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1566692555

   Yes, our key-value API is schemaless.
   
   More info:
   * https://ignite.apache.org/docs/latest/key-value-api/basic-cache-operations
   * https://ignite.apache.org/docs/latest/key-value-api/binary-objects


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


[GitHub] [ignite] siaron commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1566739082

   When using the Table API, will there be a large performance loss if adding or deleting a column (DDL)?


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


[GitHub] [ignite] ptupitsyn commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1567902699

   It will modify only the specified field. This may require rewriting the entire object if the new value is of different size.


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


[GitHub] [ignite] siaron commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "siaron (via GitHub)" <gi...@apache.org>.
siaron commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1573409979

   ```java
     BinaryObject obj = sqlPublicDevice.get("c20110");
   ```
   If this key contains many fields, will BinaryObject transfer the entire byte to the client?


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


[GitHub] [ignite] ptupitsyn commented on issue #10746: Apache Ignite Table support Schemaless ?

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on issue #10746:
URL: https://github.com/apache/ignite/issues/10746#issuecomment-1573418398

   > BinaryObject obj = sqlPublicDevice.get("c20110");
   
   I don't understand this code.
   
   `BinaryObject` can contain any number of fields, including nested objects of any depth.


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