Re: Implementing HASH(*)

2023-08-22 Thread Julian Hyde
Fwiw, the “*” in the syntax of "COUNT(*)” was a mistake. By analogy with “SELECT *” and with how Unix treats commands like “ls -l *”, people expect “*” to be expanded to all columns. But suppose I have T (x, y) with values (0, null), (1, 0), (null, 0). Do I expect “select count(*) from t” to re

Re: RE: Implementing HASH(*)

2023-08-16 Thread Kian Nassre
Also I had a few more follow up questions, if you have the availability to respond: - Is it `RelToSqlConverter` or `SqlToRelConverter` where the changes need to be made? - I already have the `HASH` function working in its non-star format (e.g. `HASH(A, B, C)` or `HASH(X)`). Would using `FUNCTION_ST

RE: RE: Implementing HASH(*)

2023-08-16 Thread Kian Nassre
Hello Hongyu Guo, Interesting! I’ll definitely explore this as an option. I’m curious though, do the convertlet tables in RelToSqlConverter have access to enough information to be able to look at a call to HASH(*) and derive the table names (+ their column names) corresponding the scope? My un

RE: Implementing HASH(*)

2023-08-16 Thread Hongyu Guo
Hi Kian Nassre, I try to create a HASH function instance to solve this problem ``` public static final SqlFunction HASH = new SqlFunction("HASH", SqlKind.OTHER_FUNCTION, ReturnTypes.BIGINT, null, OperandTypes.ONE_OR_MORE, SqlFunctionCategory.NUMERIC) { @Override public Sql