Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cannot find a way to convert UINT4 to anything else.

Open
#2,963 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
sql
Domain
databases

Research direction

Reproduce the UINT4 conversion failures in Apache Drill 1.21.2 using the provided hits.parquet queries, then trace the cast and conversion handling reached by those expressions. Done means UINT4 values can be converted or compared through the reported SQL forms without internal or validation errors, with regression coverage added for the supported behavior.

Written by the indexing model from the issue text.

Description

apache drill> SELECT EventDate >= 15900 FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: f7cd1c85-3fde-422b-ba9a-03832392add8 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT EventDate >= 15900::UINT4 FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: PARSE ERROR: Encountered ":" at line 1, column 26.

SQL Query: SELECT EventDate >= 15900::UINT4 FROM dfs.`/hits.parquet` LIMIT 10
                                    ^

[Error Id: 60c7d6b8-c904-4a44-a3ca-cc93d0a752c7 ] (state=,code=0)
apache drill> SELECT EventDate >= CAST(15900 AS UINT4) FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: VALIDATION ERROR: From line 1, column 35 to line 1, column 39: Unknown identifier 'UINT4'


[Error Id: 214c1220-8ac2-40d6-90e1-7b2fc607cd6b ] (state=,code=0)
apache drill> SELECT EventDate >= CASTUINT4(15900) FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: VALIDATION ERROR: From line 1, column 21 to line 1, column 36: No match found for function signature CASTUINT4(<NUMERIC>)


[Error Id: 74ea55e8-04e4-458a-9934-ac965fe431f0 ] (state=,code=0)
apache drill> SELECT EventDate >= castUINT4(15900) FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: VALIDATION ERROR: From line 1, column 21 to line 1, column 36: No match found for function signature castUINT4(<NUMERIC>)


[Error Id: 0e19638b-f288-4d3a-b620-968ccbd69675 ] (state=,code=0)
apache drill> SELECT EventDate >= TO_UINT4(15900) FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: VALIDATION ERROR: From line 1, column 21 to line 1, column 35: No match found for function signature TO_UINT4(<NUMERIC>)


[Error Id: dc6d7e4c-60b8-4fb1-961a-85c7152236d8 ] (state=,code=0)
apache drill> SELECT EventDate >= 15900. FROM dfs.`/hits.parquet` LIMIT 10
2..semicolon> ;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: a621e700-b596-4621-a942-6669fa4fe5c2 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT EventDate >= 15900. FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: ab416609-ac8d-4c72-804e-9dc45d108264 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT EventDate + 0.0 >= 15900. FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castVARDECIMAL(UINT4-REQUIRED, INT-REQUIRED, INT-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 7d1efbe2-e835-456a-bef0-eaee51166f2c on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT DATE EventDate FROM dfs.`/hits.parquet` LIMIT 10;
Error: PARSE ERROR: Encountered "" at line 1, column 8.

SQL Query: SELECT DATE EventDate FROM dfs.`/hits.parquet` LIMIT 10
                  ^

[Error Id: 6a790481-82b0-447b-bd82-0f03521212fd ] (state=,code=0)
apache drill> SELECT DATE(EventDate) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [date(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 48cb356f-8d2b-4e10-8b08-77a8df96a007 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT TO_DATE(EventDate) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 028b43d9-ab41-43fe-b434-60f5293d87ed on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT CAST(EventDate AS BIGINT) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castFLOAT4(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 51c420ad-1e82-4c9f-878d-bbfb6dab8574 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT CAST(EventDate AS INT) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 4798591b-6ee1-4af3-89d4-f3c981270101 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT CAST(EventDate+1 AS INT) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: b6b77b4e-c533-42c6-b4bd-b3f0e6df8929 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT CAST(EventDate+1 AS BIGINT) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 1240e2df-9fd1-40dd-935e-a64b33c1efc1 on 6c9199236947:31010] (state=,code=0)
apache drill> SELECT CAST(EventDate AS STRING) FROM dfs.`/hits.parquet` LIMIT 10;
Error: VALIDATION ERROR: From line 1, column 26 to line 1, column 31: Unknown identifier 'STRING'


[Error Id: a115c8cb-0ae0-4946-a347-98eb0095a14b ] (state=,code=0)
apache drill> SELECT CAST(EventDate AS CHAR) FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 3a9c1be4-2b5b-4dfa-888d-5df6aca276d9 on 6c9199236947:31010] (state=,code=0)
apache drill> 
ubuntu@ip-172-31-4-134:~$ sudo docker run -it --rm --name drill -v $(pwd)/hits.parquet:/hits.parquet apache/drill
Apache Drill 1.21.2
"What ever the mind of man can conceive and believe, Drill can query."
apache drill> SELECT TO_NUMBER(EventDate) FROM dfs.`/hits.parquet` LIMIT 10;
Error: VALIDATION ERROR: From line 1, column 8 to line 1, column 27: No match found for function signature TO_NUMBER(<ANY>)


[Error Id: 6eb51dc0-de19-488d-bc6d-7576820dfa87 ] (state=,code=0)
apache drill> SELECT TO_CHAR(EventDate) FROM dfs.`/hits.parquet` LIMIT 10;
Error: VALIDATION ERROR: From line 1, column 8 to line 1, column 25: No match found for function signature TO_CHAR(<ANY>)


[Error Id: 1a0c37fa-b58d-4560-aa40-7854b37a4199 ] (state=,code=0)
apache drill> SELECT sqlTypeOf(EventDate) FROM dfs.`/hits.parquet` LIMIT 10;
+---------+
| EXPR$0  |
+---------+
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
| INTEGER |
+---------+
10 rows selected (2.293 seconds)
apache drill> SELECT drillTypeOf(EventDate) FROM dfs.`/hits.parquet` LIMIT 10;
+--------+
| EXPR$0 |
+--------+
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
| UINT4  |
+--------+
10 rows selected (0.473 seconds)
apache drill> SELECT CONVERT_TO(EventDate, 'BIGINT') FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castBIGINT(UINT4-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 3411f31e-d71a-4122-aec9-27e3b5bf5578 on 67a5c4f0c502:31010] (state=,code=0)
apache drill> SELECT CONVERT_FROM(EventDate, 'BIGINT') FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castVARBINARY(UINT4-REQUIRED, BIGINT-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 08d702b2-958f-4cb9-a95f-1ecbe1f3779a on 67a5c4f0c502:31010] (state=,code=0)
apache drill> SELECT CONVERT_FROM(EventDate, 'UINT4') FROM dfs.`/hits.parquet` LIMIT 10;
Error: INTERNAL_ERROR ERROR: Failure while materializing expression.

Errors: 
Error in expression at index -1.  Error: Missing function implementation: [castVARBINARY(UINT4-REQUIRED, BIGINT-REQUIRED)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment: 0:0

Please, refer to logs for more information.

[Error Id: 3f6ce075-4f46-440b-afba-f4b5069ed8a8 on 67a5c4f0c502:31010] (state=,code=0)
apache drill> 
Dominant language
Java
Stars
2k
Forks
989
Avg merge
1d 14h
Merged PRs (30d)
4

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/drill

All issues in apache/drill

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.