Welcome to the MCQA 2.0 Era!
- Support for submitting MCQA 2.0 jobs. Enable MCQA 2.0 mode by setting
quotaName
to interactive quota and turning oninteractiveMode=true
. - New parameter
useInstanceTunnel
, which specifies whether to use Tunnel to retrieve data. The default value is true, consistent with previous behavior. IfinstanceTunnel
is turned off, the system will use RESTful API to retrieve data under this mode:- Execution speed will be faster.
- Only 10,000 results can be returned; if this limit is exceeded, the data will be truncated.
- Return values are of String type, suitable only for display-type jobs.
- New executable class
JdbcRunner
, which allows executing JDBC tasks via a connection string and SQL file. The usage is as follows:
java -cp odps-jdbc-version-jar-with-dependencies.jar com.aliyun.odps.jdbc.JdbcRunner <jdbc_url> <sql_file>
- Added some debug settings that modify the current
Connection
configuration (effectively re-acquiring the Connection to replace the current one).set tunnelEndpoint = xxx;
modifies the tunnelEndpoint parameter of the current Connection.set useTunnel = true/false;
modifies the useInstanceTunnel parameter of the current Connection.set interactiveMode = true/false;
modifies the interactiveMode parameter of the current Connection.
- Removed handling of
#
comment in theremoveComment
method: it no longer removes comments after the#
. This change resolves many issues where valid SQL statements were incorrect due to the removal of#
. - Updated odps-sdk version to 0.50.0-public.
Compatibility with Metabase!
Learn how to connect MaxCompute to Metabase
- Optimized the
DatabaseMetadata.getColumns
Logic: Enhanced compatibility for three-tier and two-tier model users as follows:- Three-tier model (project.schema.table):
- Ignores the passed
catalog
, using the project name from the JDBC connection, along with theschemaPattern
andtableNamePattern
parameters to compose the table reference.
- Ignores the passed
- Two-tier model (project.table):
- Ignores the
schemaPattern
, treating thecatalog
as the project name, and combines it with thetableNamePattern
parameter to form the table reference.
- Ignores the
Three-tier model: catalog.schemaPattern.tableNamePattern -> project.schemaPattern.tableNamePattern Two-tier model: schemaPattern.tableNamePattern -> catalog.tableNamePattern
- Three-tier model (project.schema.table):
- Enhanced SQLException Messages: The exception message now includes the correct ErrorMessage.
- Updated odps-sdk Version: Updated to 0.48.8-public.
Say No to SQLFeatureNotSupportedException!
- LocalDate Support:
PrepareStatement.setObject
now supports LocalDate type for MaxCompute DATE type. - SQL Injection Check: New parameter
skipSqlInjectCheck
allows skipping the SQL injection check, applicable when setting String type fields. - TIMESTAMP_NTZ Support:
DatabaseMetadata
now also supports MaxComputeTIMESTAMP_NTZ
type fields. - Extended
PrepareStatement
Methods:- Implemented
setObject(int, Object, int)
,setObject(int, Object, int, int)
,setObject(int, Object, SQLType)
, andsetObject(int, Object, SQLType, int)
methods, which will no longer throw exceptions but will return results fromsetObject(int, Object)
, ignoring additional fields.
- Implemented
- Extended
ResultSet
Methods:- Added
getObject(int, Map)
andgetObject(String, Map)
methods, which no longer throw exceptions but ignore themap
and callResultSet.getObject(int)
to return results. - Added
getObject(int, Class<T>)
andgetObject(String, Class<T>)
methods, which first callResultSet.getObject(int)
before trying to convert the result to the specified type.
- Added
- Optimized
Statement
Method: ThecreateStatement(int, int, int)
method now no longer throws exceptions but ignoresresultSetHoldability
, returning the result ofStatement.createStatement(int, int)
.
- Enhanced
DatabaseMetadata.getColumns
: The interface now returnsIS_AUTOINCREMENT
andIS_GENERATEDCOLUMN
fields to comply with JDBC specifications. - Updated odps-sdk Version: Updated to 0.48.7-public.
- The new version applies key-path-end optimizations, improving efficiency during offline job execution, especially in complex queries.
- Delta Table Write Support:
PrepareStatement
now supports write operations on Delta Tables. - Skip SQL Rewrite: New parameter
skipSqlRewrite
, with a default value oftrue
, allows skipping SQL statement rewriting during comment removal. Enabling this parameter may cause settings submitted with the SQL to become ineffective.
- Optimized Comment Removal Logic: The logic has been optimized to avoid throwing exceptions when processing very long queries. It fixes the issue of potentially removing SQL hints during comment removal.
- SDK Update: The odps-sdk has been updated to 0.48.6-public.
- The new version reduces network overhead, slightly improving efficiency during offline job execution.
- New Parameter
tunnelDownloadUseSingleReader
: The default value isfalse
. When this parameter is enabled, each ResultSet will use only a single Reader for data downloading. This change is suitable for scenarios that require reading large amounts of data at once, optimizing performance. The previous behavior was to open a new Reader each timehasNext
is called, to prevent connection drops.
- Support for
insert into tablename (co1, co2) values(?, ?)
syntax. DatabaseMetadata.getColumns
now adapts to situations using the three-tier model.