Skip to content

Verify SQLite Boolean column handling in Gradle and Maven projects #1935

Description

@zaleslaw

Problem

Issue #1013 reports a SQLite Boolean-related problem in Kotlin Notebook:

  • SQLite stores Boolean-like values as integers (0 / 1);
  • generated property access expects Boolean;
  • direct property access in Notebook can fail with:
ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Boolean

The same report also mentions that in a regular IntelliJ/Gradle class, direct access fails earlier with:

Unresolved reference: is_active

That part may be a separate schema/accessor-generation issue rather than the same SQLite Boolean mapping problem.

We need to verify whether the actual SQLite Boolean conversion/casting issue is reproducible in regular Gradle and Maven projects when schema/accessor setup is configured correctly.

Goal

Check whether SQLite columns declared or inferred as Boolean are handled consistently outside Kotlin Notebook.

Scenarios to Verify

Gradle

Create or reuse a Gradle sample with:

  • SQLite database containing a Boolean-like column stored as 0 / 1;
  • JDBC/DataFrame read path;
  • explicit schema or generated accessors;
  • direct typed access to the Boolean column.

Verify whether:

df.is_active

or equivalent typed access works, fails with ClassCastException, or requires explicit conversion.

Maven

Repeat the same verification in a Maven project, if Maven support is expected for the same workflow.

Expected Behavior

One of the following should be clearly defined:

  • SQLite 0 / 1 values are converted to Boolean when schema expects Boolean; or
  • SQLite Boolean-like columns are read as Int, and users must convert them explicitly; or
  • a clear diagnostic explains that SQLite does not have a native Boolean type and that 0 / 1 values cannot be accessed as Boolean without conversion.

The behavior should be consistent across Notebook, Gradle, and Maven where the same schema/accessor setup is available.

Definition of Done

Related

Metadata

Metadata

Labels

bugSomething isn't workingdatabasesJDBC related issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions