You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by wt <wa...@gmail.com> on 2018/09/18 16:26:44 UTC

.net decimal being stored as Other in ignite.

i have the following class

        [QuerySqlField]
        public int vd { get; set; }
        [QuerySqlField]
        public long sharesinindex { get; set; }
        [QuerySqlField]
        public string name { get; set; }
        [QuerySqlField]
        public string isin { get; set; }
        [QuerySqlField]
        public string sedol { get; set; }
        [QuerySqlField]
        public string ric { get; set; }
        [QuerySqlField]
        public decimal close { get; set; }
        [QuerySqlField]
        public decimal rate { get; set; }

when i configure ignite with this class in .net and start the server it
correctly sets all the other fields just not the decimals. The documentation
states

DECIMAL
Possible values: Data type with fixed precision and scale.

Mapped to:

Java/JDBC: java.math.BigDecimal
.NET/C#: decimal
C/C++: ignite::Decimal
ODBC: SQL_DECIMAL


Why is Ignite not mapping this correctly ->  tables.png
<http://apache-ignite-developers.2346864.n4.nabble.com/file/t604/tables.png>  


here is the config

            var cfg = new IgniteConfiguration
            {
                DiscoverySpi = new TcpDiscoverySpi
                {
                    IpFinder = new TcpDiscoveryStaticIpFinder
                    {
                        Endpoints = new[] { "127.0.0.1:47500..47509" }
                    },
                    SocketTimeout = TimeSpan.FromSeconds(0.3)
                },
                CacheConfiguration = new[]
                {
                    new CacheConfiguration("IndexComposition")
                    {
                        SqlSchema = "IndexComposition",CacheMode =
CacheMode.Replicated,
                        QueryEntities = new []
                        {
                            new
QueryEntity(typeof(int),typeof(IndexComposition))
                        }
                    }
                }

            };




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: .net decimal being stored as Other in ignite.

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

This problem I do not observe. I can see values with decimal points in
dbeaver.

Regards.
-- 
Ilya Kasnacheev


чт, 20 сент. 2018 г. в 13:43, wt <wa...@gmail.com>:

> thanks, just another FYI , the values in that column cut off anything after
> the decimal point while it is other so 3.456 becomes 3
>
> for now we are storing as a string and casting to decimal when we query
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: .net decimal being stored as Other in ignite.

Posted by wt <wa...@gmail.com>.
thanks, just another FYI , the values in that column cut off anything after
the decimal point while it is other so 3.456 becomes 3

for now we are storing as a string and casting to decimal when we query



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: .net decimal being stored as Other in ignite.

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

I have tried that, and indeed: DBeaver shows the column type is OTHER even
while the type of column is correctly mapped to java.math.BigDecimal.

I have filed a ticket: https://issues.apache.org/jira/browse/IGNITE-9650

Note that SQL on that column since to work correctly, it's only metadata
that is affected.

Regards,
-- 
Ilya Kasnacheev


ср, 19 сент. 2018 г. в 11:25, wt <wa...@gmail.com>:

> anybody have any clue as to how Ignite is not mapping .Net decimal to
> Java.math.Bigdecimal?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: .net decimal being stored as Other in ignite.

Posted by wt <wa...@gmail.com>.
anybody have any clue as to how Ignite is not mapping .Net decimal to
Java.math.Bigdecimal?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/