From 74d4be5d205c4d0199e6aed30e2c753f3f415abe Mon Sep 17 00:00:00 2001 From: Marco Vogt Date: Sat, 19 Oct 2024 10:23:38 +0200 Subject: [PATCH] Minor formatting improvements --- core/src/main/java/org/polypheny/db/functions/Functions.java | 2 +- core/src/main/java/org/polypheny/db/type/entity/PolyValue.java | 2 +- .../test/java/org/polypheny/db/sql/view/ComplexViewTest.java | 1 + .../db/prisminterface/statements/PIPreparedStatement.java | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/polypheny/db/functions/Functions.java b/core/src/main/java/org/polypheny/db/functions/Functions.java index e3f5c8ef99..8f508b594a 100644 --- a/core/src/main/java/org/polypheny/db/functions/Functions.java +++ b/core/src/main/java/org/polypheny/db/functions/Functions.java @@ -2137,7 +2137,7 @@ public static PolyBoolean isNotFalse( PolyBoolean b ) { * NULL → NULL, FALSE → TRUE, TRUE → FALSE. */ public static PolyBoolean not( PolyBoolean b ) { - return b == null ? PolyBoolean.of( null ): PolyBoolean.of( !b.value ); + return b == null ? PolyBoolean.of( null ) : PolyBoolean.of( !b.value ); } diff --git a/core/src/main/java/org/polypheny/db/type/entity/PolyValue.java b/core/src/main/java/org/polypheny/db/type/entity/PolyValue.java index 52e2f01f95..b8aa5466c6 100644 --- a/core/src/main/java/org/polypheny/db/type/entity/PolyValue.java +++ b/core/src/main/java/org/polypheny/db/type/entity/PolyValue.java @@ -799,7 +799,7 @@ public boolean isNumber() { public PolyNumber asNumber() { if ( isNumber() ) { return (PolyNumber) this; - }else if( isString() ){ + } else if ( isString() ) { return PolyFloat.convert( this.asString() ); } throw cannotParse( this, PolyNumber.class ); diff --git a/dbms/src/test/java/org/polypheny/db/sql/view/ComplexViewTest.java b/dbms/src/test/java/org/polypheny/db/sql/view/ComplexViewTest.java index 775781bb5d..fbf431d751 100644 --- a/dbms/src/test/java/org/polypheny/db/sql/view/ComplexViewTest.java +++ b/dbms/src/test/java/org/polypheny/db/sql/view/ComplexViewTest.java @@ -1498,6 +1498,7 @@ public void testQ14() throws SQLException { } } + @Test public void testCast() throws SQLException { try ( JdbcConnection polyphenyDbConnection = new JdbcConnection( true ) ) { diff --git a/plugins/prism-interface/src/main/java/org/polypheny/db/prisminterface/statements/PIPreparedStatement.java b/plugins/prism-interface/src/main/java/org/polypheny/db/prisminterface/statements/PIPreparedStatement.java index 8952114055..548bf52813 100644 --- a/plugins/prism-interface/src/main/java/org/polypheny/db/prisminterface/statements/PIPreparedStatement.java +++ b/plugins/prism-interface/src/main/java/org/polypheny/db/prisminterface/statements/PIPreparedStatement.java @@ -24,7 +24,6 @@ import org.polypheny.db.languages.QueryLanguage; import org.polypheny.db.prisminterface.PIClient; import org.polypheny.db.prisminterface.statementProcessing.StatementProcessor; -import org.polypheny.db.type.PolyType; import org.polypheny.prism.ParameterMeta; @Setter @@ -33,6 +32,7 @@ public abstract class PIPreparedStatement extends PIStatement implements Signatu protected List parameterMetas; protected List parameterPolyTypes; + public List getParameterMetas() { if ( parameterMetas == null ) { StatementProcessor.prepare( this );