Hi, I suppose that we should add javadoc to QuerySqlFileds. It is weird that this feature is not documented.
ср, 11 авг. 2021 г. в 00:08, Maksim Timonin <timonin.ma...@gmail.com>: > Hi, Igniters! > > I dived to the precision param of QuerySqlField and SQL data types. The > javadocs of QuerySqlField say that the param is for decimal type only. But > actually it works for String fields out of the box. So it looks like an > easter egg. I think we should either document it or forbid it. > > Also I wonder why it works for String, but not for byte[] (analogue of > binary SQL data type). I made a few minor fixes and then it started to work > [1]. > > I think that QuerySqlField precision should work the same way as for SQL > variable length types - varchar, binary. Then I propose to allow apply > QuerySqlField.precision on String and byte[]. Is there a known reason to > avoid it? > > WDYT? > > [1] I've prepared a PR with patch for binary types, and tests for precision > (QuerySqlField and SQL), and fix the javadoc - > https://github.com/apache/ignite/pull/9315 > > P.S. I discovered that IgniteDataStreamer ignores the precision parameter > for QuerySqlField. I found a ticket that is also broken for notNull - > https://issues.apache.org/jira/browse/IGNITE-10999. It just doesn't work > at > all, not only about notNull. > -- Sincerely yours, Ivan Daschinskiy