Folks,

I noticed that we currently have a very weird limitation for enum fields
when running SQL queries. Basically, you can't use enum value names as many
users would expect.

Technically this happens because binary format stores only ordinal and the
only way to run such query is to do something like this:

SqlFieldsQuery qry = new SqlFieldsQuery("select * from Table where
enumField = ?");
qry.setArgs(MyEnum.ENUM_VALUE);
cache.query(qry);

This means that this query can be executed only if:
- IgniteCache API is used. So it doesn't work in JDBC driver, Zeppelin, etc.
- The client that executes the query has the enum class on classpath.

My first thought about fixing this is to somehow store value names in
binary metadata and patch the SQL engine so that it understands how to use
this information.

Thoughts?

-Val

Reply via email to