Open Anphisa opened 1 year ago
Let me check this out.
The methods in the exception are the symptoms , underlying disease seems to be in the csv loader. Null handling cases might have been missed
Looks like instead of universally setting all null we need to initialize something else or allow null handling
From DBMS perspective null shall be OK, so ig the way injection of null is happening into the database is troubling
Filtering does not work on that too, we currently cannot sort based on such fields
Interestingly this works SELECT latitude,hoehe FROM public.baeume
The error message you provided is a stack trace that indicates an exception occurred in a software application. Here's a breakdown of the information provided:
org.polypheny.db.webui.Crud$QueryExecutionException
, which is caused by a java.lang.RuntimeException
that, in turn, is caused by a java.lang.NullPointerException
.org.polypheny.db.webui.Crud.executeSqlSelect(Crud.java:3667)
.Based on this information, it seems that the error originates from a web-based user interface (UI) component called "Crud" in the Polypheny-DB system. Polypheny-DB is a database management system, and the error occurred while executing a SQL select query. The cause of the exception appears to be a NullPointerException
that occurred within the Functions.toFloat
method, which is part of the org.polypheny.db.runtime.functions
package.
To further investigate and resolve the issue, it would be necessary to analyze the source code of the Polypheny-DB system, particularly the Crud
class and the Functions
class. Additionally, examining the specific query being executed and the data involved could provide more insights into the cause of the NullPointerException
and potential fixes.
try:
result = executeSqlSelect(query)
# Process the result or perform further actions
processResult(result)
except QueryExecutionException as e:
handleQueryExecutionException(e)
def executeSqlSelect(query): try:
# ...
# Return the result
return queryResult
except RuntimeException as e:
# Log the error or perform error handling
logError(e)
# Raise the exception to the calling code
raise QueryExecutionException("Error executing SQL select query")
def processResult(result):
# ...
pass
def handleQueryExecutionException(exception):
logError(exception)
# Handle the exception as required
# ...
def logError(error):
# ...
pass
can you assign this issue for me @hennlo
Hi @hennlo , I think you all are facing this bug because in java empty String is by default null. And in your code you are finding the length of null which in case will give NullPointerException. I can help you fixing this.
case FLOAT:
if ( string.length() == 0 ) {
return null;
}
return Float.parseFloat( string );
Operating System (Polypheny-DB)
Windows
Polypheny-DB Version
0d7256f77c62e8d18959966f3afbda2357b918b2 name:schema-integration
Affected Areas
DB
Browser
Chrome
Client Operating System
No response
Bug Description
When I load a CSV into Polypheny which has empty fields (not all values set), I can't query the respective columns.
After executing the steps from reproduction steps, I get a NullPointerException:
Reproduction Steps
Example: Use baeume as source csv. baeume.csv
Then query on the console: SELECT hoehe FROM public.baeume
Expected Behavior
Show the column that was queried
Relevant Log Output
No response