Skip to content

[BUG]: .Option("query", "SELECT 0 FROM DUAL") #1006

Open
@0hnot

Description

@0hnot

Describe the bug
While using connection to a Oracle DB if we use an option to "SELECT 0 FROM DUAL" (I know is a stupid usage of the tool, but to better understand the problem let's use this example) we got this error.

System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Number.ParseDecimal(ReadOnlySpan1 value, NumberStyles styles, NumberFormatInfo info) at System.Convert.ToDecimal(String value, IFormatProvider provider) at Razorvine.Pickle.Objects.DecimalConstructor.construct(Object[] args) at Razorvine.Pickle.UnpicklerImplementation1.load_reduce()
at Razorvine.Pickle.UnpicklerImplementation1.Load() at Razorvine.Pickle.Unpickler.loads(Byte[] pickledata, Int32 stackCapacity) at Razorvine.Pickle.Unpickler.loads(ReadOnlyMemory1 pickledata, Int32 stackCapacity)
at Microsoft.Spark.Utils.PythonSerDe.GetUnpickledObjects(Stream stream, Int32 messageLength)
at Microsoft.Spark.Sql.RowCollector.Collect(ISocketWrapper socket)+MoveNext()
at Microsoft.Spark.Sql.DataFrame.GetRows(String funcName, Object[] args)+MoveNext()

If we return any 0(Zero) value from the query we got this error.

I don´t know if we are using wrongly or there is something we gotta do, any help is any help is much appreciated.

To Reproduce

Steps to reproduce the behavior:

  1. Connect to Oracle DB
  2. Execute a simple query example: "SELECT 0 FROM DUAL"
  3. See error

Expected behavior
Return a DataFrame with value 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions