Re: UPSERT null vlaues
The contract with immutable tables is that a row will never be partially updated (including setting a column to null). Phoenix can’t enforce this and retain the perf gain it gives you, so it’s on an honor system instead. Attempts to set a value to null are stripped out rather than potentially placing a delete marker that in theory shouldn’t be needed. So short answer is to not declare your table as immutable if you need to set column values to null. Thanks, James On Sat, Apr 28, 2018 at 3:24 AM Stepan Migunov < stepan.migu...@firstlinesoftware.com> wrote: > Thank you James, it was “immutable”. I didn't know that it affects. > > > > *From:* James Taylor [mailto:jamestay...@apache.org] > *Sent:* Friday, April 27, 2018 5:37 PM > *To:* user@phoenix.apache.org > *Subject:* Re: UPSERT null vlaues > > > > Hi Stepan, > > Please post your complete DDL and indicate the version of Phoenix and > HBase you’re using. Your example should work as expected barring > declaration of the table as immutable or COL2 being part of the primary key. > > > > Thanks, > > James > > > > On Fri, Apr 27, 2018 at 6:13 AM Stepan Migunov < > stepan.migu...@firstlinesoftware.com> wrote: > > Hi, > Could you please clarify, how I can set a value to NULL? > > After upsert into temp.table (ROWKEY, COL1, COL2) values (100, "ABC", > null); the value of COL2 still has a previous value (COL1 has "ABC" as > expected). > > Or there is only one way - to set STORE_NULLS = true? > > Thanks, > Stepan. > >
Go Avatica/Phoenix database/sql driver 3.0.0 released
We recently released Apache Calcite Avatica Go 3.0.0. avatica-go is a Go database/sql driver for Avatica that also contains an adapter for Phoenix. The 3.0.0 release is the first release under the Apache Foundation since the code has been donated. If you are using the Boostport/avatica driver, we highly encourage you to switch to the apache/calcite-avatica-go driver. In most cases, upgrading is just updating the import path in your application. Please find the announcement below: The Apache Calcite team is pleased to announce the release of Apache Calcite Avatica Go 3.0.0. Avatica is a framework for building database drivers. Avatica defines a wire API and serialization mechanism for clients to communicate with a server as a proxy to a database. The reference Avatica client and server are implemented in Java and communicate over HTTP. Avatica is a sub-project of Apache Calcite. The Avatica Go client is a Go database/sql driver that enables Go programs to communicate with the Avatica server. Avatica Go 3.0.0 is the first release by the Apache Calcite project since the code was donated. This release includes support for the Avatica HSQLDB backend, updated dependencies as well as numerous bug fixes as described in the release notes: https://calcite.apache.org/avatica/docs/go_history.html#v3-0-0 The release is available here: https://www.apache.org/dyn/closer.cgi/calcite/apache-calcite-avatica-go-3.0.0/ We welcome your help and feedback. For more information on how to report problems, and to get involved, visit the project website at https://calcite.apache.org/avatica Francis Chuang, on behalf of the Apache Calcite Team
RE: UPSERT null vlaues
Thank you James, it was “immutable”. I didn't know that it affects. *From:* James Taylor [mailto:jamestay...@apache.org] *Sent:* Friday, April 27, 2018 5:37 PM *To:* user@phoenix.apache.org *Subject:* Re: UPSERT null vlaues Hi Stepan, Please post your complete DDL and indicate the version of Phoenix and HBase you’re using. Your example should work as expected barring declaration of the table as immutable or COL2 being part of the primary key. Thanks, James On Fri, Apr 27, 2018 at 6:13 AM Stepan Migunov < stepan.migu...@firstlinesoftware.com> wrote: Hi, Could you please clarify, how I can set a value to NULL? After upsert into temp.table (ROWKEY, COL1, COL2) values (100, "ABC", null); the value of COL2 still has a previous value (COL1 has "ABC" as expected). Or there is only one way - to set STORE_NULLS = true? Thanks, Stepan.